This is an archive of the discontinued LLVM Phabricator instance.

[Reassociate] replace fake binop queries with 'match' API
ClosedPublic

Authored by spatel on Oct 22 2018, 3:44 PM.

Details

Summary

We need to update this code before introducing an 'fneg' instruction in IR, so we might as well kill off the integer neg/not queries too.

This is no-functional-change-intended for integer code and most vector code. For vectors, we can see that the 'match' API allows for undef elements in constants, so we optimize those cases better.

Ideally, there would be a test for each code diff, but I don't see evidence of that for the existing code, so I didn't try very hard to come up with new vector tests for each code change.

Diff Detail

Repository
rL LLVM

Event Timeline

spatel created this revision.Oct 22 2018, 3:44 PM
This revision is now accepted and ready to land.Oct 23 2018, 8:25 AM
This revision was automatically updated to reflect the committed changes.