+++ /dev/null
-; RUN: opt < %s -anders-aa -disable-output
-
-define void @x(i16 %Y) {
-entry:
- %tmp = call i16 asm "bswap $0", "=r,r"(i16 %Y)
- ret void
-}
-
+++ /dev/null
-; RUN: opt < %s -anders-aa -gvn -S | not grep undef
-; PR2160
-
-declare void @f(i32*)
-
-define i32 @g() {
-entry:
- %tmp = alloca i32 ; <i32*> [#uses=2]
- call void @f( i32* %tmp )
- %tmp2 = load i32* %tmp ; <i32> [#uses=1]
- ret i32 %tmp2
-}
+++ /dev/null
-; RUN: opt < %s -anders-aa -gvn -S | not grep undef
-; PR2169
-
-declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
-declare void @use(i8)
-
-define void @f(i8* %x) {
-entry:
- %copy = alloca i8 ; <i8*> [#uses=6]
- call void @llvm.memcpy.i32( i8* %copy, i8* %x, i32 1, i32 4 )
- %tmp = load i8* %copy ; <i8> [#uses=1]
- call void @use(i8 %tmp)
- ret void
-}
+++ /dev/null
-; RUN: opt < %s -anders-aa
-; PR3262
-
-@.str15 = external global [3 x i8] ; <[3 x i8]*> [#uses=1]
-
-declare i8* @strtok(...)
-declare i8* @memmove(...)
-
-define void @test1(i8* %want1) nounwind {
-entry:
- %0 = call i8* (...)* @strtok(i32 0, i8* getelementptr ([3 x i8]* @.str15, i32 0, i32 0)) nounwind ; <i8*> [#uses=0]
- unreachable
-}
-
-define void @test2() nounwind {
-entry:
- %0 = call i8* (...)* @memmove()
- unreachable
-}
+++ /dev/null
-; RUN: opt < %s -anders-aa -aa-eval 2>/dev/null
-
-define void @test1() {
- %X = malloc i32*
- %Y = malloc i32
- %Z = ptrtoint i32* %Y to i32
- %W = inttoptr i32 %Z to i32*
- store i32* %W, i32** %X
- ret void
-}
-
-define void @test2(i32* %P) {
- %X = malloc i32*
- %Y = malloc i32
- store i32* %P, i32** %X
- ret void
-}
-
-define internal i32 *@test3(i32* %P) {
- ret i32* %P
-}
-
-define void @test4() {
- %X = malloc i32
- %Y = call i32* @test3(i32* %X)
- %ZZ = getelementptr i32* null, i32 17
- ret void
-}
+++ /dev/null
-load_lib llvm.exp
-
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
-
+++ /dev/null
-; RUN: opt < %s -anders-aa -gvn -deadargelim -S | grep store | not grep null
-
-; Because the 'internal' function is passed to an external function, we don't
-; know what the incoming values will alias. As such, we cannot do the
-; optimization checked by the 'arg-must-alias.ll' test.
-
-declare void @external(i32(i32*)*)
-@G = internal constant i32* null
-
-define internal i32 @internal(i32* %ARG) {
- ;;; We *DON'T* know that ARG always points to null!
- store i32* %ARG, i32** @G
- ret i32 0
-}
-
-define i32 @foo() {
- call void @external(i32(i32*)* @internal)
- %V = call i32 @internal(i32* null)
- ret i32 %V
-}
+++ /dev/null
-; RUN: opt < %s -anders-aa -gvn -instcombine -S \
-; RUN: | grep {ret i1 true}
-
-@G = internal global i32* null
-declare i32 *@ext()
-
-define i1 @bar() {
- %V1 = load i32** @G
- %X2 = call i32 *@ext()
- %V2 = load i32** @G
- store i32* %X2, i32** @G
-
- %C = icmp eq i32* %V1, %V2
- ret i1 %C
-}
+++ /dev/null
-; RUN: opt < %s -anders-aa -gvn -S \
-; RUN: | not grep {ret i32 undef}
-
-;; From PR 2160
-declare void @f(i32*)
-
-define i32 @g() {
-entry:
- %tmp = alloca i32 ; <i32*> [#uses=2]
- call void @f( i32* %tmp )
- %tmp2 = load i32* %tmp ; <i32> [#uses=1]
- ret i32 %tmp2
-}
-
+++ /dev/null
-; RUN: opt < %s -anders-aa -disable-output
-
-define void @foo() { ret void }