OSDN Git Service

[AMDGPU] Recognize x & (-1 >> (32 - y)) pattern.
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 15 Jun 2018 09:56:31 +0000 (09:56 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 15 Jun 2018 09:56:31 +0000 (09:56 +0000)
commit1d9a02a498e9127b7e1f67a0ae058bfe44f772c4
tree50c737dfae8459e532067b988b41b271a23a382f
parent565bf54c1cd42e4841803ece0a702b7d48bbc84c
[AMDGPU] Recognize  x &  (-1 >> (32 - y))  pattern.

Summary:
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.

Reviewers: nhaehnle, bogner, tstellar, arsenm

Reviewed By: arsenm

Subscribers: arsenm, kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Tags: #amdgpu

Differential Revision: https://reviews.llvm.org/D48007

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334815 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUInstructions.td
test/CodeGen/AMDGPU/extract-lowbits.ll