[llvm] [CodeGen] Merge lowerConstantIntrinsics into pre-isel lowering (PR #97727)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 02:21:10 PDT 2024
================
@@ -285,6 +311,16 @@ bool PreISelIntrinsicLowering::lowerIntrinsics(Module &M) const {
case Intrinsic::load_relative:
Changed |= lowerLoadRelative(F);
break;
+ case Intrinsic::is_constant:
+ case Intrinsic::objectsize:
+ Changed |= forEachCall(F, [&](CallInst *CI) {
+ Function *Parent = CI->getParent()->getParent();
+ TargetLibraryInfo &TLI = LookupTLI(*Parent);
+ bool Changed = lowerConstantIntrinsics(*Parent, TLI, /*DT=*/nullptr);
+ assert(Changed && "lowerConstantIntrinsics did not lower intrinsic");
----------------
aengelke wrote:
Good catch! Opened #102442 to remove the assertion and add a test case.
https://github.com/llvm/llvm-project/pull/97727
More information about the llvm-commits
mailing list