[llvm] [SPIR-V] Fix 64-bit integer literal printing (PR #66686)
Nathan Gauër via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 19 05:17:51 PDT 2023
================
@@ -169,7 +169,9 @@ void SPIRVInstPrinter::printInst(const MCInst *MI, uint64_t Address,
}
case SPIRV::OpConstantI:
case SPIRV::OpConstantF:
- printOpConstantVarOps(MI, NumFixedOps, OS);
+ // The last fixed operand along with any variadic operands that follow
+ // are part of the variable value.
+ printOpConstantVarOps(MI, NumFixedOps - 1, OS);
----------------
Keenuts wrote:
Took a quick look at the MCInst builder.
Seems like the 64-bit integer is decomposed into 2 operands for the MCInstBuilder. But is that required?
Seems like the immediate could be a 64-bit int, so we wouldn't have to handle this split/merge.
Have you looked at this? (not sure how usable it would be as it stores a signed 64-bit, not unsigned).
https://github.com/llvm/llvm-project/pull/66686
More information about the llvm-commits
mailing list