[llvm] [RISCV] Simplify (srl (and X, Mask), Const) to TH_EXTU (PR #102802)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 11 18:26:37 PDT 2024


================
@@ -1164,6 +1164,15 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
     }
 
     unsigned LShAmt = Subtarget->getXLen() - TrailingOnes;
+    if (Subtarget->hasVendorXTHeadBb() && TrailingOnes > ShAmt) {
----------------
topperc wrote:

TrailingOnes > ShAmt is always true here, it was checked on line 1142.

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


More information about the llvm-commits mailing list