This is an archive of the discontinued LLVM Phabricator instance.

[SimplifyInst] Push commuted op checks for and/or of icmp further down to avoid duplicate work
ClosedPublic

Authored by craig.topper on May 26 2017, 12:42 PM.

Details

Summary

Previously, we called simplifyPossiblyCastedAndOrOfICmps twice with the operands commuted, but the call to simplifyAndOrOfICmpsWithConstants further down already handles commuting and doesn't need to be called both ways.

This patch pushes double calls further down to just the individual routines that need to be called twice.

Diff Detail

Event Timeline

craig.topper created this revision.May 26 2017, 12:42 PM

Fix a compile failure from when I inlined simplifyPossiblyCastedAndOrOfICmps

spatel accepted this revision.May 26 2017, 2:42 PM

LGTM.

This revision is now accepted and ready to land.May 26 2017, 2:42 PM
This revision was automatically updated to reflect the committed changes.