[PATCH] D142937: [SPIRV][NFC] fix build warning in SPIRVUtils.cpp
Ilia Diachkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 14:37:41 PST 2023
iliya-diyachkov updated this revision to Diff 494073.
iliya-diyachkov added a comment.
Fix the MSVC build issue as suggested by Michal.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142937/new/
https://reviews.llvm.org/D142937
Files:
llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
llvm/lib/Target/SPIRV/SPIRVUtils.cpp
Index: llvm/lib/Target/SPIRV/SPIRVUtils.cpp
===================================================================
--- llvm/lib/Target/SPIRV/SPIRVUtils.cpp
+++ llvm/lib/Target/SPIRV/SPIRVUtils.cpp
@@ -208,6 +208,7 @@
case AtomicOrdering::NotAtomic:
return SPIRV::MemorySemantics::None;
}
+ llvm_unreachable(nullptr);
}
MachineInstr *getDefInstrMaybeConstant(Register &ConstReg,
Index: llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
===================================================================
--- llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
+++ llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
@@ -1733,7 +1733,8 @@
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)) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142937.494073.patch
Type: text/x-patch
Size: 1071 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230201/86df2622/attachment.bin>
More information about the llvm-commits
mailing list