summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-03-14 23:26:40 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-03-14 23:26:40 +0000
commit70e16d5e17ae8e46349fedb61b63976c90d459e0 (patch)
treecb14d7446ed71c9b9d739066d60a5e3437ca23f3
parent2ece31b4ce273d68a4617234c43508644151c9b0 (diff)
downloadbcm5719-llvm-70e16d5e17ae8e46349fedb61b63976c90d459e0.tar.gz
bcm5719-llvm-70e16d5e17ae8e46349fedb61b63976c90d459e0.zip
ARM isel should match ldr x +/- x * (2^n) to ldr [x, +/- x, lsl #log2(n)].
llvm-svn: 35114
-rw-r--r--llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll2
-rw-r--r--llvm/test/CodeGen/ARM/addrmode.ll16
2 files changed, 17 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll b/llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll
index 023822e8d5c..c8ad14746ac 100644
--- a/llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll
+++ b/llvm/test/CodeGen/ARM/2007-03-13-InstrSched.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -relocation-model=pic -mattr=+v6 -stats 2>&1 | grep 'asm-printer' | grep 57
+; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -relocation-model=pic -mattr=+v6 -stats 2>&1 | grep 'asm-printer' | grep 53
define void @test(i32 %tmp56222, i32 %tmp36224, i32 %tmp46223, i32 %i.0196.0.ph, i32 %tmp8, i32* %tmp1011, i32** %tmp1, i32* %d2.1.out, i32* %d3.1.out, i32* %d0.1.out, i32* %d1.1.out) {
newFuncRoot:
diff --git a/llvm/test/CodeGen/ARM/addrmode.ll b/llvm/test/CodeGen/ARM/addrmode.ll
new file mode 100644
index 00000000000..59b14214a9b
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/addrmode.ll
@@ -0,0 +1,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
+}
OpenPOWER on IntegriCloud