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

Wang Yaduo via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 19:59:35 PDT 2024


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

Thanks! done

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


More information about the llvm-commits mailing list