[llvm] 8853caf - [Xtensa] Fix implicit trunc assertion in LowerImmediate
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 8 22:12:44 PST 2026
Author: Alexander Richardson
Date: 2026-01-08T22:12:40-08:00
New Revision: 8853caf94eba0bd331d723f3b531faee5f39d7e5
URL: https://github.com/llvm/llvm-project/commit/8853caf94eba0bd331d723f3b531faee5f39d7e5
DIFF: https://github.com/llvm/llvm-project/commit/8853caf94eba0bd331d723f3b531faee5f39d7e5.diff
LOG: [Xtensa] Fix implicit trunc assertion in LowerImmediate
Needed since https://github.com/llvm/llvm-project/pull/171456.
Pull Request: https://github.com/llvm/llvm-project/pull/175059
Added:
Modified:
llvm/lib/Target/Xtensa/XtensaISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Xtensa/XtensaISelLowering.cpp b/llvm/lib/Target/Xtensa/XtensaISelLowering.cpp
index 85d36327b5fc4..5a250efc84bb8 100644
--- a/llvm/lib/Target/Xtensa/XtensaISelLowering.cpp
+++ b/llvm/lib/Target/Xtensa/XtensaISelLowering.cpp
@@ -964,7 +964,7 @@ SDValue XtensaTargetLowering::LowerImmediate(SDValue Op,
isShiftedInt<8, 8>(Value))
return Op;
Type *Ty = Type::getInt32Ty(*DAG.getContext());
- Constant *CV = ConstantInt::get(Ty, Value);
+ Constant *CV = ConstantInt::getSigned(Ty, Value);
SDValue CP = DAG.getConstantPool(CV, MVT::i32);
SDValue Res =
DAG.getLoad(MVT::i32, DL, DAG.getEntryNode(), CP, MachinePointerInfo());
More information about the llvm-commits
mailing list