1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s
3 # RUN: llc -debugify-and-strip-all-safe -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s
6 name: test_combine_fabs_fabs
10 ; CHECK-LABEL: name: test_combine_fabs_fabs
11 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
12 ; CHECK: [[FABS:%[0-9]+]]:_(s32) = G_FABS [[COPY]]
13 ; CHECK: $w0 = COPY [[FABS]](s32)
15 %1:_(s32) = G_FABS %0(s32)
16 %2:_(s32) = G_FABS %1(s32)
20 name: test_combine_fabs_fabs_vec
24 ; CHECK-LABEL: name: test_combine_fabs_fabs_vec
25 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $x0
26 ; CHECK: [[FABS:%[0-9]+]]:_(<2 x s32>) = G_FABS [[COPY]]
27 ; CHECK: $x0 = COPY [[FABS]](<2 x s32>)
28 %0:_(<2 x s32>) = COPY $x0
29 %1:_(<2 x s32>) = G_FABS %0(<2 x s32>)
30 %2:_(<2 x s32>) = G_FABS %1(<2 x s32>)
31 $x0 = COPY %2(<2 x s32>)
34 name: test_combine_half_fabs_neg_constant
37 ; CHECK-LABEL: name: test_combine_half_fabs_neg_constant
38 ; CHECK: [[C:%[0-9]+]]:_(s16) = G_FCONSTANT half 0xH4580
39 ; CHECK: $h0 = COPY [[C]](s16)
40 %0:_(s16) = G_FCONSTANT half 0xHC580
45 name: test_combine_half_fabs_pos_constant
48 ; CHECK-LABEL: name: test_combine_half_fabs_pos_constant
49 ; CHECK: [[C:%[0-9]+]]:_(s16) = G_FCONSTANT half 0xH4580
50 ; CHECK: $h0 = COPY [[C]](s16)
51 %0:_(s16) = G_FCONSTANT half 0xH4580
56 name: test_combine_float_fabs_neg_constant
60 ; CHECK-LABEL: name: test_combine_float_fabs_neg_constant
61 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 5.500000e+00
62 ; CHECK: $w0 = COPY [[C]](s32)
63 %0:_(s32) = G_FCONSTANT float -5.500000e+00
68 name: test_combine_float_fabs_pos_constant
72 ; CHECK-LABEL: name: test_combine_float_fabs_pos_constant
73 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 5.500000e+00
74 ; CHECK: $w0 = COPY [[C]](s32)
75 %0:_(s32) = G_FCONSTANT float -5.500000e+00
80 name: test_combine_double_fabs_neg_constant
84 ; CHECK-LABEL: name: test_combine_double_fabs_neg_constant
85 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 4.200000e+00
86 ; CHECK: $x0 = COPY [[C]](s64)
87 %0:_(s64) = G_FCONSTANT double -4.200000e+00
92 name: test_combine_double_fabs_pos_constant
96 ; CHECK-LABEL: name: test_combine_double_fabs_pos_constant
97 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 4.200000e+00
98 ; CHECK: $x0 = COPY [[C]](s64)
99 %0:_(s64) = G_FCONSTANT double 4.200000e+00
100 %1:_(s64) = G_FABS %0