[llvm] [SDAG] fix miss opt: shl nuw + zext adds unnecessary masking (PR #172046)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 12 22:40:06 PST 2025
================
@@ -1572,6 +1572,9 @@ SDValue SelectionDAG::getZeroExtendInReg(SDValue Op, const SDLoc &DL, EVT VT) {
assert(VT.bitsLE(OpVT) && "Not extending!");
if (OpVT == VT)
return Op;
+ if (Op.getOpcode() == ISD::AssertZext &&
----------------
topperc wrote:
DAGCombiner should be able to remove this on its own. Is that not working?
https://github.com/llvm/llvm-project/pull/172046
More information about the llvm-commits
mailing list