A DAGCombine optimization for merging consecutive stores. This optimization is not...
authorNadav Rotem <nrotem@apple.com>
Sun, 30 Sep 2012 06:24:14 +0000 (06:24 +0000)
committerNadav Rotem <nrotem@apple.com>
Sun, 30 Sep 2012 06:24:14 +0000 (06:24 +0000)
commite5f163a3b98a531c3ff35da0e97e7364c0e04b95
treee2674b13974d05e7c86bb74814eff726e3ebce24
parenteb1641d54a7eda7717304bc4d55d059208d8ebed
A DAGCombine optimization for merging consecutive stores. This optimization is not profitable in many cases
because moden processos can store multiple values in parallel, and preparing the consecutive store requires
some work.  We only handle these cases:

1. Consecutive stores where the values and consecutive loads. For example:
 int a = p->a;
 int b = p->b;
 q->a = a;
 q->b = b;

2. Consecutive stores where the values are constants. Foe example:
 q->a = 4;
 q->b = 5;

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164910 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/MergeConsecutiveStores.ll [new file with mode: 0644]
test/CodeGen/X86/loop-strength-reduce-2.ll
test/CodeGen/X86/loop-strength-reduce-3.ll
test/CodeGen/X86/loop-strength-reduce.ll