diff options
author | Dan Gohman <gohman@apple.com> | 2009-04-16 03:18:22 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-04-16 03:18:22 +0000 |
commit | 2d1be87ee40a4a0241d94448173879d9df2bc5b3 (patch) | |
tree | fa16eff022c8808a5eb6aedb159ea653af0faae9 /test | |
parent | 9efac568f08de669c8e0003b33b80998cedaf8b6 (diff) | |
download | llvm-2d1be87ee40a4a0241d94448173879d9df2bc5b3.tar.gz llvm-2d1be87ee40a4a0241d94448173879d9df2bc5b3.tar.bz2 llvm-2d1be87ee40a4a0241d94448173879d9df2bc5b3.tar.xz |
Expand GEPs in ScalarEvolution expressions. SCEV expressions can now
have pointer types, though in contrast to C pointer types, SCEV
addition is never implicitly scaled. This not only eliminates the
need for special code like IndVars' EliminatePointerRecurrence
and LSR's own GEP expansion code, it also does a better job because
it lets the normal optimizations handle pointer expressions just
like integer expressions.
Also, since LLVM IR GEPs can't directly index into multi-dimensional
VLAs, moving the GEP analysis out of client code and into the SCEV
framework makes it easier for clients to handle multi-dimensional
VLAs the same way as other arrays.
Some existing regression tests show improved optimization.
test/CodeGen/ARM/2007-03-13-InstrSched.ll in particular improved to
the point where if-conversion started kicking in; I turned it off
for this test to preserve the intent of the test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/ARM/2007-03-13-InstrSched.ll | 2 | ||||
-rw-r--r-- | test/CodeGen/X86/iv-users-in-other-loops.ll | 3 | ||||
-rw-r--r-- | test/CodeGen/X86/pr3495.ll | 5 | ||||
-rw-r--r-- | test/CodeGen/X86/stride-nine-with-base-reg.ll | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/test/CodeGen/ARM/2007-03-13-InstrSched.ll b/test/CodeGen/ARM/2007-03-13-InstrSched.ll index 8fdff52f01..1b917f0ac2 100644 --- a/test/CodeGen/ARM/2007-03-13-InstrSched.ll +++ b/test/CodeGen/ARM/2007-03-13-InstrSched.ll @@ -1,5 +1,5 @@ ; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -relocation-model=pic \ -; RUN: -mattr=+v6 -stats |& grep asm-printer | grep 41 +; RUN: -mattr=+v6 -ifcvt-limit=0 -stats |& grep asm-printer | grep 35 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/test/CodeGen/X86/iv-users-in-other-loops.ll b/test/CodeGen/X86/iv-users-in-other-loops.ll index b21586173f..67d9d49a44 100644 --- a/test/CodeGen/X86/iv-users-in-other-loops.ll +++ b/test/CodeGen/X86/iv-users-in-other-loops.ll @@ -1,7 +1,8 @@ ; RUN: llvm-as < %s | llc -march=x86-64 -f -o %t ; RUN: grep inc %t | count 2 ; RUN: grep addq %t | count 13 -; RUN: grep leaq %t | count 9 +; RUN: grep leaq %t | count 8 +; RUN: grep leal %t | count 4 ; RUN: grep movq %t | count 5 ; IV users in each of the loops from other loops shouldn't cause LSR diff --git a/test/CodeGen/X86/pr3495.ll b/test/CodeGen/X86/pr3495.ll index b7330db05d..726ad7413b 100644 --- a/test/CodeGen/X86/pr3495.ll +++ b/test/CodeGen/X86/pr3495.ll @@ -1,5 +1,6 @@ -; RUN: llvm-as < %s | llc -march=x86 -stats |& grep {Number of reloads omited} -; RUN: llvm-as < %s | llc -march=x86 -stats |& grep {Number of available reloads turned into copies} +; RUN: llvm-as < %s | llc -march=x86 -stats |& grep {Number of reloads omited} | grep 2 +; RUN: llvm-as < %s | llc -march=x86 -stats |& not grep {Number of available reloads turned into copies} +; RUN: llvm-as < %s | llc -march=x86 -stats |& grep {Number of machine instrs printed} | grep 39 ; PR3495 target triple = "i386-pc-linux-gnu" diff --git a/test/CodeGen/X86/stride-nine-with-base-reg.ll b/test/CodeGen/X86/stride-nine-with-base-reg.ll index c0cfb852bd..cc26487cf2 100644 --- a/test/CodeGen/X86/stride-nine-with-base-reg.ll +++ b/test/CodeGen/X86/stride-nine-with-base-reg.ll @@ -1,7 +1,7 @@ ; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static | not grep lea ; RUN: llvm-as < %s | llc -march=x86-64 | not grep lea -; _P should be sunk into the loop and folded into the address mode. There +; P should be sunk into the loop and folded into the address mode. There ; shouldn't be any lea instructions inside the loop. @B = external global [1000 x i8], align 32 |