Move target tests to target subdirectories
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 31 Jan 2020 18:42:18 +0000 (13:42 -0500)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 31 Jan 2020 23:27:18 +0000 (15:27 -0800)
llvm/test/Transforms/EarlyCSE/AMDGPU/intrinsics.ll [new file with mode: 0644]
llvm/test/Transforms/EarlyCSE/PowerPC/lit.local.cfg [new file with mode: 0644]
llvm/test/Transforms/EarlyCSE/PowerPC/read-reg.ll [new file with mode: 0644]
llvm/test/Transforms/EarlyCSE/X86/lit.local.cfg [new file with mode: 0644]
llvm/test/Transforms/EarlyCSE/X86/preserve_memoryssa.ll [new file with mode: 0644]
llvm/test/Transforms/EarlyCSE/intrinsics.ll [deleted file]
llvm/test/Transforms/EarlyCSE/preserve_memoryssa.ll [deleted file]
llvm/test/Transforms/EarlyCSE/read-reg.ll [deleted file]

diff --git a/llvm/test/Transforms/EarlyCSE/AMDGPU/intrinsics.ll b/llvm/test/Transforms/EarlyCSE/AMDGPU/intrinsics.ll
new file mode 100644 (file)
index 0000000..0fae469
--- /dev/null
@@ -0,0 +1,36 @@
+; RUN: opt < %s -S -mtriple=amdgcn-- -early-cse | FileCheck %s
+
+; CHECK-LABEL: @no_cse
+; CHECK: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 0, i32 0)
+; CHECK: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 4, i32 0)
+define void @no_cse(i32 addrspace(1)* %out, <4 x i32> %in) {
+  %a = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 0, i32 0)
+  %b = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 4, i32 0)
+  %c = add i32 %a, %b
+  store i32 %c, i32 addrspace(1)* %out
+  ret void
+}
+
+; CHECK-LABEL: @cse_zero_offset
+; CHECK: [[CSE:%[a-z0-9A-Z]+]] = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 0, i32 0)
+; CHECK: add i32 [[CSE]], [[CSE]]
+define void @cse_zero_offset(i32 addrspace(1)* %out, <4 x i32> %in) {
+  %a = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 0, i32 0)
+  %b = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 0, i32 0)
+  %c = add i32 %a, %b
+  store i32 %c, i32 addrspace(1)* %out
+  ret void
+}
+
+; CHECK-LABEL: @cse_nonzero_offset
+; CHECK: [[CSE:%[a-z0-9A-Z]+]] = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 4, i32 0)
+; CHECK: add i32 [[CSE]], [[CSE]]
+define void @cse_nonzero_offset(i32 addrspace(1)* %out, <4 x i32> %in) {
+  %a = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 4, i32 0)
+  %b = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 4, i32 0)
+  %c = add i32 %a, %b
+  store i32 %c, i32 addrspace(1)* %out
+  ret void
+}
+
+declare i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> nocapture, i32, i32)
diff --git a/llvm/test/Transforms/EarlyCSE/PowerPC/lit.local.cfg b/llvm/test/Transforms/EarlyCSE/PowerPC/lit.local.cfg
new file mode 100644 (file)
index 0000000..c8625f4
--- /dev/null
@@ -0,0 +1,2 @@
+if not 'X86' in config.root.targets:
+    config.unsupported = True
diff --git a/llvm/test/Transforms/EarlyCSE/PowerPC/read-reg.ll b/llvm/test/Transforms/EarlyCSE/PowerPC/read-reg.ll
new file mode 100644 (file)
index 0000000..25f5f80
--- /dev/null
@@ -0,0 +1,35 @@
+; RUN: opt -S -early-cse < %s | FileCheck %s
+; RUN: opt -S -basicaa -early-cse-memssa < %s | FileCheck %s
+target datalayout = "E-m:e-i64:64-n32:64"
+target triple = "powerpc64-unknown-linux-gnu"
+
+; Function Attrs: nounwind
+define i64 @f(i64 %x) #0 {
+entry:
+  %0 = call i64 @llvm.read_register.i64(metadata !0)
+  call void bitcast (void (...)* @foo to void ()*)()
+  %1 = call i64 @llvm.read_register.i64(metadata !0)
+  %add = add nsw i64 %0, %1
+  ret i64 %add
+}
+
+; CHECK-LABEL: @f
+; CHECK: call i64 @llvm.read_register.i64
+; CHECK: call i64 @llvm.read_register.i64
+
+; Function Attrs: nounwind readnone
+declare i64 @llvm.read_register.i64(metadata) #1
+
+; Function Attrs: nounwind
+declare void @llvm.write_register.i64(metadata, i64) #2
+
+declare void @foo(...)
+
+attributes #0 = { nounwind }
+attributes #1 = { nounwind readnone }
+attributes #2 = { nounwind }
+
+!llvm.named.register.r1 = !{!0}
+
+!0 = !{!"r1"}
+
diff --git a/llvm/test/Transforms/EarlyCSE/X86/lit.local.cfg b/llvm/test/Transforms/EarlyCSE/X86/lit.local.cfg
new file mode 100644 (file)
index 0000000..c8625f4
--- /dev/null
@@ -0,0 +1,2 @@
+if not 'X86' in config.root.targets:
+    config.unsupported = True
diff --git a/llvm/test/Transforms/EarlyCSE/X86/preserve_memoryssa.ll b/llvm/test/Transforms/EarlyCSE/X86/preserve_memoryssa.ll
new file mode 100644 (file)
index 0000000..946293d
--- /dev/null
@@ -0,0 +1,137 @@
+; RUN: opt < %s -early-cse-memssa -verify-memoryssa -disable-output
+; REQUIRES: asserts
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+; Tests below highlight scenarios where EarlyCSE does not preserve MemorySSA
+; optimized accesses. Current MemorySSA verify will accept these.
+
+; Test 1:
+; AA cannot tell here that the last load does not alias the only store.
+; The first two loads are a common expression, EarlyCSE removes the second one,
+; and then AA can see that the last load is a Use(LoE). Hence not optimized as
+; it claims. Note that if we replace the GEP indices 2 and 1, AA sees NoAlias
+; for the last load, before CSE-ing the first 2 loads.
+%struct.ImageParameters = type { i32, i32, i32 }
+@img = external global %struct.ImageParameters*, align 8
+define void @test1_macroblock() {
+entry:
+  ; MemoryUse(LoE)
+  %0 = load %struct.ImageParameters*, %struct.ImageParameters** @img, align 8
+
+  %Pos_2 = getelementptr inbounds %struct.ImageParameters, %struct.ImageParameters* %0, i64 0, i32 2
+  ; 1 = MemoryDef(LoE)
+  store i32 undef, i32* %Pos_2, align 8
+
+  ; MemoryUse(LoE)
+  %1 = load %struct.ImageParameters*, %struct.ImageParameters** @img, align 8
+
+  %Pos_1 = getelementptr inbounds %struct.ImageParameters, %struct.ImageParameters* %1, i64 0, i32 1
+  ; MemoryUse(1) MayAlias
+  %2 = load i32, i32* %Pos_1, align 4
+  unreachable
+}
+
+; Test 2:
+; EarlyCSE simplifies %string to undef. Def and Use used to be MustAlias, with
+; undef they are NoAlias. The Use can be optimized further to LoE. We can
+; de-optimize uses of replaced instructions, but in general this is not enough
+; (see next tests).
+%struct.TermS = type { i32, i32, i32, i32, i32, i8* }
+define fastcc void @test2_term_string() {
+entry:
+  %string = getelementptr inbounds %struct.TermS, %struct.TermS* undef, i64 0, i32 5
+  ; 1 = MemoryDef(LoE)
+  store i8* undef, i8** %string, align 8
+  ; MemoryUse(1) MustAlias
+  %0 = load i8*, i8** %string, align 8
+  unreachable
+}
+
+; Test 3:
+; EarlyCSE simplifies %0 to undef. So the second Def now stores to undef.
+; We now find the second load (Use(2) can be optimized further to LoE)
+; When replacing instructions, we can deoptimize all uses of the replaced
+; instruction and all uses of transitive accesses. However this does not stop
+; MemorySSA from being tripped by AA (see test4).
+%struct.Grammar = type { i8*, i8*, %struct.anon }
+%struct.anon = type { i32, i32, %struct.Term**, [3 x %struct.Term*] }
+%struct.Term = type { i32 }
+
+define fastcc void @test3_term_string(%struct.Grammar* %g) {
+entry:
+  ; 1 = MemoryDef(LoE)
+  store i8* undef, i8** undef, align 8
+  ; MemoryUse(LoE)
+  %0 = load i8*, i8** undef, align 8
+  %arrayidx = getelementptr inbounds i8, i8* %0, i64 undef
+  ; 2 = MemoryDef(1)
+  store i8 0, i8* %arrayidx, align 1
+  %v = getelementptr inbounds %struct.Grammar, %struct.Grammar* %g, i64 0, i32 2, i32 2
+  ; MemoryUse(2) MayAlias
+  %1 = load %struct.Term**, %struct.Term*** %v, align 8
+  unreachable
+}
+
+; Test 4:
+; Removing dead/unused instructions in if.then274 makes AA smarter. Before
+; removal, it finds %4 MayAlias the store above. After removal this can be
+; optimized to LoE. Hence after EarlyCSE, there is an access who claims is
+; optimized and it can be optimized further.
+
+; We can't escape such cases in general when relying on Alias Analysis.
+; The only fail-safe way to actually preserve MemorySSA when removing or
+; replacing instructions (i.e. get the *same* MemorySSA as if it was computed
+; for the updated IR) is to recompute it from scratch. What we get now is still
+; a correct update, but with accesses that claim to be optimized and can be
+; optimized further if we were to re-run MemorySSA on the IR.
+%struct.gnode.0.1.3.6.9.18.20.79 = type { i32, i32, i32, i32, i32, i32, i32, %struct.gnode.0.1.3.6.9.18.20.79* }
+@gnodeArray = external global %struct.gnode.0.1.3.6.9.18.20.79**, align 8
+
+define void @test4_shortest() {
+entry:
+  %exl.i = alloca [5 x i32], align 16
+  br i1 undef, label %if.then274, label %for.cond404
+
+if.then274:                                       ; preds = %if.end256
+  %0 = bitcast [5 x i32]* %exl.i to i8*
+  %arrayidx.i = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 1
+  %arrayidx1.i = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 2
+  %arrayidx2.i = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 3
+  %arrayidx3.i = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 4
+  %1 = bitcast [5 x i32]* %exl.i to i8*
+  %arrayidx.i1034 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 1
+  %arrayidx1.i1035 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 2
+  %arrayidx2.i1036 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 3
+  %arrayidx3.i1037 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 4
+  unreachable
+
+for.cond404:                                      ; preds = %if.end256
+  %2 = bitcast [5 x i32]* %exl.i to i8*
+  %arrayidx.i960 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 1
+  %arrayidx1.i961 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 2
+  %arrayidx2.i962 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 3
+  ; 1 = MemoryDef(LoE)
+  store i32 undef, i32* %arrayidx2.i962, align 4
+  %arrayidx3.i963 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 4
+
+  ; MemoryUse(LoE)
+  %3 = load %struct.gnode.0.1.3.6.9.18.20.79**, %struct.gnode.0.1.3.6.9.18.20.79*** @gnodeArray, align 8
+  %arrayidx6.i968 = getelementptr inbounds %struct.gnode.0.1.3.6.9.18.20.79*, %struct.gnode.0.1.3.6.9.18.20.79** %3, i64 undef
+  ; MemoryUse(1) MayAlias
+  %4 = load %struct.gnode.0.1.3.6.9.18.20.79*, %struct.gnode.0.1.3.6.9.18.20.79** %arrayidx6.i968, align 8
+  br i1 undef, label %for.cond26.preheader.i974, label %if.then20.for.body_crit_edge.i999
+
+for.cond26.preheader.i974:                        ; preds = %if.then20.i996
+  %5 = bitcast [5 x i32]* %exl.i to i8*
+  %arrayidx.i924 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 1
+  %arrayidx1.i925 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 2
+  %arrayidx2.i926 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 3
+  %arrayidx3.i927 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 4
+  unreachable
+
+if.then20.for.body_crit_edge.i999:                ; preds = %if.then20.i996
+  %arrayidx9.phi.trans.insert.i997 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 undef
+  unreachable
+}
diff --git a/llvm/test/Transforms/EarlyCSE/intrinsics.ll b/llvm/test/Transforms/EarlyCSE/intrinsics.ll
deleted file mode 100644 (file)
index 0fae469..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-; RUN: opt < %s -S -mtriple=amdgcn-- -early-cse | FileCheck %s
-
-; CHECK-LABEL: @no_cse
-; CHECK: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 0, i32 0)
-; CHECK: call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 4, i32 0)
-define void @no_cse(i32 addrspace(1)* %out, <4 x i32> %in) {
-  %a = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 0, i32 0)
-  %b = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 4, i32 0)
-  %c = add i32 %a, %b
-  store i32 %c, i32 addrspace(1)* %out
-  ret void
-}
-
-; CHECK-LABEL: @cse_zero_offset
-; CHECK: [[CSE:%[a-z0-9A-Z]+]] = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 0, i32 0)
-; CHECK: add i32 [[CSE]], [[CSE]]
-define void @cse_zero_offset(i32 addrspace(1)* %out, <4 x i32> %in) {
-  %a = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 0, i32 0)
-  %b = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 0, i32 0)
-  %c = add i32 %a, %b
-  store i32 %c, i32 addrspace(1)* %out
-  ret void
-}
-
-; CHECK-LABEL: @cse_nonzero_offset
-; CHECK: [[CSE:%[a-z0-9A-Z]+]] = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 4, i32 0)
-; CHECK: add i32 [[CSE]], [[CSE]]
-define void @cse_nonzero_offset(i32 addrspace(1)* %out, <4 x i32> %in) {
-  %a = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 4, i32 0)
-  %b = call i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> %in, i32 4, i32 0)
-  %c = add i32 %a, %b
-  store i32 %c, i32 addrspace(1)* %out
-  ret void
-}
-
-declare i32 @llvm.amdgcn.s.buffer.load.i32(<4 x i32> nocapture, i32, i32)
diff --git a/llvm/test/Transforms/EarlyCSE/preserve_memoryssa.ll b/llvm/test/Transforms/EarlyCSE/preserve_memoryssa.ll
deleted file mode 100644 (file)
index 946293d..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-; RUN: opt < %s -early-cse-memssa -verify-memoryssa -disable-output
-; REQUIRES: asserts
-
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-; Tests below highlight scenarios where EarlyCSE does not preserve MemorySSA
-; optimized accesses. Current MemorySSA verify will accept these.
-
-; Test 1:
-; AA cannot tell here that the last load does not alias the only store.
-; The first two loads are a common expression, EarlyCSE removes the second one,
-; and then AA can see that the last load is a Use(LoE). Hence not optimized as
-; it claims. Note that if we replace the GEP indices 2 and 1, AA sees NoAlias
-; for the last load, before CSE-ing the first 2 loads.
-%struct.ImageParameters = type { i32, i32, i32 }
-@img = external global %struct.ImageParameters*, align 8
-define void @test1_macroblock() {
-entry:
-  ; MemoryUse(LoE)
-  %0 = load %struct.ImageParameters*, %struct.ImageParameters** @img, align 8
-
-  %Pos_2 = getelementptr inbounds %struct.ImageParameters, %struct.ImageParameters* %0, i64 0, i32 2
-  ; 1 = MemoryDef(LoE)
-  store i32 undef, i32* %Pos_2, align 8
-
-  ; MemoryUse(LoE)
-  %1 = load %struct.ImageParameters*, %struct.ImageParameters** @img, align 8
-
-  %Pos_1 = getelementptr inbounds %struct.ImageParameters, %struct.ImageParameters* %1, i64 0, i32 1
-  ; MemoryUse(1) MayAlias
-  %2 = load i32, i32* %Pos_1, align 4
-  unreachable
-}
-
-; Test 2:
-; EarlyCSE simplifies %string to undef. Def and Use used to be MustAlias, with
-; undef they are NoAlias. The Use can be optimized further to LoE. We can
-; de-optimize uses of replaced instructions, but in general this is not enough
-; (see next tests).
-%struct.TermS = type { i32, i32, i32, i32, i32, i8* }
-define fastcc void @test2_term_string() {
-entry:
-  %string = getelementptr inbounds %struct.TermS, %struct.TermS* undef, i64 0, i32 5
-  ; 1 = MemoryDef(LoE)
-  store i8* undef, i8** %string, align 8
-  ; MemoryUse(1) MustAlias
-  %0 = load i8*, i8** %string, align 8
-  unreachable
-}
-
-; Test 3:
-; EarlyCSE simplifies %0 to undef. So the second Def now stores to undef.
-; We now find the second load (Use(2) can be optimized further to LoE)
-; When replacing instructions, we can deoptimize all uses of the replaced
-; instruction and all uses of transitive accesses. However this does not stop
-; MemorySSA from being tripped by AA (see test4).
-%struct.Grammar = type { i8*, i8*, %struct.anon }
-%struct.anon = type { i32, i32, %struct.Term**, [3 x %struct.Term*] }
-%struct.Term = type { i32 }
-
-define fastcc void @test3_term_string(%struct.Grammar* %g) {
-entry:
-  ; 1 = MemoryDef(LoE)
-  store i8* undef, i8** undef, align 8
-  ; MemoryUse(LoE)
-  %0 = load i8*, i8** undef, align 8
-  %arrayidx = getelementptr inbounds i8, i8* %0, i64 undef
-  ; 2 = MemoryDef(1)
-  store i8 0, i8* %arrayidx, align 1
-  %v = getelementptr inbounds %struct.Grammar, %struct.Grammar* %g, i64 0, i32 2, i32 2
-  ; MemoryUse(2) MayAlias
-  %1 = load %struct.Term**, %struct.Term*** %v, align 8
-  unreachable
-}
-
-; Test 4:
-; Removing dead/unused instructions in if.then274 makes AA smarter. Before
-; removal, it finds %4 MayAlias the store above. After removal this can be
-; optimized to LoE. Hence after EarlyCSE, there is an access who claims is
-; optimized and it can be optimized further.
-
-; We can't escape such cases in general when relying on Alias Analysis.
-; The only fail-safe way to actually preserve MemorySSA when removing or
-; replacing instructions (i.e. get the *same* MemorySSA as if it was computed
-; for the updated IR) is to recompute it from scratch. What we get now is still
-; a correct update, but with accesses that claim to be optimized and can be
-; optimized further if we were to re-run MemorySSA on the IR.
-%struct.gnode.0.1.3.6.9.18.20.79 = type { i32, i32, i32, i32, i32, i32, i32, %struct.gnode.0.1.3.6.9.18.20.79* }
-@gnodeArray = external global %struct.gnode.0.1.3.6.9.18.20.79**, align 8
-
-define void @test4_shortest() {
-entry:
-  %exl.i = alloca [5 x i32], align 16
-  br i1 undef, label %if.then274, label %for.cond404
-
-if.then274:                                       ; preds = %if.end256
-  %0 = bitcast [5 x i32]* %exl.i to i8*
-  %arrayidx.i = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 1
-  %arrayidx1.i = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 2
-  %arrayidx2.i = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 3
-  %arrayidx3.i = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 4
-  %1 = bitcast [5 x i32]* %exl.i to i8*
-  %arrayidx.i1034 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 1
-  %arrayidx1.i1035 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 2
-  %arrayidx2.i1036 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 3
-  %arrayidx3.i1037 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 4
-  unreachable
-
-for.cond404:                                      ; preds = %if.end256
-  %2 = bitcast [5 x i32]* %exl.i to i8*
-  %arrayidx.i960 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 1
-  %arrayidx1.i961 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 2
-  %arrayidx2.i962 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 3
-  ; 1 = MemoryDef(LoE)
-  store i32 undef, i32* %arrayidx2.i962, align 4
-  %arrayidx3.i963 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 4
-
-  ; MemoryUse(LoE)
-  %3 = load %struct.gnode.0.1.3.6.9.18.20.79**, %struct.gnode.0.1.3.6.9.18.20.79*** @gnodeArray, align 8
-  %arrayidx6.i968 = getelementptr inbounds %struct.gnode.0.1.3.6.9.18.20.79*, %struct.gnode.0.1.3.6.9.18.20.79** %3, i64 undef
-  ; MemoryUse(1) MayAlias
-  %4 = load %struct.gnode.0.1.3.6.9.18.20.79*, %struct.gnode.0.1.3.6.9.18.20.79** %arrayidx6.i968, align 8
-  br i1 undef, label %for.cond26.preheader.i974, label %if.then20.for.body_crit_edge.i999
-
-for.cond26.preheader.i974:                        ; preds = %if.then20.i996
-  %5 = bitcast [5 x i32]* %exl.i to i8*
-  %arrayidx.i924 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 1
-  %arrayidx1.i925 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 2
-  %arrayidx2.i926 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 3
-  %arrayidx3.i927 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 4
-  unreachable
-
-if.then20.for.body_crit_edge.i999:                ; preds = %if.then20.i996
-  %arrayidx9.phi.trans.insert.i997 = getelementptr inbounds [5 x i32], [5 x i32]* %exl.i, i64 0, i64 undef
-  unreachable
-}
diff --git a/llvm/test/Transforms/EarlyCSE/read-reg.ll b/llvm/test/Transforms/EarlyCSE/read-reg.ll
deleted file mode 100644 (file)
index 25f5f80..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-; RUN: opt -S -early-cse < %s | FileCheck %s
-; RUN: opt -S -basicaa -early-cse-memssa < %s | FileCheck %s
-target datalayout = "E-m:e-i64:64-n32:64"
-target triple = "powerpc64-unknown-linux-gnu"
-
-; Function Attrs: nounwind
-define i64 @f(i64 %x) #0 {
-entry:
-  %0 = call i64 @llvm.read_register.i64(metadata !0)
-  call void bitcast (void (...)* @foo to void ()*)()
-  %1 = call i64 @llvm.read_register.i64(metadata !0)
-  %add = add nsw i64 %0, %1
-  ret i64 %add
-}
-
-; CHECK-LABEL: @f
-; CHECK: call i64 @llvm.read_register.i64
-; CHECK: call i64 @llvm.read_register.i64
-
-; Function Attrs: nounwind readnone
-declare i64 @llvm.read_register.i64(metadata) #1
-
-; Function Attrs: nounwind
-declare void @llvm.write_register.i64(metadata, i64) #2
-
-declare void @foo(...)
-
-attributes #0 = { nounwind }
-attributes #1 = { nounwind readnone }
-attributes #2 = { nounwind }
-
-!llvm.named.register.r1 = !{!0}
-
-!0 = !{!"r1"}
-