This is an archive of the discontinued LLVM Phabricator instance.

LLVM incorrectly folds xor into select
ClosedPublic

Authored by olista01 on Nov 11 2014, 1:57 AM.

Details

Reviewers
t.p.northover
Summary

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.

Diff Detail

Event Timeline

olista01 updated this revision to Diff 16030.Nov 11 2014, 1:57 AM
olista01 retitled this revision from to LLVM incorrectly folds xor into select.
olista01 updated this object.
olista01 edited the test plan for this revision. (Show Details)
olista01 set the repository for this revision to rL LLVM.
olista01 added a subscriber: Unknown Object (MLST).
t.p.northover accepted this revision.Nov 11 2014, 8:11 AM
t.p.northover added a reviewer: t.p.northover.
t.p.northover added a subscriber: t.p.northover.

Hi Oliver,

This looks fine. Go for it.

Tim.

This revision is now accepted and ready to land.Nov 11 2014, 8:11 AM
olista01 closed this revision.Nov 11 2014, 9:27 AM

Thanks, committed revision 221693.