[PATCH] D104049: [AMDGPU] [CodeGen] Fold negate llvm.amdgcn.class into test mask

Anshil Gandhi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 10 11:01:56 PDT 2021


gandhi21299 created this revision.
gandhi21299 added reviewers: arsenm, thegameg, cfang.
Herald added subscribers: foad, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
gandhi21299 requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

- Implemented the following fold-negate transformation in the very beginning of AMDGPUCodegenPrepare.cpp:

`xor (llvm.amdgcn.class x, mask), -1` --> `llvm.amdgcn.class(x, ~mask)`

- Added regression tests


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104049

Files:
  llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
  llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-foldnegate.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104049.351217.patch
Type: text/x-patch
Size: 6257 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210610/4465a8f5/attachment-0001.bin>


More information about the llvm-commits mailing list