[llvm] [InstCombine] Fold ((X << nuw Z) binop nuw Y) >>u Z --> X binop nuw (Y >>u Z) (PR #88193)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 7 07:52:43 PDT 2024


================
@@ -1259,6 +1259,50 @@ Instruction *InstCombinerImpl::visitLShr(BinaryOperator &I) {
       match(Op1, m_SpecificIntAllowPoison(BitWidth - 1)))
     return new ZExtInst(Builder.CreateIsNotNeg(X, "isnotneg"), Ty);
 
+  Value *Y;
+  if (match(Op0, m_OneUse(m_NUWSub(m_NUWShl(m_Value(X), m_Specific(Op1)),
----------------
AtariDreams wrote:

Fixed! @arsenm 

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


More information about the llvm-commits mailing list