[InstCombine] Add test cases for 'or' and 'xor' to match the vector 'and' of 'sext...
authorCraig Topper <craig.topper@intel.com>
Wed, 2 Aug 2017 06:35:15 +0000 (06:35 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 2 Aug 2017 06:35:15 +0000 (06:35 +0000)
commit35427e64312136dcb6c4d1fe2ed0f5ae29c2b35c
treeb83bbde4be11c2de010b99e9ea3189fccd7bdd50
parent9952d95921f0d609e81aed7e5c7ddbb80a4bc132
[InstCombine] Add test cases for 'or' and 'xor' to match the vector 'and' of 'sext' of 'cmp' test.

When the 'and' test was originally added it was intended to make sure we didn't change it to a sext of and of cmp. But since then the test was changed to expect it to be turned into 'select cmp1, sext cmp2, 0'. Then another optimization was added to turn the select into 'sext (and cmp1, cmp2)' which is exactly the transformation that was being blocked when the test case started.

Looks like 'or' gets optimized in a similar way, but not 'xor'.

llvm-svn: 309793
llvm/test/Transforms/InstCombine/vector-casts.ll