diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2009-10-14 19:02:13 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2009-10-14 19:02:13 +0000 |
commit | b289010eda885d07a3d224243e0e7478fa072f5e (patch) | |
tree | 5efecfb987d682d0d5e1d5b46c4f7a5765183f11 /test/Analysis | |
parent | cfb46c5a762f118fbe73fb50eec5be56a1fcd247 (diff) | |
download | external_llvm-b289010eda885d07a3d224243e0e7478fa072f5e.zip external_llvm-b289010eda885d07a3d224243e0e7478fa072f5e.tar.gz external_llvm-b289010eda885d07a3d224243e0e7478fa072f5e.tar.bz2 |
Make use of the result of the loads even though that means adding -instcombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84125 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r-- | test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll b/test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll index 3ccbc2f..5ea26e7 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 } |