[llvm-commits] [llvm] r84385 - in /llvm/trunk/test/Analysis/BasicAA: memintrinsic-src.ll memintrisic-size.ll
Chris Lattner
clattner at apple.com
Sat Oct 17 20:46:25 PDT 2009
On Oct 17, 2009, at 5:42 PM, Nick Lewycky wrote:
> Author: nicholas
> Date: Sat Oct 17 19:42:07 2009
> New Revision: 84385
>
> URL: http://llvm.org/viewvc/llvm-project?rev=84385&view=rev
> Log:
> Add a couple new testcases.
Thanks, please pull these into modref.ll. You don't need dse for the
first test, gvn is enough to propagate the store across to the load.
-Chris
>
> Added:
> llvm/trunk/test/Analysis/BasicAA/memintrinsic-src.ll
> llvm/trunk/test/Analysis/BasicAA/memintrisic-size.ll
>
> Added: llvm/trunk/test/Analysis/BasicAA/memintrinsic-src.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/BasicAA/memintrinsic-src.ll?rev=84385&view=auto
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/Analysis/BasicAA/memintrinsic-src.ll (added)
> +++ llvm/trunk/test/Analysis/BasicAA/memintrinsic-src.ll Sat Oct 17
> 19:42:07 2009
> @@ -0,0 +1,17 @@
> +; RUN: opt -S -gvn -dse < %s | FileCheck %s
> +
> +declare void @llvm.memcpy.i8(i8*, i8*, i8, i32)
> +
> +define i8 @test1() {
> +; CHECK: @test1
> + %A = alloca i8
> + %B = alloca i8
> +
> + store i8 2, i8* %B ;; Not written to by memcpy
> +
> + call void @llvm.memcpy.i8(i8* %A, i8* %B, i8 -1, i32 0)
> +
> + %C = load i8* %B
> + ret i8 %C
> +; CHECK-NEXT: ret i8 2
> +}
>
> Added: llvm/trunk/test/Analysis/BasicAA/memintrisic-size.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/BasicAA/memintrisic-size.ll?rev=84385&view=auto
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/Analysis/BasicAA/memintrisic-size.ll (added)
> +++ llvm/trunk/test/Analysis/BasicAA/memintrisic-size.ll Sat Oct 17
> 19:42:07 2009
> @@ -0,0 +1,13 @@
> +; RUN: opt -S -gvn < %s | FileCheck %s
> +
> +declare void @llvm.memset.i8(i8*, i8, i8, i32)
> +
> +define i8 @test(i8* %P) {
> + %P2 = getelementptr i8* %P, i32 1000
> + store i8 1, i8* %P2 ;; Not dead across memset
> + call void @llvm.memset.i8(i8* %P, i8 2, i8 127, i32 0)
> + %A = load i8* %P2
> + ret i8 %A
> +; CHECK: ret i8 1
> +}
> +
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list