[llvm] [LoopIdiom] Don't convert `memset.inline` into `memset` (PR #227650)

Ömer Sinan Ağacan via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 04:28:16 PDT 2026


================
@@ -1096,6 +1099,10 @@ bool LoopIdiomRecognize::processLoopStridedStore(
     Value *StoredVal, Instruction *TheStore,
     SmallPtrSetImpl<Instruction *> &Stores, const SCEVAddRecExpr *Ev,
     const SCEV *BECount, bool IsNegStride, bool IsLoopMemset) {
+  // The same check as in `processLoopStoreOfLoopLoad`, see the comments there.
+  if (auto *MSI = dyn_cast<MemSetInst>(TheStore); MSI && MSI->isForceInlined())
+    return false;
+
----------------
osa1 wrote:

Done, PTAL.

https://github.com/llvm/llvm-project/pull/227650


More information about the llvm-commits mailing list