90 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 52# RUN: llc -mtriple aarch64-none-elf -run-pass=block-placement -O3 -o - %s | FileCheck %s3# RUN: llc -mtriple aarch64-none-elf -passes='require<profile-summary>,function(machine-function(block-placement))' -O3 -o - %s | FileCheck %s4 5## Check that block-placement does not perform tail duplication on the6## PAUTH_EPILOGUE instruction. If that happened, the two prologues would use7## different addresses while calculating the return address signature, so the8## epilogue could only be correct for (at most) one of them.9 10--- |11 define void @test() "frame-pointer"="non-leaf" {12 entry:13 ret void14 }15 16 declare void @f()17...18---19name: test20body: |21 ; CHECK-LABEL: name: test22 ; CHECK: bb.0.entry:23 ; CHECK-NEXT: successors: %bb.1(0x30000000), %bb.2(0x50000000)24 ; CHECK-NEXT: liveins: $w0, $w1, $lr25 ; CHECK-NEXT: {{ $}}26 ; CHECK-NEXT: CBZW renamable $w0, %bb.127 ; CHECK-NEXT: {{ $}}28 ; CHECK-NEXT: bb.2:29 ; CHECK-NEXT: successors: %bb.3(0x80000000)30 ; CHECK-NEXT: liveins: $w0, $w1, $lr31 ; CHECK-NEXT: {{ $}}32 ; CHECK-NEXT: B %bb.333 ; CHECK-NEXT: {{ $}}34 ; CHECK-NEXT: bb.1:35 ; CHECK-NEXT: successors: %bb.3(0x80000000)36 ; CHECK-NEXT: liveins: $w1, $lr37 ; CHECK-NEXT: {{ $}}38 ; CHECK-NEXT: renamable $w8 = MOVZWi 1, 039 ; CHECK-NEXT: {{ $}}40 ; CHECK-NEXT: bb.3:41 ; CHECK-NEXT: successors: %bb.5(0x30000000), %bb.4(0x50000000)42 ; CHECK-NEXT: liveins: $w1, $w8, $lr43 ; CHECK-NEXT: {{ $}}44 ; CHECK-NEXT: frame-setup PAUTH_PROLOGUE implicit-def $lr, implicit killed $lr, implicit $sp45 ; CHECK-NEXT: CBZW killed renamable $w1, %bb.546 ; CHECK-NEXT: {{ $}}47 ; CHECK-NEXT: bb.4:48 ; CHECK-NEXT: successors: %bb.5(0x80000000)49 ; CHECK-NEXT: {{ $}}50 ; CHECK-NEXT: BL @f, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp51 ; CHECK-NEXT: {{ $}}52 ; CHECK-NEXT: bb.5:53 ; CHECK-NEXT: BL @f, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp54 ; CHECK-NEXT: frame-destroy PAUTH_EPILOGUE implicit-def $lr, implicit killed $lr, implicit $sp55 ; CHECK-NEXT: TCRETURNdi @f, 0, csr_aarch64_aapcs, implicit $sp56 bb.0.entry:57 successors: %bb.1(0x30000000), %bb.2(0x50000000)58 liveins: $w0, $w1, $lr59 60 CBNZW renamable $w0, %bb.261 62 bb.1:63 successors: %bb.3(0x80000000)64 liveins: $w1, $lr65 66 renamable $w8 = MOVZWi 1, 067 B %bb.368 69 bb.2:70 successors: %bb.3(0x80000000)71 liveins: $w0, $w1, $lr72 73 bb.3:74 successors: %bb.5(0x30000000), %bb.4(0x50000000)75 liveins: $w1, $w8, $lr76 77 frame-setup PAUTH_PROLOGUE implicit-def $lr, implicit killed $lr, implicit $sp78 CBZW killed renamable $w1, %bb.579 80 bb.4:81 successors: %bb.5(0x80000000)82 83 BL @f, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp84 85 bb.5:86 BL @f, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp87 frame-destroy PAUTH_EPILOGUE implicit-def $lr, implicit killed $lr, implicit $sp88 TCRETURNdi @f, 0, csr_aarch64_aapcs, implicit $sp89...90