aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/DeadStoreElimination
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-06-18 06:05:24 +0000
committerChris Lattner <sabre@nondot.org>2011-06-18 06:05:24 +0000
commitb85e4eba85a38698f3b3332f82554bf8442547e2 (patch)
treeae680321c7e03ee37d612c42282038950d37ea13 /test/Transforms/DeadStoreElimination
parent6be41eb7f00319f5ffa1a5435dcd1e81b3ce932d (diff)
downloadexternal_llvm-b85e4eba85a38698f3b3332f82554bf8442547e2.zip
external_llvm-b85e4eba85a38698f3b3332f82554bf8442547e2.tar.gz
external_llvm-b85e4eba85a38698f3b3332f82554bf8442547e2.tar.bz2
rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which is
for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the target indep prefetch change. As usual, updating the testsuite is a PITA. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133337 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/DeadStoreElimination')
-rw-r--r--test/Transforms/DeadStoreElimination/crash.ll4
-rw-r--r--test/Transforms/DeadStoreElimination/lifetime.ll4
-rw-r--r--test/Transforms/DeadStoreElimination/memintrinsics.ll12
-rw-r--r--test/Transforms/DeadStoreElimination/simple.ll22
4 files changed, 20 insertions, 22 deletions
diff --git a/test/Transforms/DeadStoreElimination/crash.ll b/test/Transforms/DeadStoreElimination/crash.ll
index bb279cd..148695f 100644
--- a/test/Transforms/DeadStoreElimination/crash.ll
+++ b/test/Transforms/DeadStoreElimination/crash.ll
@@ -36,11 +36,11 @@ bb14: ; preds = %bb4
%6 = getelementptr inbounds i16* %2, i64 undef ; <i16*> [#uses=1]
store i16 undef, i16* %6, align 2
%7 = getelementptr inbounds i8* %5, i64 undef ; <i8*> [#uses=1]
- call void @llvm.memcpy.i64(i8* %7, i8* undef, i64 undef, i32 1) nounwind
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %7, i8* undef, i64 undef, i32 1, i1 false)
unreachable
}
-declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
; rdar://7635088
diff --git a/test/Transforms/DeadStoreElimination/lifetime.ll b/test/Transforms/DeadStoreElimination/lifetime.ll
index 2b5cc5a..6785653 100644
--- a/test/Transforms/DeadStoreElimination/lifetime.ll
+++ b/test/Transforms/DeadStoreElimination/lifetime.ll
@@ -4,7 +4,7 @@ target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:1
declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
-declare void @llvm.memset.i8(i8*, i8, i8, i32)
+declare void @llvm.memset.p0i8.i8(i8* nocapture, i8, i8, i32, i1) nounwind
define void @test1() {
; CHECK: @test1
@@ -14,7 +14,7 @@ define void @test1() {
call void @llvm.lifetime.end(i64 1, i8* %A)
; CHECK: lifetime.end
- call void @llvm.memset.i8(i8* %A, i8 0, i8 -1, i32 0)
+ call void @llvm.memset.p0i8.i8(i8* %A, i8 0, i8 -1, i32 0, i1 false)
; CHECK-NOT: memset
ret void
diff --git a/test/Transforms/DeadStoreElimination/memintrinsics.ll b/test/Transforms/DeadStoreElimination/memintrinsics.ll
index e31e9fa..d5c5365 100644
--- a/test/Transforms/DeadStoreElimination/memintrinsics.ll
+++ b/test/Transforms/DeadStoreElimination/memintrinsics.ll
@@ -1,8 +1,8 @@
; RUN: opt -S -dse < %s | FileCheck %s
-declare void @llvm.memcpy.i8(i8*, i8*, i8, i32)
-declare void @llvm.memmove.i8(i8*, i8*, i8, i32)
-declare void @llvm.memset.i8(i8*, i8, i8, i32)
+declare void @llvm.memcpy.p0i8.p0i8.i8(i8* nocapture, i8* nocapture, i8, i32, i1) nounwind
+declare void @llvm.memmove.p0i8.p0i8.i8(i8* nocapture, i8* nocapture, i8, i32, i1) nounwind
+declare void @llvm.memset.p0i8.i8(i8* nocapture, i8, i8, i32, i1) nounwind
define void @test1() {
; CHECK: @test1
@@ -12,7 +12,7 @@ define void @test1() {
store i8 0, i8* %A ;; Written to by memcpy
; CHECK-NOT: store
- call void @llvm.memcpy.i8(i8* %A, i8* %B, i8 -1, i32 0)
+ call void @llvm.memcpy.p0i8.p0i8.i8(i8* %A, i8* %B, i8 -1, i32 0, i1 false)
ret void
; CHECK: ret void
@@ -26,7 +26,7 @@ define void @test2() {
store i8 0, i8* %A ;; Written to by memmove
; CHECK-NOT: store
- call void @llvm.memmove.i8(i8* %A, i8* %B, i8 -1, i32 0)
+ call void @llvm.memmove.p0i8.p0i8.i8(i8* %A, i8* %B, i8 -1, i32 0, i1 false)
ret void
; CHECK: ret void
@@ -40,7 +40,7 @@ define void @test3() {
store i8 0, i8* %A ;; Written to by memset
; CHECK-NOT: store
- call void @llvm.memset.i8(i8* %A, i8 0, i8 -1, i32 0)
+ call void @llvm.memset.p0i8.i8(i8* %A, i8 0, i8 -1, i32 0, i1 false)
ret void
; CHECK: ret void
diff --git a/test/Transforms/DeadStoreElimination/simple.ll b/test/Transforms/DeadStoreElimination/simple.ll
index 23576da..5f143fc 100644
--- a/test/Transforms/DeadStoreElimination/simple.ll
+++ b/test/Transforms/DeadStoreElimination/simple.ll
@@ -3,8 +3,6 @@ target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:1
declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
-declare void @llvm.memset.i64(i8*, i8, i64, i32)
-declare void @llvm.memcpy.i64(i8*, i8*, i64, i32)
declare i8* @llvm.init.trampoline(i8*, i8*, i8*)
define void @test1(i32* %Q, i32* %P) {
@@ -65,7 +63,7 @@ define void @test5(i32* %Q) {
; alias).
define void @test6(i32 *%p, i8 *%q) {
store i32 10, i32* %p, align 4 ;; dead.
- call void @llvm.memset.i64(i8* %q, i8 42, i64 900, i32 1)
+ call void @llvm.memset.p0i8.i64(i8* %q, i8 42, i64 900, i32 1, i1 false)
store i32 30, i32* %p, align 4
ret void
; CHECK: @test6
@@ -76,7 +74,7 @@ define void @test6(i32 *%p, i8 *%q) {
; alias).
define void @test7(i32 *%p, i8 *%q, i8* noalias %r) {
store i32 10, i32* %p, align 4 ;; dead.
- call void @llvm.memcpy.i64(i8* %q, i8* %r, i64 900, i32 1)
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %q, i8* %r, i64 900, i32 1, i1 false)
store i32 30, i32* %p, align 4
ret void
; CHECK: @test7
@@ -184,8 +182,8 @@ define void @test14(i32* %Q) {
;; Fully dead overwrite of memcpy.
define void @test15(i8* %P, i8* %Q) nounwind ssp {
- tail call void @llvm.memcpy.i64(i8* %P, i8* %Q, i64 12, i32 1)
- tail call void @llvm.memcpy.i64(i8* %P, i8* %Q, i64 12, i32 1)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
ret void
; CHECK: @test15
; CHECK-NEXT: call void @llvm.memcpy
@@ -194,8 +192,8 @@ define void @test15(i8* %P, i8* %Q) nounwind ssp {
;; Full overwrite of smaller memcpy.
define void @test16(i8* %P, i8* %Q) nounwind ssp {
- tail call void @llvm.memcpy.i64(i8* %P, i8* %Q, i64 8, i32 1)
- tail call void @llvm.memcpy.i64(i8* %P, i8* %Q, i64 12, i32 1)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 8, i32 1, i1 false)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
ret void
; CHECK: @test16
; CHECK-NEXT: call void @llvm.memcpy
@@ -204,8 +202,8 @@ define void @test16(i8* %P, i8* %Q) nounwind ssp {
;; Overwrite of memset by memcpy.
define void @test17(i8* %P, i8* noalias %Q) nounwind ssp {
- tail call void @llvm.memset.i64(i8* %P, i8 42, i64 8, i32 1)
- tail call void @llvm.memcpy.i64(i8* %P, i8* %Q, i64 12, i32 1)
+ tail call void @llvm.memset.p0i8.i64(i8* %P, i8 42, i64 8, i32 1, i1 false)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
ret void
; CHECK: @test17
; CHECK-NEXT: call void @llvm.memcpy
@@ -228,8 +226,8 @@ define void @test17v(i8* %P, i8* %Q) nounwind ssp {
; A = B
; A = A
define void @test18(i8* %P, i8* %Q, i8* %R) nounwind ssp {
- tail call void @llvm.memcpy.i64(i8* %P, i8* %Q, i64 12, i32 1)
- tail call void @llvm.memcpy.i64(i8* %P, i8* %R, i64 12, i32 1)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i32 1, i1 false)
ret void
; CHECK: @test18
; CHECK-NEXT: call void @llvm.memcpy