[PATCH] D50623: [NFC] [Hexagon] Simplify int8 truncation and validation

Krzysztof Parzyszek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 13 08:09:17 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL339576: [Hexagon] Silence -Wuninitialized warning from GCC 5.4, NFC (authored by kparzysz, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D50623?vs=160356&id=160359#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D50623

Files:
  llvm/trunk/lib/Target/Hexagon/HexagonBitSimplify.cpp


Index: llvm/trunk/lib/Target/Hexagon/HexagonBitSimplify.cpp
===================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonBitSimplify.cpp
+++ llvm/trunk/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.160359.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180813/872dbd64/attachment.bin>


More information about the llvm-commits mailing list