[llvm] [SPIRV] Fix code quality issues. (PR #152005)
Marcos Maronas via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 5 07:48:15 PDT 2025
================
@@ -474,6 +474,7 @@ Register SPIRVGlobalRegistry::getOrCreateBaseRegister(
}
if (Type->getOpcode() == SPIRV::OpTypeFloat) {
SPIRVType *SpvBaseType = getOrCreateSPIRVFloatType(BitWidth, I, TII);
+ assert(isa<ConstantFP>(Val) && "Expected ConstantFP for OpTypeFloat");
return getOrCreateConstFP(dyn_cast<ConstantFP>(Val)->getValue(), I,
----------------
maarquitos14 wrote:
Makes sense.
https://github.com/llvm/llvm-project/pull/152005
More information about the llvm-commits
mailing list