1 ; RUN: llc -mtriple=arm64--- -stop-after=finalize-isel -o - %s | FileCheck %s
3 ; Check that we ignore the zeroext attribute on the return type of the tail
4 ; call, since the return value is unused. This happens during CodeGenPrepare in
5 ; dupRetToEnableTailCallOpts, which calls attributesPermitTailCall to check if
6 ; the attributes of the caller and the callee match.
8 declare zeroext i1 @zcallee()
9 define void @zcaller() {
10 ; CHECK-LABEL: name: zcaller
12 br i1 undef, label %calllabel, label %retlabel
14 ; CHECK: bb.1.calllabel:
15 ; CHECK-NOT: BL @zcallee
16 ; CHECK-NEXT: TCRETURNdi @zcallee
17 %unused_result = tail call zeroext i1 @zcallee()
23 declare signext i1 @scallee()
24 define void @scaller() {
25 ; CHECK-LABEL: name: scaller
27 br i1 undef, label %calllabel, label %retlabel
29 ; CHECK: bb.1.calllabel:
30 ; CHECK-NOT: BL @scallee
31 ; CHECK-NEXT: TCRETURNdi @scallee
32 %unused_result = tail call signext i1 @scallee()