Fix for PR32740 - Invalid floating type, unreachable between r300969 and r301029
authorArtur Pilipenko <apilipenko@azulsystems.com>
Sat, 22 Apr 2017 07:24:52 +0000 (07:24 +0000)
committerArtur Pilipenko <apilipenko@azulsystems.com>
Sat, 22 Apr 2017 07:24:52 +0000 (07:24 +0000)
commit0632bdc6483dabd0f37134cc8d69bc102e93b213
treeafb331dd1572163310db4612953f000b15aea825
parent5e113742e7f02c276e5a3c9d241c181e6d6ec7ff
Fix for PR32740 - Invalid floating type, unreachable between r300969 and r301029

The bug was introduced by r301018 "[InstCombine] fadd double (sitofp x), y check that the promotion is valid". The patch didn't expect that fadd can be on vectors not necessarily scalars. Add vector support along with the test.

llvm-svn: 301070
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/test/Transforms/InstCombine/add-sitofp.ll