[llvm-branch-commits] [llvm] [SelectionDAG] Drop unnecessary lower bound check in lowerRangeToAssertZExt (PR #196785)
Nikita Popov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun May 10 03:03:00 PDT 2026
================
@@ -16213,6 +16213,10 @@ SDValue DAGCombiner::visitAssertExt(SDNode *N) {
AssertVT == cast<VTSDNode>(N0.getOperand(1))->getVT())
return N0;
+ // fold (assert?ext c, vt) -> c
+ if (isa<ConstantSDNode>(N0))
+ return N0;
----------------
nikic wrote:
FoldConstantArithmetic() is intended to be called as part of getNode().
https://github.com/llvm/llvm-project/pull/196785
More information about the llvm-branch-commits
mailing list