Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / test / CodeGen / AArch64 / GlobalISel / combine-fneg.mir
blob1b1077854b4c166fa4cbbd06cdaf0a0be41b04f8
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -o - -mtriple=aarch64-unknown-unknown -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs  %s | FileCheck %s
3 ---
4 name:            test_combine_fneg_fneg
5 body:             |
6   bb.1:
7   liveins: $w0
8     ; CHECK-LABEL: name: test_combine_fneg_fneg
9     ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
10     ; CHECK: $w0 = COPY [[COPY]](s32)
11     %0:_(s32) = COPY $w0
12     %1:_(s32) = G_FNEG %0(s32)
13     %2:_(s32) = G_FNEG %1(s32)
14     $w0 = COPY %2(s32)
15 ...
16 ---
17 name:            test_combine_fneg_fneg_vec
18 body:             |
19   bb.1:
20   liveins: $x0
21     ; CHECK-LABEL: name: test_combine_fneg_fneg_vec
22     ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $x0
23     ; CHECK: $x0 = COPY [[COPY]](<2 x s32>)
24     %0:_(<2 x s32>) = COPY $x0
25     %1:_(<2 x s32>) = G_FNEG %0(<2 x s32>)
26     %2:_(<2 x s32>) = G_FNEG %1(<2 x s32>)
27     $x0 = COPY %2(<2 x s32>)
28 ...
29 ---
30 name:            test_combine_half_fneg_neg_constant
31 body:             |
32   bb.1:
33     ; CHECK-LABEL: name: test_combine_half_fneg_neg_constant
34     ; CHECK: [[C:%[0-9]+]]:_(s16) = G_FCONSTANT half 0xH4580
35     ; CHECK: $h0 = COPY [[C]](s16)
36     %0:_(s16) = G_FCONSTANT half 0xHC580
37     %1:_(s16) = G_FNEG %0
38     $h0 = COPY %1(s16)
39 ...
40 ---
41 name:            test_combine_half_fneg_pos_constant
42 body:             |
43   bb.1:
44     ; CHECK-LABEL: name: test_combine_half_fneg_pos_constant
45     ; CHECK: [[C:%[0-9]+]]:_(s16) = G_FCONSTANT half 0xHC580
46     ; CHECK: $h0 = COPY [[C]](s16)
47     %0:_(s16) = G_FCONSTANT half 0xH4580
48     %1:_(s16) = G_FNEG %0
49     $h0 = COPY %1(s16)
50 ...
51 ---
52 name:            test_combine_float_fneg_neg_constant
53 body:             |
54   bb.1:
55     ; CHECK-LABEL: name: test_combine_float_fneg_neg_constant
56     ; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 5.500000e+00
57     ; CHECK: $w0 = COPY [[C]](s32)
58     %0:_(s32) = G_FCONSTANT float -5.500000e+00
59     %1:_(s32) = G_FNEG %0
60     $w0 = COPY %1(s32)
61 ...
62 ---
63 name:            test_combine_float_fneg_pos_constant
64 body:             |
65   bb.1:
66     ; CHECK-LABEL: name: test_combine_float_fneg_pos_constant
67     ; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float -5.500000e+00
68     ; CHECK: $w0 = COPY [[C]](s32)
69     %0:_(s32) = G_FCONSTANT float 5.500000e+00
70     %1:_(s32) = G_FNEG %0
71     $w0 = COPY %1(s32)
72 ...
73 ---
74 name:            test_combine_double_fneg_neg_constant
75 body:             |
76   bb.1:
77     ; CHECK-LABEL: name: test_combine_double_fneg_neg_constant
78     ; CHECK: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 4.200000e+00
79     ; CHECK: $x0 = COPY [[C]](s64)
80     %0:_(s64) = G_FCONSTANT double -4.200000e+00
81     %1:_(s64) = G_FNEG %0
82     $x0 = COPY %1(s64)
83 ...
84 ---
85 name:            test_combine_double_fneg_pos_constant
86 body:             |
87   bb.1:
88     ; CHECK-LABEL: name: test_combine_double_fneg_pos_constant
89     ; CHECK: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double -4.200000e+00
90     ; CHECK: $x0 = COPY [[C]](s64)
91     %0:_(s64) = G_FCONSTANT double 4.200000e+00
92     %1:_(s64) = G_FNEG %0
93     $x0 = COPY %1(s64)
94 ...