[llvm] [X86] Remove redundant TEST after shifts when count is non-zero (PR #169069)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 21 10:04:42 PST 2025
================
@@ -3698,11 +3699,30 @@ void SelectionDAGBuilder::visitShift(const User &I, unsigned Opcode) {
if (const PossiblyExactOperator *ExactOp =
dyn_cast<const PossiblyExactOperator>(&I))
exact = ExactOp->isExact();
+
+ const Value *ShiftAmt = I.getOperand(1);
+
+ // Look through zext as computeConstantRange does not do this.
----------------
arsenm wrote:
Seems like a problem to solve there?
https://github.com/llvm/llvm-project/pull/169069
More information about the llvm-commits
mailing list