37 lines · plain
1; RUN: llc -mtriple=arm64--- -stop-after=finalize-isel -o - %s | FileCheck %s2 3; Check that we ignore the zeroext attribute on the return type of the tail4; call, since the return value is unused. This happens during CodeGenPrepare in5; dupRetToEnableTailCallOpts, which calls attributesPermitTailCall to check if6; the attributes of the caller and the callee match.7 8declare zeroext i1 @zcallee()9define void @zcaller(i1 %arg) {10; CHECK-LABEL: name: zcaller11entry:12 br i1 %arg, label %calllabel, label %retlabel13calllabel:14; CHECK: bb.1.calllabel:15; CHECK-NOT: BL @zcallee16; CHECK-NEXT: TCRETURNdi @zcallee17 %unused_result = tail call zeroext i1 @zcallee()18 br label %retlabel19retlabel:20 ret void21}22 23declare signext i1 @scallee()24define void @scaller(i1 %arg) {25; CHECK-LABEL: name: scaller26entry:27 br i1 %arg, label %calllabel, label %retlabel28calllabel:29; CHECK: bb.1.calllabel:30; CHECK-NOT: BL @scallee31; CHECK-NEXT: TCRETURNdi @scallee32 %unused_result = tail call signext i1 @scallee()33 br label %retlabel34retlabel:35 ret void36}37