Skip to content

Commit 85bf0a6

Browse files
authored
[CodeGen] Fix PreISelLowering not reporting changes (#102184)
expandVectorPredication may change code, even if the intrinsic itself remains in the code. Report changes whenever such an intrinsic is encountered, because code could have been changed. Another follow-up fix for #101652 to fix expensive-checks-only failure.
1 parent 31a999c commit 85bf0a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,14 @@ bool PreISelIntrinsicLowering::lowerIntrinsics(Module &M) const {
357357
#define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS) \
358358
case Intrinsic::VPID:
359359
#include "llvm/IR/VPIntrinsics.def"
360-
Changed |= forEachCall(F, [&](CallInst *CI) {
360+
forEachCall(F, [&](CallInst *CI) {
361361
Function *Parent = CI->getParent()->getParent();
362362
const TargetTransformInfo &TTI = LookupTTI(*Parent);
363363
auto *VPI = cast<VPIntrinsic>(CI);
364364
return expandVectorPredicationIntrinsic(*VPI, TTI);
365365
});
366+
// Not all intrinsics are removed, but the code is changed in any case.
367+
Changed = true;
366368
break;
367369
case Intrinsic::objc_autorelease:
368370
Changed |= lowerObjCCall(F, "objc_autorelease");

0 commit comments

Comments
 (0)