[PATCH] D109149: [DAG] Fold select_cc setgt X, -1, C, ~C -> xor (ashr X, BW-1), C

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 3 07:58:00 PDT 2021


dmgreen updated this revision to Diff 370585.
dmgreen added a comment.

I've added oneusecmp tests, which show the same number or less instructions for the cases I've tested. let me know if I should add a oneuse check in case other patterns are not better.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109149/new/

https://reviews.llvm.org/D109149

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AArch64/select-constant-xor.ll
  llvm/test/CodeGen/AMDGPU/fp_to_sint.ll
  llvm/test/CodeGen/AMDGPU/fp_to_uint.ll
  llvm/test/CodeGen/AMDGPU/select-constant-xor.ll
  llvm/test/CodeGen/AMDGPU/selectcc-icmp-select-float.ll
  llvm/test/CodeGen/ARM/select-constant-xor.ll
  llvm/test/CodeGen/PowerPC/select-constant-xor.ll
  llvm/test/CodeGen/PowerPC/smulfixsat.ll
  llvm/test/CodeGen/RISCV/select-constant-xor.ll
  llvm/test/CodeGen/X86/pr16031.ll
  llvm/test/CodeGen/X86/select-constant-xor.ll
  llvm/test/CodeGen/X86/smul_fix_sat.ll
  llvm/test/CodeGen/X86/sshl_sat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109149.370585.patch
Type: text/x-patch
Size: 53620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210903/f66730eb/attachment-0001.bin>


More information about the llvm-commits mailing list