[LV] Fix for PR38110, LV encountered llvm_unreachable()
authorHideki Saito <hideki.saito@intel.com>
Tue, 24 Jul 2018 22:30:31 +0000 (22:30 +0000)
committerHideki Saito <hideki.saito@intel.com>
Tue, 24 Jul 2018 22:30:31 +0000 (22:30 +0000)
commitef380b0fc513897df9b036fd168f9920b00855e2
treeb3eac8fe19a6bd4bc9e8c3300c1ac9067fc6a75f
parent11eef3b3e93b7b30a85bf48d7d930c3dcbd73b10
[LV] Fix for PR38110, LV encountered llvm_unreachable()

Summary: truncateToMinimalBitWidths() doesn't handle all Instructions and the worst case is compiler crash via llvm_unreachable(). Fix is to add a case to handle PHINode and changed the worst case to NO-OP (from compiler crash).

Reviewers: sbaranga, mssimpso, hsaito

Reviewed By: hsaito

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D49461

llvm-svn: 337861
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/SystemZ/pr38110.ll [new file with mode: 0644]