[X86] Improve optimizeCompareInstr for signed comparisons after AND/OR/XOR instructions
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 7 Apr 2021 13:07:35 +0000 (14:07 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 7 Apr 2021 13:28:42 +0000 (14:28 +0100)
commit302e7480655b0d1c1a3a629b4ef446bf77dcb01a
tree39da58cb37dfb4635ca8d11c2f1eae0e4fed448f
parenta78e86e6beb2d62196fa42be9f4a2994823f71f3
[X86] Improve optimizeCompareInstr for signed comparisons after AND/OR/XOR instructions

Extend D94856 to handle 'and', 'or' and 'xor' instructions as well

We still fail on many i8/i16 cases as the test and the logic-op are performed on different widths
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/test/CodeGen/X86/and-with-overflow.ll
llvm/test/CodeGen/X86/or-with-overflow.ll
llvm/test/CodeGen/X86/xor-with-overflow.ll