Index: lib/Target/Hexagon/HexagonBitSimplify.cpp =================================================================== --- lib/Target/Hexagon/HexagonBitSimplify.cpp +++ lib/Target/Hexagon/HexagonBitSimplify.cpp @@ -1974,18 +1974,10 @@ return false; // Only consider 8-bit values to avoid constant-extenders. - int V; - switch (Opc) { - case Hexagon::S2_storerb_io: - V = int8_t(U); - break; - case Hexagon::S2_storerh_io: - V = int16_t(U); - break; - case Hexagon::S2_storeri_io: - V = int32_t(U); - break; - } + assert (Opc == Hexagon::S2_storerb_io || + Opc == Hexagon::S2_storerh_io || + Opc == Hexagon::S2_storeri_io); + int64_t V = U; if (!isInt<8>(V)) return false;