This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] Don't create a constant to look for a constant. Just see if we have a constant and check its value
AbandonedPublic

Authored by craig.topper on Mar 30 2017, 2:37 PM.

Details

Summary

The code here was creating a signbit constant to do a pattern match. But creating a constant isn't free due to the uniqueing. So its more efficient to just see if a constant is being used and see if its the constant we're interested in.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 30 2017, 2:37 PM
craig.topper abandoned this revision.Mar 30 2017, 3:26 PM

Now I see we already have an m_SignBit which makes this change much more obvious.