[llvm] Add RV64 constraint to SRLIW (PR #69416)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 21:25:04 PDT 2023


================
@@ -955,7 +955,7 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
 
     // Optimize (shl (and X, C2), C) -> (slli (srliw X, C3), C3+C) where C2 has
     // 32 leading zeros and C3 trailing zeros.
-    if (ShAmt <= 32 && isShiftedMask_64(Mask)) {
+    if (ShAmt <= 32 && isShiftedMask_64(Mask) && Subtarget->is64Bit()) {
----------------
topperc wrote:

This is already protected by the use of XLen on line 960

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


More information about the llvm-commits mailing list