[PATCH] D37987: [DAG] allow store merging before and after legalization (PR34217)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 11:25:28 PDT 2017


spatel created this revision.
Herald added a subscriber: mcrosier.

https://reviews.llvm.org/rL310710 allowed store merging to occur after legalization to catch stores that are created late, but this exposes a logic hole seen in PR34217:
https://bugs.llvm.org/show_bug.cgi?id=34217

We will miss merging stores if the target lowers vector extracts into target-specific operations. This patch allows store merging to occur both before and after legalization if the target chooses to get maximum merging.

I don't think the potential regressions in the other tests are relevant. The tests are for correctness of weird IR constructs rather than perf tests, and I think those are still correct.


https://reviews.llvm.org/D37987

Files:
  include/llvm/Target/TargetLowering.h
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/X86/clear_upper_vector_element_bits.ll
  test/CodeGen/X86/merge-consecutive-loads-128.ll
  test/CodeGen/X86/stores-merging.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37987.115686.patch
Type: text/x-patch
Size: 11536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170918/c469edf9/attachment.bin>


More information about the llvm-commits mailing list