[PATCH] D118351: [AMDGPU][GlobalISel] Code quality: remove unnecessary or, and, shift instructions

Mateja Marjanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 27 04:55:07 PST 2022


matejam created this revision.
matejam added reviewers: foad, arsenm, mbrkusanin.
matejam added a project: LLVM.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, rovka, yaxunl, nhaehnle, jvesely, kzhuravl.
matejam requested review of this revision.
Herald added a subscriber: wdng.

Combiner that removes G_BITCAST (G_OR (G_AND (X, 65535), G_SHL (Y, 16))) in cases
when the result of that expression is the same as X or Y (or has X's or Y's higher or lower 16 bits).


https://reviews.llvm.org/D118351

Files:
  llvm/lib/Target/AMDGPU/AMDGPUCombine.td
  llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-mul.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/combine-or-and-shl.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.1d.d16.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118351.403601.patch
Type: text/x-patch
Size: 20197 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220127/83e3b6d8/attachment.bin>


More information about the llvm-commits mailing list