[PATCH] D91589: [DAGCombiner] Fold (sext (not i1 x)) -> (add (zext i1 x), -1)

Layton Kifer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 22:51:03 PST 2020


laytonio created this revision.
laytonio added reviewers: RKSimon, craig.topper, spatel, lebedev.ri.
Herald added subscribers: llvm-commits, ecnelises, steven.zhang, pengfei, hiraditya, nemanjai.
Herald added a project: LLVM.
laytonio requested review of this revision.

Move fold of (sext (not i1 x)) -> (add (zext i1 x), -1) from X86 to DAGCombiner to improve codegen on other targets.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91589

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/AArch64/select_const.ll
  llvm/test/CodeGen/ARM/select_const.ll
  llvm/test/CodeGen/PowerPC/select_const.ll
  llvm/test/CodeGen/SystemZ/sext-zext.ll
  llvm/test/CodeGen/X86/pr44140.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91589.305659.patch
Type: text/x-patch
Size: 9084 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201117/94f8c2e1/attachment.bin>


More information about the llvm-commits mailing list