[llvm-commits] CVS: llvm/test/CodeGen/ARM/arm-negative-stride.ll
Chris Lattner
sabre at nondot.org
Mon Apr 2 17:13:33 PDT 2007
Changes in directory llvm/test/CodeGen/ARM:
arm-negative-stride.ll added (r1.1)
---
Log message:
new testcase, where we should use a negative stride
---
Diffs of the changes: (+20 -0)
arm-negative-stride.ll | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+)
Index: llvm/test/CodeGen/ARM/arm-negative-stride.ll
diff -c /dev/null llvm/test/CodeGen/ARM/arm-negative-stride.ll:1.1
*** /dev/null Mon Apr 2 19:13:26 2007
--- llvm/test/CodeGen/ARM/arm-negative-stride.ll Mon Apr 2 19:13:16 2007
***************
*** 0 ****
--- 1,20 ----
+ ; RUN: llvm-as < %s | llc -march=arm | grep -F 'str r1, [r3, -r0, lsl #2]'
+
+ define void @test(i32* %P, i32 %A, i32 %i) {
+ entry:
+ icmp eq i32 %i, 0 ; <i1>:0 [#uses=1]
+ br i1 %0, label %return, label %bb
+
+ bb: ; preds = %bb, %entry
+ %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb ] ; <i32> [#uses=2]
+ %i_addr.09.0 = sub i32 %i, %indvar ; <i32> [#uses=1]
+ %tmp2 = getelementptr i32* %P, i32 %i_addr.09.0 ; <i32*> [#uses=1]
+ store i32 %A, i32* %tmp2
+ %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=2]
+ icmp eq i32 %indvar.next, %i ; <i1>:1 [#uses=1]
+ br i1 %1, label %return, label %bb
+
+ return: ; preds = %bb, %entry
+ ret void
+ }
+
More information about the llvm-commits
mailing list