[llvm] 85bf0a6 - [CodeGen] Fix PreISelLowering not reporting changes (#102184)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 10:30:45 PDT 2024
Author: Alexis Engelke
Date: 2024-08-06T19:30:42+02:00
New Revision: 85bf0a6b44b9fd375027f5643fa6698001badcf4
URL: https://github.com/llvm/llvm-project/commit/85bf0a6b44b9fd375027f5643fa6698001badcf4
DIFF: https://github.com/llvm/llvm-project/commit/85bf0a6b44b9fd375027f5643fa6698001badcf4.diff
LOG: [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.
Added:
Modified:
llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
index 6418c54f0b18f..0d3dd650b8ee6 100644
--- a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
+++ b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
@@ -357,12 +357,14 @@ bool PreISelIntrinsicLowering::lowerIntrinsics(Module &M) const {
#define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS) \
case Intrinsic::VPID:
#include "llvm/IR/VPIntrinsics.def"
- Changed |= forEachCall(F, [&](CallInst *CI) {
+ forEachCall(F, [&](CallInst *CI) {
Function *Parent = CI->getParent()->getParent();
const TargetTransformInfo &TTI = LookupTTI(*Parent);
auto *VPI = cast<VPIntrinsic>(CI);
return expandVectorPredicationIntrinsic(*VPI, TTI);
});
+ // Not all intrinsics are removed, but the code is changed in any case.
+ Changed = true;
break;
case Intrinsic::objc_autorelease:
Changed |= lowerObjCCall(F, "objc_autorelease");
More information about the llvm-commits
mailing list