[PATCH] D33206: [DAG] Elide stores which are overwritten without being observed.

Nirav Dave via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 11:06:11 PDT 2017


niravd created this revision.
Herald added subscribers: javed.absar, nhaehnle, nemanjai, jyknight, qcolombet, rengolin, aemerson.

In SelectionDAG, when a store is immediately chained to another store
to the same address, elide the first store as it has no observable
effects. This is causes small improvements dealing with intrinsics
lowered to stores.

Test notes:

- Many testcases overwrite store addresses multiple times and needed minor changes, mainly making stores volatile to prevent the optimization from optimizing the test away.

- Many X86 test cases optimized out instructions associated with associated with va_start.

- Note that test_splat in CodeGen/AArch64/misched-stp.ll no longer has dependencies to check and can probably be removed and potentially replaced with another test.


https://reviews.llvm.org/D33206

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/AArch64/ldst-zero.ll
  test/CodeGen/AArch64/misched-stp.ll
  test/CodeGen/AMDGPU/global-constant.ll
  test/CodeGen/ARM/2011-02-04-AntidepMultidef.ll
  test/CodeGen/ARM/2012-10-04-AAPCS-byval-align8.ll
  test/CodeGen/ARM/dag-combine-ldst.ll
  test/CodeGen/MSP430/vararg.ll
  test/CodeGen/Mips/msa/bmzi_bmnzi.ll
  test/CodeGen/PowerPC/ppcf128sf.ll
  test/CodeGen/SPARC/32abi.ll
  test/CodeGen/SPARC/64abi.ll
  test/CodeGen/SystemZ/swift-return.ll
  test/CodeGen/Thumb/stack-access.ll
  test/CodeGen/Thumb2/ldr-str-imm12.ll
  test/CodeGen/X86/arg-copy-elide.ll
  test/CodeGen/X86/store-narrow.ll
  test/CodeGen/X86/swift-return.ll
  test/CodeGen/X86/win32-spill-xmm.ll
  test/CodeGen/X86/win64_sibcall.ll
  test/CodeGen/X86/win64_vararg.ll
  test/CodeGen/X86/x86-64-ms_abi-vararg.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33206.99027.patch
Type: text/x-patch
Size: 21131 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170515/280bad4d/attachment-0001.bin>


More information about the llvm-commits mailing list