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 4 5--- 6name: test_combine_fabs_fabs 7body: | 8 bb.1: 9 liveins: $w0 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) 14 %0:_(s32) = COPY $w0 15 %1:_(s32) = G_FABS %0(s32) 16 %2:_(s32) = G_FABS %1(s32) 17 $w0 = COPY %2(s32) 18... 19--- 20name: test_combine_fabs_fabs_vec 21body: | 22 bb.1: 23 liveins: $x0 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>) 32... 33--- 34name: test_combine_half_fabs_neg_constant 35body: | 36 bb.1: 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 41 %1:_(s16) = G_FABS %0 42 $h0 = COPY %1(s16) 43... 44--- 45name: test_combine_half_fabs_pos_constant 46body: | 47 bb.1: 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 52 %1:_(s16) = G_FABS %0 53 $h0 = COPY %1(s16) 54... 55--- 56name: test_combine_float_fabs_neg_constant 57body: | 58 bb.1: 59 liveins: $w0 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 64 %1:_(s32) = G_FABS %0 65 $w0 = COPY %1(s32) 66... 67--- 68name: test_combine_float_fabs_pos_constant 69body: | 70 bb.1: 71 liveins: $w0 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 76 %1:_(s32) = G_FABS %0 77 $w0 = COPY %1(s32) 78... 79--- 80name: test_combine_double_fabs_neg_constant 81body: | 82 bb.1: 83 liveins: $x0 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 88 %1:_(s64) = G_FABS %0 89 $x0 = COPY %1(s64) 90... 91--- 92name: test_combine_double_fabs_pos_constant 93body: | 94 bb.1: 95 liveins: $x0 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 101 $x0 = COPY %0(s64) 102... 103