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: fconstant_to_constant_s32 7alignment: 4 8tracksRegLiveness: true 9frameInfo: 10 maxAlignment: 1 11machineFunctionInfo: {} 12body: | 13 bb.0: 14 liveins: $x0 15 ; Only feeding into stores here. Also, the value can't be materialized using 16 ; fmov, so it's strictly better to use a mov. 17 ; CHECK-LABEL: name: fconstant_to_constant_s32 18 ; CHECK: liveins: $x0 19 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0 20 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1028443341 21 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 524 22 ; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C1]](s64) 23 ; CHECK: G_STORE [[C]](s32), [[PTR_ADD]](p0) :: (store 4) 24 ; CHECK: RET_ReallyLR 25 %0:_(p0) = COPY $x0 26 %3:_(s32) = G_FCONSTANT float 0x3FA99999A0000000 27 %1:_(s64) = G_CONSTANT i64 524 28 %2:_(p0) = G_PTR_ADD %0, %1(s64) 29 G_STORE %3(s32), %2(p0) :: (store 4) 30 RET_ReallyLR 31... 32--- 33name: fconstant_to_constant_s64 34alignment: 4 35tracksRegLiveness: true 36frameInfo: 37 maxAlignment: 1 38machineFunctionInfo: {} 39body: | 40 bb.0: 41 liveins: $x0 42 ; CHECK-LABEL: name: fconstant_to_constant_s64 43 ; CHECK: liveins: $x0 44 ; CHECK: %ptr:_(p0) = COPY $x0 45 ; CHECK: %c:_(s64) = G_CONSTANT i64 0 46 ; CHECK: G_STORE %c(s64), %ptr(p0) :: (store 8) 47 ; CHECK: RET_ReallyLR 48 %ptr:_(p0) = COPY $x0 49 %c:_(s64) = G_FCONSTANT double 0.0 50 G_STORE %c(s64), %ptr(p0) :: (store 8) 51 RET_ReallyLR 52... 53--- 54name: no_store_means_no_combine 55alignment: 4 56tracksRegLiveness: true 57frameInfo: 58 maxAlignment: 1 59machineFunctionInfo: {} 60body: | 61 bb.0: 62 liveins: $x0, $x1 63 ; When we aren't feeding into a store, the combine shouldn't happen. 64 ; CHECK-LABEL: name: no_store_means_no_combine 65 ; CHECK: liveins: $x0, $x1 66 ; CHECK: %v:_(s64) = COPY $x0 67 ; CHECK: %c:_(s64) = G_FCONSTANT double 0.000000e+00 68 ; CHECK: %add:_(s64) = G_FADD %v, %c 69 ; CHECK: RET_ReallyLR implicit %add(s64) 70 %v:_(s64) = COPY $x0 71 %c:_(s64) = G_FCONSTANT double 0.0 72 %add:_(s64) = G_FADD %v, %c 73 RET_ReallyLR implicit %add 74... 75