aboutsummaryrefslogtreecommitdiff
path: root/backend/lib
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-12 02:26:15 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-12 02:26:15 +0800
commit5ee4740bc864a8aaddb50e8e7a43cb5a18df0fcf (patch)
tree13770500cd8f0b55d73c5b2eedee5c4a0312c314 /backend/lib
parent33c887caf02b28fd45cf7cf966537e123081ff53 (diff)
downloadrcc-project-5ee4740bc864a8aaddb50e8e7a43cb5a18df0fcf.tar.gz
rcc-project-5ee4740bc864a8aaddb50e8e7a43cb5a18df0fcf.tar.xz
[RISCV] Legalize G_PTR_ADD with s64 offsets
Diffstat (limited to 'backend/lib')
-rw-r--r--backend/lib/Target/RISCV/RISCVCodeGen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/lib/Target/RISCV/RISCVCodeGen.cpp b/backend/lib/Target/RISCV/RISCVCodeGen.cpp
index 2dd5ee4..d03653f 100644
--- a/backend/lib/Target/RISCV/RISCVCodeGen.cpp
+++ b/backend/lib/Target/RISCV/RISCVCodeGen.cpp
@@ -3870,8 +3870,8 @@ public:
const std::optional<LLT> Pointer = operandType(Function, Instruction, 1);
const std::optional<LLT> Offset = operandType(Function, Instruction, 2);
return Type && Pointer && Offset && Type->isPointer() && Type->addressSpace() == 0 &&
- Type->scalarBitWidth() == 64 && *Pointer == *Type && Offset->isInteger() &&
- Offset->scalarBitWidth() == 64
+ Type->scalarBitWidth() == 64 && *Pointer == *Type &&
+ isSupportedIntegerScalar(*Offset) && Offset->scalarBitWidth() == 64
? LegalizationAction::Legal
: LegalizationAction::Unsupported;
}