This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Add 2 new alignbit patterns
ClosedPublic

Authored by rampitec on Jun 26 2017, 5:13 PM.

Diff Detail

Event Timeline

rampitec created this revision.Jun 26 2017, 5:13 PM
arsenm added inline comments.Jun 26 2017, 5:16 PM
test/CodeGen/AMDGPU/alignbit-pat.ll
19

Needs negative tests with different values for the constants etc.

Also tests where src1 is a VGPR vs. SGPR

rampitec added inline comments.Jun 26 2017, 5:20 PM
test/CodeGen/AMDGPU/alignbit-pat.ll
19

I'm not sure what kind of negative test do you want to see here? Pattern is only valid in presence of "& 31", and then matches always.

arsenm added inline comments.Jun 26 2017, 5:29 PM
test/CodeGen/AMDGPU/alignbit-pat.ll
19

I mean if it was 30 or some other non-31 constant

rampitec updated this revision to Diff 104055.Jun 26 2017, 5:39 PM
rampitec marked 3 inline comments as done.

Added more tests.

vpykhtin accepted this revision.Jun 27 2017, 3:13 AM

LGTM.

This revision is now accepted and ready to land.Jun 27 2017, 3:13 AM
This revision was automatically updated to reflect the committed changes.