34 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple aarch64 -run-pass=aarch64-postlegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s3 4...5---6name: dont_combine_ptr_add7legalized: true8tracksRegLiveness: true9body: |10 bb.0:11 liveins: $x0, $x1, $x212 13 ; G_PTR_ADD can become a madd, so we don't want to perform the combine.14 15 ; CHECK-LABEL: name: dont_combine_ptr_add16 ; CHECK: liveins: $x0, $x1, $x217 ; CHECK-NEXT: {{ $}}18 ; CHECK-NEXT: %reg0:_(s64) = COPY $x019 ; CHECK-NEXT: %reg1:_(s64) = COPY $x120 ; CHECK-NEXT: %ptr:_(p0) = COPY $x221 ; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 622 ; CHECK-NEXT: %mul:_(s64) = nsw G_MUL %reg0, %cst23 ; CHECK-NEXT: %ptr_add:_(p0) = G_PTR_ADD %ptr, %mul(s64)24 ; CHECK-NEXT: $x0 = COPY %ptr_add(p0)25 ; CHECK-NEXT: RET_ReallyLR implicit $x026 %reg0:_(s64) = COPY $x027 %reg1:_(s64) = COPY $x128 %ptr:_(p0) = COPY $x229 %cst:_(s64) = G_CONSTANT i64 630 %mul:_(s64) = nsw G_MUL %reg0, %cst31 %ptr_add:_(p0) = G_PTR_ADD %ptr, %mul32 $x0 = COPY %ptr_add(p0)33 RET_ReallyLR implicit $x034