aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-15 23:22:46 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-15 23:22:46 +0800
commit03859a465585d5e9dd256c7a0a2855219dc79ed3 (patch)
tree247de963fe9e7bd9fa2ce579e1eeaea686d25918 /backend/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
parent5690d6d01ce6f1ced0f02a3be3562bf163ae5f78 (diff)
downloadrcc-project-03859a465585d5e9dd256c7a0a2855219dc79ed3.tar.gz
rcc-project-03859a465585d5e9dd256c7a0a2855219dc79ed3.tar.xz
[RISCV][GlobalISel] Match LLVM constant materialization
Diffstat (limited to 'backend/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp')
-rw-r--r--backend/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp b/backend/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
index 6e4bb76..5d0be47 100644
--- a/backend/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
+++ b/backend/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
@@ -1261,7 +1261,7 @@ Expected<void> RISCVLegalizerInfo::legalizeCustom(LegalizerHelper &Helper,
if (Immediate != nullptr && Type && Type->isCategoryNeutralScalar() &&
Type->scalarBitWidth() == 64) {
auto Value = signedImmediate(*Immediate);
- if (Value && shouldUseRV64IntegerConstantPool(*Value)) {
+ if (Value && shouldUseRV64IntegerConstantPool(*Value, Subtarget.features())) {
Helper.Observer.changingInstr(Instruction);
auto Lowered = lowerConstantToPool(Instruction, Function, Target);
if (!Lowered)