[llvm] [XTensa] Fix implicit trunc assertion in LowerImmediate (PR #175059)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 8 11:44:42 PST 2026
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/175059
Needed since https://github.com/llvm/llvm-project/pull/171456.
>From ce1f3b2a70e4320f0e7739ec8bfa69f882b9158c Mon Sep 17 00:00:00 2001
From: Alex Richardson <alexrichardson at google.com>
Date: Thu, 8 Jan 2026 11:44:12 -0800
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.8-beta.1
---
llvm/lib/Target/Xtensa/XtensaISelLowering.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Target/Xtensa/XtensaISelLowering.cpp b/llvm/lib/Target/Xtensa/XtensaISelLowering.cpp
index 85d36327b5fc4..64047a8a09d7e 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::get(Ty, Value, /*ImplicitTrunc=*/true);
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