[llvm] [missed-opt][isel] Unnecessary shift count masking in 128 bit arithmetic (PR #172506)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 16 08:35:22 PST 2025


================
@@ -10542,6 +10542,21 @@ SDValue DAGCombiner::visitSHL(SDNode *N) {
       return DAG.getNode(ISD::SHL, DL, VT, N0, NewOp1);
   }
 
+  // fold (shl x, (and y, 63)) -> (shl x, y)
----------------
Bhuvan1527 wrote:

Yes @topperc , I also believe that it should be target dependent. There was discussion to address this in target independent, so I made an attempt to get feebacks.

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


More information about the llvm-commits mailing list