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

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 03:58:42 PDT 2026


=?utf-8?q?Ömer_Sinan_Ağacan?= <omer at osa1.net>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/227650 at github.com>


================
@@ -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;
+
----------------
artagnon wrote:

Should have a test exercising this new code?

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


More information about the llvm-commits mailing list