115 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s3# RUN: llc -debugify-and-strip-all-safe -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s4 5---6name: test_combine_fabs_fabs7body: |8 bb.1:9 liveins: $w010 ; CHECK-LABEL: name: test_combine_fabs_fabs11 ; CHECK: liveins: $w012 ; CHECK-NEXT: {{ $}}13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w014 ; CHECK-NEXT: [[FABS:%[0-9]+]]:_(s32) = G_FABS [[COPY]]15 ; CHECK-NEXT: $w0 = COPY [[FABS]](s32)16 %0:_(s32) = COPY $w017 %1:_(s32) = G_FABS %0(s32)18 %2:_(s32) = G_FABS %1(s32)19 $w0 = COPY %2(s32)20...21---22name: test_combine_fabs_fabs_vec23body: |24 bb.1:25 liveins: $x026 ; CHECK-LABEL: name: test_combine_fabs_fabs_vec27 ; CHECK: liveins: $x028 ; CHECK-NEXT: {{ $}}29 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $x030 ; CHECK-NEXT: [[FABS:%[0-9]+]]:_(<2 x s32>) = G_FABS [[COPY]]31 ; CHECK-NEXT: $x0 = COPY [[FABS]](<2 x s32>)32 %0:_(<2 x s32>) = COPY $x033 %1:_(<2 x s32>) = G_FABS %0(<2 x s32>)34 %2:_(<2 x s32>) = G_FABS %1(<2 x s32>)35 $x0 = COPY %2(<2 x s32>)36...37---38name: test_combine_half_fabs_neg_constant39body: |40 bb.1:41 ; CHECK-LABEL: name: test_combine_half_fabs_neg_constant42 ; CHECK: [[C:%[0-9]+]]:_(s16) = G_FCONSTANT half 0xH458043 ; CHECK-NEXT: $h0 = COPY [[C]](s16)44 %0:_(s16) = G_FCONSTANT half 0xHC58045 %1:_(s16) = G_FABS %046 $h0 = COPY %1(s16)47...48---49name: test_combine_half_fabs_pos_constant50body: |51 bb.1:52 ; CHECK-LABEL: name: test_combine_half_fabs_pos_constant53 ; CHECK: [[C:%[0-9]+]]:_(s16) = G_FCONSTANT half 0xH458054 ; CHECK-NEXT: $h0 = COPY [[C]](s16)55 %0:_(s16) = G_FCONSTANT half 0xH458056 %1:_(s16) = G_FABS %057 $h0 = COPY %1(s16)58...59---60name: test_combine_float_fabs_neg_constant61body: |62 bb.1:63 liveins: $w064 ; CHECK-LABEL: name: test_combine_float_fabs_neg_constant65 ; CHECK: liveins: $w066 ; CHECK-NEXT: {{ $}}67 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 5.500000e+0068 ; CHECK-NEXT: $w0 = COPY [[C]](s32)69 %0:_(s32) = G_FCONSTANT float -5.500000e+0070 %1:_(s32) = G_FABS %071 $w0 = COPY %1(s32)72...73---74name: test_combine_float_fabs_pos_constant75body: |76 bb.1:77 liveins: $w078 ; CHECK-LABEL: name: test_combine_float_fabs_pos_constant79 ; CHECK: liveins: $w080 ; CHECK-NEXT: {{ $}}81 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 5.500000e+0082 ; CHECK-NEXT: $w0 = COPY [[C]](s32)83 %0:_(s32) = G_FCONSTANT float -5.500000e+0084 %1:_(s32) = G_FABS %085 $w0 = COPY %1(s32)86...87---88name: test_combine_double_fabs_neg_constant89body: |90 bb.1:91 liveins: $x092 ; CHECK-LABEL: name: test_combine_double_fabs_neg_constant93 ; CHECK: liveins: $x094 ; CHECK-NEXT: {{ $}}95 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 4.200000e+0096 ; CHECK-NEXT: $x0 = COPY [[C]](s64)97 %0:_(s64) = G_FCONSTANT double -4.200000e+0098 %1:_(s64) = G_FABS %099 $x0 = COPY %1(s64)100...101---102name: test_combine_double_fabs_pos_constant103body: |104 bb.1:105 liveins: $x0106 ; CHECK-LABEL: name: test_combine_double_fabs_pos_constant107 ; CHECK: liveins: $x0108 ; CHECK-NEXT: {{ $}}109 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 4.200000e+00110 ; CHECK-NEXT: $x0 = COPY [[C]](s64)111 %0:_(s64) = G_FCONSTANT double 4.200000e+00112 %1:_(s64) = G_FABS %0113 $x0 = COPY %0(s64)114...115