[PATCH] D86687: [DAGCombiner] Enhance (zext(setcc))

Kai Luo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 01:19:10 PDT 2020


lkail created this revision.
lkail added reviewers: spatel, dmgreen, qshanz, qiucf, PowerPC.
Herald added subscribers: llvm-commits, ecnelises, hiraditya, nemanjai.
Herald added a project: LLVM.
lkail requested review of this revision.

Current `v:t = zext(setcc x,y,cc)` will be transformed to `select x, y, 1:t, 0:t, cc`. It will miss some opportunities if x's type size is less than `t`'s size. This patch adds an enhancement.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86687

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AArch64/hoist-and-by-const-from-lshr-in-eqcmp-zero.ll
  llvm/test/CodeGen/AArch64/hoist-and-by-const-from-shl-in-eqcmp-zero.ll
  llvm/test/CodeGen/PowerPC/fp-strict-fcmp.ll
  llvm/test/CodeGen/PowerPC/setcc-logic.ll
  llvm/test/CodeGen/PowerPC/signbit-shift.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86687.288221.patch
Type: text/x-patch
Size: 11540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200827/081fe064/attachment.bin>


More information about the llvm-commits mailing list