diff options
Diffstat (limited to 'test/Transforms/IndVarSimplify/2007-01-08-X86-64-Pointer.ll')
-rw-r--r-- | test/Transforms/IndVarSimplify/2007-01-08-X86-64-Pointer.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/IndVarSimplify/2007-01-08-X86-64-Pointer.ll b/test/Transforms/IndVarSimplify/2007-01-08-X86-64-Pointer.ll new file mode 100644 index 0000000..f1d0187 --- /dev/null +++ b/test/Transforms/IndVarSimplify/2007-01-08-X86-64-Pointer.ll @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | llc -march=x86-64 | grep {(%rdi,%rax,8)} +; RUN: llvm-as < %s | llc -march=x86-64 | not grep {addq.*8} + +define void @foo(double* %y) { +entry: + br label %bb + +bb: + %i = phi i64 [ 0, %entry ], [ %k, %bb ] + %j = getelementptr double* %y, i64 %i + store double 0.000000e+00, double* %j + %k = add i64 %i, 1 + %n = icmp eq i64 %k, 0 + br i1 %n, label %return, label %bb + +return: + ret void +} + |