[PowerPC] Recommit r314244 with refactoring and off by default
[llvm-core.git] / test / CodeGen / AArch64 / GlobalISel / legalize-fneg.mir
blobe7dc314f034f03c2fc7fe5c8024e031923d0d2ab
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -run-pass=legalizer -global-isel %s -o - | FileCheck %s
4 --- |
5   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
6   target triple = "aarch64--"
7   define void @test_fneg_f32() {
8   entry:
9     ret void
10   }
11   define void @test_fneg_f64() {
12   entry:
13     ret void
14   }
15 ...
16 ---
17 name:            test_fneg_f32
18 registers:
19   - { id: 0, class: _ }
20   - { id: 1, class: _ }
21 body:             |
22   bb.1:
23     liveins: %s0
24     ; CHECK-LABEL: name: test_fneg_f32
25     ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY %s0
26     ; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float -0.000000e+00
27     ; CHECK: [[FSUB:%[0-9]+]]:_(s32) = G_FSUB [[C]], [[COPY]]
28     ; CHECK: %s0 = COPY [[FSUB]](s32)
29     %0(s32) = COPY %s0
30     %1(s32) = G_FNEG %0
31     %s0 = COPY %1(s32)
32 ...
33 ---
34 name:            test_fneg_f64
35 registers:
36   - { id: 0, class: _ }
37   - { id: 1, class: _ }
38 body:             |
39   bb.1:
40     liveins: %d0
41     ; CHECK-LABEL: name: test_fneg_f64
42     ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY %d0
43     ; CHECK: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double -0.000000e+00
44     ; CHECK: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[C]], [[COPY]]
45     ; CHECK: %d0 = COPY [[FSUB]](s64)
46     %0(s64) = COPY %d0
47     %1(s64) = G_FNEG %0
48     %d0 = COPY %1(s64)
49 ...