[llvm] [SPIR-V] Fix 64-bit integer literal printing (PR #66686)
Natalie Chouinard via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 19 07:34:09 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);
----------------
sudonatalie wrote:
That was my original approach in https://reviews.llvm.org/D159376, but I ultimately decided it wasn't as appropriate. While it's not strictly required, keeping the operands one-word each more accurately represents the SPIR-V code (which I think is the intention at that stage of lowering) and there is logic in the serialized binary printer that depends on that assumption.
https://github.com/llvm/llvm-project/pull/66686
More information about the llvm-commits
mailing list