[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
================
@@ -1143,7 +1143,7 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
unsigned Leading = XLen - llvm::bit_width(C1);
if (C2 < Leading) {
// If the number of leading zeros is C2+32 this can be SRLIW.
- if (C2 + 32 == Leading) {
+ if (C2 + 32 == Leading && Subtarget->is64Bit()) {
----------------
topperc wrote:
This should already be protected by the use of XLen in the calculation of `Leading`.
https://github.com/llvm/llvm-project/pull/69416
More information about the llvm-commits
mailing list