]> granicus.if.org Git - llvm/commit
[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)
commitfb0e1f524b50d34bcb2c8cfc71aed8eaf2055775
tree6bd5d603c4ab73c8352f6c536d3f61222e052851
parent4b606092e93c08862d60f2c57c931b48c6b6075a
[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'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309793 91177308-0d34-0410-b5e6-96231b3b80d8
test/Transforms/InstCombine/vector-casts.ll