aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/loop-strength-reduce-2.ll
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-09-30 06:24:14 +0000
committerNadav Rotem <nrotem@apple.com>2012-09-30 06:24:14 +0000
commite5f163a3b98a531c3ff35da0e97e7364c0e04b95 (patch)
treee2674b13974d05e7c86bb74814eff726e3ebce24 /test/CodeGen/X86/loop-strength-reduce-2.ll
parenteb1641d54a7eda7717304bc4d55d059208d8ebed (diff)
downloadexternal_llvm-e5f163a3b98a531c3ff35da0e97e7364c0e04b95.zip
external_llvm-e5f163a3b98a531c3ff35da0e97e7364c0e04b95.tar.gz
external_llvm-e5f163a3b98a531c3ff35da0e97e7364c0e04b95.tar.bz2
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
Diffstat (limited to 'test/CodeGen/X86/loop-strength-reduce-2.ll')
-rw-r--r--test/CodeGen/X86/loop-strength-reduce-2.ll10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/CodeGen/X86/loop-strength-reduce-2.ll b/test/CodeGen/X86/loop-strength-reduce-2.ll
index b546462..b094fed 100644
--- a/test/CodeGen/X86/loop-strength-reduce-2.ll
+++ b/test/CodeGen/X86/loop-strength-reduce-2.ll
@@ -1,20 +1,18 @@
-; RUN: llc < %s -march=x86 -relocation-model=pic | FileCheck %s -check-prefix=PIC
-; RUN: llc < %s -march=x86 -relocation-model=static | FileCheck %s -check-prefix=STATIC
+; RUN: llc < %s -march=x86 -mcpu=corei7 -relocation-model=pic | FileCheck %s -check-prefix=PIC
+; RUN: llc < %s -march=x86 -mcpu=corei7 -relocation-model=static | FileCheck %s -check-prefix=STATIC
;
; Make sure the common loop invariant A is hoisted up to preheader,
; since too many registers are needed to subsume it into the addressing modes.
; It's safe to sink A in when it's not pic.
; PIC: align
-; PIC: movl $4, -4([[REG:%e[a-z]+]])
-; PIC: movl $5, ([[REG]])
+; PIC: movlpd %xmm0, -4([[REG:%e[a-z]+]])
; PIC: addl $4, [[REG]]
; PIC: decl {{%e[[a-z]+}}
; PIC: jne
; STATIC: align
-; STATIC: movl $4, -4(%ecx)
-; STATIC: movl $5, (%ecx)
+; STATIC: movlpd %xmm0, -4(%ecx)
; STATIC: addl $4, %ecx
; STATIC: decl %eax
; STATIC: jne