[InstCombine] change select type to eliminate bitcasts
authorSanjay Patel <spatel@rotateright.com>
Sat, 3 Dec 2016 15:25:16 +0000 (15:25 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sat, 3 Dec 2016 15:25:16 +0000 (15:25 +0000)
commitb7f8cb698c3d34a1503400eea8ea68740c495dac
tree816700efb3265bff9d00b8f445d909e18b0bce03
parentbbcf74f5856003f3b78859ca0b392db6d37650f8
[InstCombine] change select type to eliminate bitcasts

This solves a secondary problem seen in PR6137:
https://llvm.org/bugs/show_bug.cgi?id=6137#c6

This is similar to the bitwise logic op fold added with:
https://reviews.llvm.org/rL287707

And like that patch, I'm artificially restricting the
transform from vector <-> scalar types until we're sure
that the backend can handle that.

llvm-svn: 288584
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/test/Transforms/InstCombine/bitcast.ll