[llvm-commits] [llvm] r83959 - in /llvm/trunk: lib/Analysis/BasicAliasAnalysis.cpp test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll
Chris Lattner
clattner at apple.com
Tue Oct 13 10:34:09 PDT 2009
On Oct 13, 2009, at 12:48 AM, Nick Lewycky wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=83959&view=rev
> Log:
> Teach BasicAA a little something about the atomic intrinsics: they
> can only
> modify through the pointer they're given.
Thanks Nick,
> +
> +define void @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
> +}
Please add some uses of the loads: do: "ret sub X,Z", and FileCheck
that GVN+instcombine turn it into "ret i32 0"
-Chris
More information about the llvm-commits
mailing list