[PATCH] D130675: [RFC][DAG] Match select of constant equivalents in foldBinOpIntoSelect.

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 16:45:24 PDT 2022


deadalnix created this revision.
deadalnix added reviewers: spatel, RKSimon, laytonio.
Herald added subscribers: kosarev, ecnelises, kerbowa, pengfei, hiraditya, jvesely.
Herald added a project: All.
deadalnix requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This makes the combiner more robust in case where the select is optimized away because the binary op is processed. This effect is visible in D127115 <https://reviews.llvm.org/D127115> .

The diff as this has a couple of regression, but I want to get feedback on the apporach to know if tthis is worth going throught he trouble of nailing them down.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130675

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AMDGPU/anyext.ll
  llvm/test/CodeGen/ARM/pr36577.ll
  llvm/test/CodeGen/VE/Scalar/atomic.ll
  llvm/test/CodeGen/X86/dagcombine-select.ll
  llvm/test/CodeGen/X86/memcmp-more-load-pairs-x32.ll
  llvm/test/CodeGen/X86/memcmp-more-load-pairs.ll
  llvm/test/CodeGen/X86/memcmp-optsize-x32.ll
  llvm/test/CodeGen/X86/memcmp-optsize.ll
  llvm/test/CodeGen/X86/memcmp-pgso-x32.ll
  llvm/test/CodeGen/X86/memcmp-pgso.ll
  llvm/test/CodeGen/X86/memcmp-x32.ll
  llvm/test/CodeGen/X86/memcmp.ll
  llvm/test/CodeGen/X86/midpoint-int.ll
  llvm/test/CodeGen/X86/select-1-or-neg1.ll
  llvm/test/CodeGen/X86/select_const.ll
  llvm/test/CodeGen/X86/shift-parts.ll
  llvm/test/CodeGen/X86/stack-folding-fp-avx1.ll
  llvm/test/CodeGen/X86/stack-folding-fp-sse42.ll
  llvm/test/CodeGen/X86/zext-sext.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130675.448212.patch
Type: text/x-patch
Size: 80610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220727/451ec8b6/attachment.bin>


More information about the llvm-commits mailing list