summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/addrmode.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/ARM/addrmode.ll')
-rw-r--r--test/CodeGen/ARM/addrmode.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/addrmode.ll b/test/CodeGen/ARM/addrmode.ll
new file mode 100644
index 0000000000..748d258044
--- /dev/null
+++ b/test/CodeGen/ARM/addrmode.ll
@@ -0,0 +1,16 @@
+; REQUIRES: asserts
+; RUN: llc < %s -march=arm -stats 2>&1 | grep asm-printer | grep 4
+
+define i32 @t1(i32 %a) {
+ %b = mul i32 %a, 9
+ %c = inttoptr i32 %b to i32*
+ %d = load i32* %c
+ ret i32 %d
+}
+
+define i32 @t2(i32 %a) {
+ %b = mul i32 %a, -7
+ %c = inttoptr i32 %b to i32*
+ %d = load i32* %c
+ ret i32 %d
+}