[PATCH] D61199: [DAG] Refactor DAGCombiner::ReassociateOps

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 26 09:52:35 PDT 2019


bjope created this revision.
Herald added subscribers: aheejin, hiraditya, jgravelle-google, sbc100, javed.absar, nhaehnle, jvesely, dschuff.
Herald added a project: LLVM.

Extract the logic for doing reassociations
from DAGCombiner::ReassociateOps into a helper
function DAGCombiner::ReassociateOpsCommutative,
and use that helper to trigger reassociation
on the original operand order, or the commuted
operand order.

There is some unfortunate churn in some test cases.
Codegen is not identical since the operand order will
be different when doing the reassociations for the
commuted case.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D61199

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AArch64/arm64-addr-type-promotion.ll
  llvm/test/CodeGen/AMDGPU/calling-conventions.ll
  llvm/test/CodeGen/AMDGPU/cvt_f32_ubyte.ll
  llvm/test/CodeGen/AMDGPU/shl_add_constant.ll
  llvm/test/CodeGen/AMDGPU/widen-smrd-loads.ll
  llvm/test/CodeGen/ARM/and-load-combine.ll
  llvm/test/CodeGen/ARM/load-combine-big-endian.ll
  llvm/test/CodeGen/ARM/load-combine.ll
  llvm/test/CodeGen/SystemZ/buildvector-00.ll
  llvm/test/CodeGen/Thumb2/constant-hoisting.ll
  llvm/test/CodeGen/WebAssembly/address-offsets.ll
  llvm/test/CodeGen/X86/add-ext.ll
  llvm/test/CodeGen/X86/combine-multiplies.ll
  llvm/test/CodeGen/X86/load-combine.ll
  llvm/test/CodeGen/X86/lsr-loop-exit-cond.ll
  llvm/test/CodeGen/X86/merge_store.ll
  llvm/test/CodeGen/X86/sad.ll
  llvm/test/CodeGen/X86/vector-ext-logic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61199.196872.patch
Type: text/x-patch
Size: 30533 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190426/48e003e1/attachment.bin>


More information about the llvm-commits mailing list