diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-15 07:47:49 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-15 07:47:49 +0000 |
| commit | 26137f35958fa2237eceb06ef7003e3c19159129 (patch) | |
| tree | 6441ce5f8a25ef18b4a8082f3cc834f7c8556f61 /test | |
| parent | 59850d0874429601812bc13408cb1f776649027c (diff) | |
Notes
Diffstat (limited to 'test')
| -rw-r--r-- | test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll | 10 | ||||
| -rw-r--r-- | test/CodeGen/X86/avoid-loop-align-2.ll | 6 | ||||
| -rw-r--r-- | test/CodeGen/X86/avoid-loop-align.ll | 9 |
3 files changed, 18 insertions, 7 deletions
diff --git a/test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll b/test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll index 3ccbc2f04f37..5ea26e76a6af 100644 --- a/test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll +++ b/test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll @@ -1,16 +1,16 @@ -; RUN: opt -gvn -S < %s | FileCheck %s +; RUN: opt -gvn -instcombine -S < %s | FileCheck %s declare i8 @llvm.atomic.load.add.i8.p0i8(i8*, i8) -define void @foo(i8* %ptr) { +define i8 @foo(i8* %ptr) { %P = getelementptr i8* %ptr, i32 0 %Q = getelementptr i8* %ptr, i32 1 ; CHECK: getelementptr %X = load i8* %P -; CHECK: = load %Y = call i8 @llvm.atomic.load.add.i8.p0i8(i8* %Q, i8 1) %Z = load i8* %P ; CHECK-NOT: = load - ret void -; CHECK: ret void + %A = sub i8 %X, %Z + ret i8 %A +; CHECK: ret i8 0 } diff --git a/test/CodeGen/X86/avoid-loop-align-2.ll b/test/CodeGen/X86/avoid-loop-align-2.ll index 03e69e7a1a49..fc9d1f0428fb 100644 --- a/test/CodeGen/X86/avoid-loop-align-2.ll +++ b/test/CodeGen/X86/avoid-loop-align-2.ll @@ -1,4 +1,8 @@ -; RUN: llc < %s -march=x86 | grep align | count 3 +; RUN: llc < %s -march=x86 | grep align | count 4 + +; TODO: Is it a good idea to align inner loops? It's hard to know without +; knowing what their trip counts are, or other dynamic information. For +; now, CodeGen aligns all loops. @x = external global i32* ; <i32**> [#uses=1] diff --git a/test/CodeGen/X86/avoid-loop-align.ll b/test/CodeGen/X86/avoid-loop-align.ll index 3e68f9486cfa..d4c5c6723243 100644 --- a/test/CodeGen/X86/avoid-loop-align.ll +++ b/test/CodeGen/X86/avoid-loop-align.ll @@ -1,4 +1,11 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin | grep align | count 1 +; RUN: llc < %s -mtriple=i386-apple-darwin | FileCheck %s + +; CodeGen should align the top of the loop, which differs from the loop +; header in this case. + +; CHECK: jmp LBB1_2 +; CHECK: .align +; CHECK: LBB1_1: @A = common global [100 x i32] zeroinitializer, align 32 ; <[100 x i32]*> [#uses=1] |
