[llvm] [Instcombine] Fold away shift in or reduction chain. (PR #137875)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 30 00:49:53 PDT 2025


================
@@ -5046,6 +5046,29 @@ static Instruction *foldICmpOrXX(ICmpInst &I, const SimplifyQuery &Q,
   return nullptr;
 }
 
+static Value *foldShiftAwayFromOrChain(Instruction &I,
+                                       InstCombiner::BuilderTy &Builder) {
+  if (I.getOpcode() != Instruction::Or)
----------------
dtcxzyw wrote:

Missing one-use check.

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


More information about the llvm-commits mailing list