[llvm] r221693 - LLVM incorrectly folds xor into select

Matt Arsenault arsenm2 at gmail.com
Tue Nov 11 19:27:57 PST 2014


> On Nov 11, 2014, at 9:36 AM, Oliver Stannard <oliver.stannard at arm.com> wrote:
> 
> LLVM replaces the SelectionDAG pattern (xor (set_cc cc x y) 1) with
> (set_cc !cc x y), which is only correct when the xor has type i1.
> Instead, we should check that the constant operand to the xor is all
> ones.

I think this is correct depending on the target’s BooleanContents, not just the setcc type. This should probably be checking the constant used for true depending on it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141111/30dd19cb/attachment.html>


More information about the llvm-commits mailing list