The patch fixes gcc's warning in SPIRVUtils.cpp after D142532.
Also it fixes compilation error by MSVC in SPIRVBuiltins.cpp.
Differential Revision: https://reviews.llvm.org/D142937
SPIRV::Decoration::SaturatedConversion, {});
if (Builtin->IsRounded)
buildOpDecorate(Call->ReturnRegister, MIRBuilder,
- SPIRV::Decoration::FPRoundingMode, {Builtin->RoundingMode});
+ SPIRV::Decoration::FPRoundingMode,
+ {(unsigned)Builtin->RoundingMode});
unsigned Opcode = SPIRV::OpNop;
if (GR->isScalarOrVectorOfType(Call->Arguments[0], SPIRV::OpTypeInt)) {
case AtomicOrdering::NotAtomic:
return SPIRV::MemorySemantics::None;
}
+ llvm_unreachable(nullptr);
}
MachineInstr *getDefInstrMaybeConstant(Register &ConstReg,