[PATCH] D50623: [NFC] [Hexagon] Simplify int8 truncation and validation
Kim Gräsman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 13 07:52:04 PDT 2018
kimgr updated this revision to Diff 160356.
kimgr added a comment.
Use `llvm_unreachable` to convince GCC that all is well.
https://reviews.llvm.org/D50623
Files:
lib/Target/Hexagon/HexagonBitSimplify.cpp
Index: lib/Target/Hexagon/HexagonBitSimplify.cpp
===================================================================
--- lib/Target/Hexagon/HexagonBitSimplify.cpp
+++ lib/Target/Hexagon/HexagonBitSimplify.cpp
@@ -1985,6 +1985,10 @@
case Hexagon::S2_storeri_io:
V = int32_t(U);
break;
+ default:
+ // Opc is already checked above to be one of the three store instructions.
+ // This silences a -Wuninitialized false positive on GCC 5.4.
+ llvm_unreachable("Unexpected store opcode");
}
if (!isInt<8>(V))
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50623.160356.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180813/54cb18c1/attachment.bin>
More information about the llvm-commits
mailing list