[llvm] [AggressiveInstCombine] Ignore debug instructions when load combining (PR #70200)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 25 06:08:32 PDT 2023
================
@@ -701,12 +701,21 @@ static bool foldLoadsRecursive(Value *V, LoadOps &LOps, const DataLayout &DL,
Loc = Loc.getWithNewSize(LOps.LoadSize);
} else
Loc = MemoryLocation::get(End);
+
+ // Ignore debug info (and other "AssumeLike" intrinsics) so that's not counted
+ // against MaxInstrsToScan. Otherwise debug info could affect codegen.
+ auto IsAssumeLikeIntr = [](const Instruction &I) {
+ if (auto *II = dyn_cast<IntrinsicInst>(&I))
+ return II->isAssumeLikeIntrinsic();
----------------
nikic wrote:
Please check for DbgInfoIntrinsic only.
https://github.com/llvm/llvm-project/pull/70200
More information about the llvm-commits
mailing list