This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Recognize x & ((1 << y) - 1) pattern.
ClosedPublic

Authored by lebedev.ri on Jun 11 2018, 4:47 AM.

Details

Summary

As a followup for D48007.

Since we already handle x << (bitwidth - y) >> (bitwidth - y) pattern,
which does not have ub for both the edge cases (y == 0, y == bitwidth),
i think also handling a pattern that is ub for y == bitwidth should be fine.

Diff Detail

Repository
rL LLVM