aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/ARM/addrmode.ll
blob: 59b14214a9b4caf76f959d0847b80040b8049e05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
; RUN: llvm-as < %s | llc -march=arm &&
; RUN: llvm-as < %s | llc -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
}