This is an archive of the discontinued LLVM Phabricator instance.

Avoid creating duplicate ANDs in SelectionDAG.
ClosedPublic

Authored by jgalenson on Aug 14 2017, 12:16 PM.

Details

Summary

When expanding a BRCOND into a BR_CC, do not create an AND 1 if one already exists.

Diff Detail

Event Timeline

jgalenson created this revision.Aug 14 2017, 12:16 PM
rengolin added a subscriber: rovka.
john.brawn added inline comments.Aug 16 2017, 7:45 AM
test/CodeGen/ARM/wide-compares.ll
39–44

This looks strange - in latest trunk the test is already expecting a bge here. In fact according to svn log wide-compares.ll hasn't changed since the initial commit which already expected bge. Are you sure this patch is for trunk llvm?

jgalenson added inline comments.Aug 16 2017, 8:47 AM
test/CodeGen/ARM/wide-compares.ll
39–44

Ah, yes, my apologies. This patch is a follow-up to https://reviews.llvm.org/D35821, which has been LGTMed but not yet committed. That patch regresses this test, so we decided to ask whether we wanted to fix it with this patch.

This revision is now accepted and ready to land.Aug 17 2017, 9:54 AM
rengolin closed this revision.Aug 22 2017, 4:04 AM