[llvm] [RISCV] Reverse (add x, (zext c)) back to (select c, (add x, 1), x) (PR #87236)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 1 11:07:36 PDT 2024
================
@@ -52,12 +52,60 @@ class RISCVCodeGenPrepare : public FunctionPass,
}
bool visitInstruction(Instruction &I) { return false; }
+ bool visitBinaryOperator(BinaryOperator &BO);
bool visitAnd(BinaryOperator &BO);
bool visitIntrinsicInst(IntrinsicInst &I);
};
} // end anonymous namespace
+/// InstCombine will canonicalize selects of binary ops where the identity is
----------------
topperc wrote:
Why does this need to be done on IR instead of SelectionDAG?
https://github.com/llvm/llvm-project/pull/87236
More information about the llvm-commits
mailing list