summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/loop-strength-reduce4.ll
diff options
context:
space:
mode:
authorEvgeny Stupachenko <evstupac@gmail.com>2017-08-07 19:56:34 +0000
committerEvgeny Stupachenko <evstupac@gmail.com>2017-08-07 19:56:34 +0000
commitc675290680d7be4408142c8d74e37e974eef35f2 (patch)
treece4326f6c794942696ca4fd8f57e580517875014 /llvm/test/CodeGen/X86/loop-strength-reduce4.ll
parent428f0fe910454884c6e1119c9e9944f824973e1a (diff)
downloadbcm5719-llvm-c675290680d7be4408142c8d74e37e974eef35f2.tar.gz
bcm5719-llvm-c675290680d7be4408142c8d74e37e974eef35f2.zip
Reapply fix PR23384 (part 3 of 3) r304824 (was reverted in r305720).
The root cause of reverting was fixed - PR33514. Summary: The patch makes instruction count the highest priority for LSR solution for X86 (previously registers had highest priority). Reviewers: qcolombet Differential Revision: http://reviews.llvm.org/D30562 From: Evgeny Stupachenko <evstupac@gmail.com> <evgeny.v.stupachenko@intel.com> llvm-svn: 310289
Diffstat (limited to 'llvm/test/CodeGen/X86/loop-strength-reduce4.ll')
-rw-r--r--llvm/test/CodeGen/X86/loop-strength-reduce4.ll15
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/X86/loop-strength-reduce4.ll b/llvm/test/CodeGen/X86/loop-strength-reduce4.ll
index 786534b00d3..56f4161147b 100644
--- a/llvm/test/CodeGen/X86/loop-strength-reduce4.ll
+++ b/llvm/test/CodeGen/X86/loop-strength-reduce4.ll
@@ -4,16 +4,19 @@
; By starting the IV at -64 instead of 0, a cmp is eliminated,
; as the flags from the add can be used directly.
-; STATIC: movl $-64, [[ECX:%e..]]
+; STATIC: movl $-64, [[EAX:%e..]]
-; STATIC: movl [[EAX:%e..]], _state+76([[ECX]])
-; STATIC: addl $16, [[ECX]]
+; STATIC: movl %{{.+}}, _state+76([[EAX]])
+; STATIC: addl $16, [[EAX]]
; STATIC: jne
-; In PIC mode the symbol can't be folded, so the change-compare-stride
-; trick applies.
+; The same for PIC mode.
-; PIC: cmpl $64
+; PIC: movl $-64, [[EAX:%e..]]
+
+; PIC: movl %{{.+}}, 76(%{{.+}},[[EAX]])
+; PIC: addl $16, [[EAX]]
+; PIC: jne
@state = external global [0 x i32] ; <[0 x i32]*> [#uses=4]
@S = external global [0 x i32] ; <[0 x i32]*> [#uses=4]
OpenPOWER on IntegriCloud