================
@@ -2540,8 +2540,12 @@ void AMDGPUOperand::addLiteralImmOperand(MCInst &Inst, 
int64_t Val, bool ApplyMo
     // truncated to uint32_t), if the target doesn't support 64-bit literals, 
or
     // the lit modifier is explicitly used, we need to truncate it to the 32
     // LSBs.
-    if (!AsmParser->has64BitLiterals() || Lit == LitModifier::Lit)
+    if (!AsmParser->has64BitLiterals() || Lit == LitModifier::Lit) {
+      if (!isInt<32>(Val) && !isUInt<32>(Val))
+        const_cast<AMDGPUAsmParser *>(AsmParser)->Error(
+            Inst.getLoc(), "invalid literal value");
----------------
rampitec wrote:

Ok

https://github.com/llvm/llvm-project/pull/197803
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to