[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:47:57 PST 2026


================
@@ -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);
----------------
arichardson wrote:

Since this is always I32 this should be fine? But not familiar with XTensa.

https://github.com/llvm/llvm-project/pull/175059


More information about the llvm-commits mailing list