[llvm] AMDGPU: Disable pattern matching "x<<32-y>>32-y" to "bfe x, 0, y" (PR #114279)

Changpeng Fang via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 10:51:03 PDT 2024


changpeng wrote:

> > We may be able to keep the pattern for immediate y while y is within [0, 31].
> 
> Playing with alive I don't see how this is ever correct

"bfe x, 0, y" is to extract the lower y bits from x, and thus it is equivalent to  x left shift (32 - y), then right shift (32 - y)  --- to clear the upper 32 - y bits of x.

https://github.com/llvm/llvm-project/pull/114279


More information about the llvm-commits mailing list