[llvm] [InstSimplify] Do not simplify a multi-use freeze in `simplifyWithOpReplaced` (PR #91215)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 23:17:30 PDT 2024


================
@@ -4312,6 +4312,10 @@ static Value *simplifyWithOpReplaced(Value *V, Value *Op, Value *RepOp,
   if (match(I, m_Intrinsic<Intrinsic::is_constant>()))
     return nullptr;
 
+  // Don't simplify a use of a multi-use freeze.
+  if (isa<FreezeInst>(I) && !I->hasOneUse())
----------------
dtcxzyw wrote:

Done.

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


More information about the llvm-commits mailing list