D47980 will canonicalize the x << (32 - y) >> (32 - y),
which is the pattern the AMDGPU expects to x & (-1 >> (32 - y)),
which is not recognized by AMDGPU.
Thus, it needs to be recognized, too.
Paths
| Differential D48007
[AMDGPU] Recognize x & (-1 >> (32 - y)) pattern. ClosedPublic Authored by lebedev.ri on Jun 11 2018, 3:59 AM.
Details Summary D47980 will canonicalize the x << (32 - y) >> (32 - y), Thus, it needs to be recognized, too.
Diff Detail
Event TimelineHerald added subscribers: t-tye, tpr, dstuttard and 4 others. · View Herald TranscriptJun 11 2018, 3:59 AM lebedev.ri added a child revision: D47980: [InstCombine] Fold (x << y) >> y -> x & (-1 >> y).Jun 11 2018, 3:59 AM lebedev.ri added a parent revision: D48005: [NFC][AMDGPU] Add tests for all the various IR patterns equivalent to extracting low bits.. This revision is now accepted and ready to land.Jun 11 2018, 8:03 AM lebedev.ri mentioned this in D47980: [InstCombine] Fold (x << y) >> y -> x & (-1 >> y).Jun 11 2018, 8:05 AM Comment Actions
Thank you for the review! Closed by commit rL334815: [AMDGPU] Recognize x & (-1 >> (32 - y)) pattern. (authored by lebedevri). · Explain WhyJun 15 2018, 3:01 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 150703 lib/Target/AMDGPU/AMDGPUInstructions.td
test/CodeGen/AMDGPU/extract-lowbits.ll
|