summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/ScalarRepl
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-11-18 22:17:24 +0000
committerPete Cooper <peter_cooper@apple.com>2015-11-18 22:17:24 +0000
commit72bc23ef02bad3873d3572b2be529404a461d449 (patch)
treef1a47c225592be2aa94fdcaf411d1d5f51a7c193 /llvm/test/Transforms/ScalarRepl
parentb035bd03e4db325de2380ea9263e10de5b9be3b6 (diff)
downloadbcm5719-llvm-72bc23ef02bad3873d3572b2be529404a461d449.tar.gz
bcm5719-llvm-72bc23ef02bad3873d3572b2be529404a461d449.zip
Change memcpy/memset/memmove to have dest and source alignments.
Note, this was reviewed (and more details are in) http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html These intrinsics currently have an explicit alignment argument which is required to be a constant integer. It represents the alignment of the source and dest, and so must be the minimum of those. This change allows source and dest to each have their own alignments by using the alignment attribute on their arguments. The alignment argument itself is removed. There are a few places in the code for which the code needs to be checked by an expert as to whether using only src/dest alignment is safe. For those places, they currently take the minimum of src/dest alignments which matches the current behaviour. For example, code which used to read: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 500, i32 8, i1 false) will now read: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %dest, i8* align 8 %src, i32 500, i1 false) For out of tree owners, I was able to strip alignment from calls using sed by replacing: (call.*llvm\.memset.*)i32\ [0-9]*\,\ i1 false\) with: $1i1 false) and similarly for memmove and memcpy. I then added back in alignment to test cases which needed it. A similar commit will be made to clang which actually has many differences in alignment as now IRBuilder can generate different source/dest alignments on calls. In IRBuilder itself, a new argument was added. Instead of calling: CreateMemCpy(Dst, Src, getInt64(Size), DstAlign, /* isVolatile */ false) you now call CreateMemCpy(Dst, Src, getInt64(Size), DstAlign, SrcAlign, /* isVolatile */ false) There is a temporary class (IntegerAlignment) which takes the source alignment and rejects implicit conversion from bool. This is to prevent isVolatile here from passing its default parameter to the source alignment. Note, changes in future can now be made to codegen. I didn't change anything here, but this change should enable better memcpy code sequences. Reviewed by Hal Finkel. llvm-svn: 253511
Diffstat (limited to 'llvm/test/Transforms/ScalarRepl')
-rw-r--r--llvm/test/Transforms/ScalarRepl/2007-05-29-MemcpyPreserve.ll6
-rw-r--r--llvm/test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll6
-rw-r--r--llvm/test/Transforms/ScalarRepl/2008-08-22-out-of-range-array-promote.ll4
-rw-r--r--llvm/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll4
-rw-r--r--llvm/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll4
-rw-r--r--llvm/test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll10
-rw-r--r--llvm/test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll4
-rw-r--r--llvm/test/Transforms/ScalarRepl/2011-05-06-CapturedAlloca.ll4
-rw-r--r--llvm/test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll6
-rw-r--r--llvm/test/Transforms/ScalarRepl/2011-10-11-VectorMemset.ll4
-rw-r--r--llvm/test/Transforms/ScalarRepl/2011-11-11-EmptyStruct.ll4
-rw-r--r--llvm/test/Transforms/ScalarRepl/address-space.ll8
-rw-r--r--llvm/test/Transforms/ScalarRepl/badarray.ll4
-rw-r--r--llvm/test/Transforms/ScalarRepl/copy-aggregate.ll8
-rw-r--r--llvm/test/Transforms/ScalarRepl/crash.ll8
-rw-r--r--llvm/test/Transforms/ScalarRepl/inline-vector.ll6
-rw-r--r--llvm/test/Transforms/ScalarRepl/memcpy-align.ll6
-rw-r--r--llvm/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll4
-rw-r--r--llvm/test/Transforms/ScalarRepl/memset-aggregate.ll12
-rw-r--r--llvm/test/Transforms/ScalarRepl/negative-memset.ll6
-rw-r--r--llvm/test/Transforms/ScalarRepl/only-memcpy-uses.ll6
-rw-r--r--llvm/test/Transforms/ScalarRepl/vector_memcpy.ll8
22 files changed, 66 insertions, 66 deletions
diff --git a/llvm/test/Transforms/ScalarRepl/2007-05-29-MemcpyPreserve.ll b/llvm/test/Transforms/ScalarRepl/2007-05-29-MemcpyPreserve.ll
index 966b17939fe..a4b469f41bc 100644
--- a/llvm/test/Transforms/ScalarRepl/2007-05-29-MemcpyPreserve.ll
+++ b/llvm/test/Transforms/ScalarRepl/2007-05-29-MemcpyPreserve.ll
@@ -13,12 +13,12 @@ entry:
%tmp = alloca %struct.UnionType, align 8
%tmp2 = getelementptr %struct.UnionType, %struct.UnionType* %tmp, i32 0, i32 0, i32 0
%tmp13 = getelementptr %struct.UnionType, %struct.UnionType* %p, i32 0, i32 0, i32 0
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp2, i8* %tmp13, i32 8, i32 0, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp2, i8* %tmp13, i32 8, i1 false)
%tmp5 = load %struct.UnionType*, %struct.UnionType** %pointerToUnion
%tmp56 = getelementptr %struct.UnionType, %struct.UnionType* %tmp5, i32 0, i32 0, i32 0
%tmp7 = getelementptr %struct.UnionType, %struct.UnionType* %tmp, i32 0, i32 0, i32 0
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp56, i8* %tmp7, i32 8, i32 0, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp56, i8* %tmp7, i32 8, i1 false)
ret void
}
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll b/llvm/test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll
index f597613ef2b..2117ce3e448 100644
--- a/llvm/test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll
+++ b/llvm/test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll
@@ -8,10 +8,10 @@ define void @memtest1(i8* %dst, i8* %src) nounwind {
entry:
%temp = alloca [200 x i8]
%temp1 = bitcast [200 x i8]* %temp to i8*
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %temp1, i8* %src, i32 200, i32 1, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %temp1, i8* %src, i32 200, i1 false)
%temp3 = bitcast [200 x i8]* %temp to i8*
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %temp3, i32 200, i32 1, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %temp3, i32 200, i1 false)
ret void
}
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/2008-08-22-out-of-range-array-promote.ll b/llvm/test/Transforms/ScalarRepl/2008-08-22-out-of-range-array-promote.ll
index c0ff25f3541..e245524b774 100644
--- a/llvm/test/Transforms/ScalarRepl/2008-08-22-out-of-range-array-promote.ll
+++ b/llvm/test/Transforms/ScalarRepl/2008-08-22-out-of-range-array-promote.ll
@@ -12,7 +12,7 @@ entry:
%0 = call i32 @a(%struct.x* %s) nounwind
%r1 = bitcast %struct.x* %r to i8*
%s2 = bitcast %struct.x* %s to i8*
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %r1, i8* %s2, i32 12, i32 8, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %r1, i8* %s2, i32 12, i1 false)
%1 = getelementptr %struct.x, %struct.x* %r, i32 0, i32 0, i32 1
%2 = load i32, i32* %1, align 4
ret i32 %2
@@ -20,4 +20,4 @@ entry:
declare i32 @a(%struct.x*)
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll b/llvm/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll
index 16d9108bb24..f713be4ac15 100644
--- a/llvm/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll
+++ b/llvm/test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll
@@ -18,8 +18,8 @@ entry:
; because the type of the first element in %struct.two is i8.
%tmpS = getelementptr %struct.two, %struct.two* %S, i32 0, i32 0, i32 0
%tmpD = bitcast %struct.two* %D to i8*
- call void @llvm.memmove.p0i8.p0i8.i32(i8* %tmpD, i8* %tmpS, i32 4, i32 1, i1 false)
+ call void @llvm.memmove.p0i8.p0i8.i32(i8* %tmpD, i8* %tmpS, i32 4, i1 false)
ret void
}
-declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll b/llvm/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll
index 025578c7f44..0fff595db75 100644
--- a/llvm/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll
+++ b/llvm/test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll
@@ -12,8 +12,8 @@ entry:
%0 = getelementptr %struct.st, %struct.st* %s, i32 0, i32 0 ; <i16*> [#uses=1]
store i16 1, i16* %0, align 4
%s1 = bitcast %struct.st* %s to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %p, i8* %s1, i32 2, i32 1, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %p, i8* align 1 %s1, i32 2, i1 false)
ret void
}
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll b/llvm/test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll
index d1cc4244ccf..f8f48a18cdc 100644
--- a/llvm/test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll
+++ b/llvm/test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll
@@ -51,14 +51,14 @@ entry:
%18 = getelementptr inbounds %union..0anon, %union..0anon* %__rv, i32 0, i32 0
%19 = bitcast %struct.int16x8x2_t* %0 to i8*
%20 = bitcast %struct.int16x8x2_t* %18 to i8*
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %19, i8* %20, i32 32, i32 16, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %19, i8* %20, i32 32, i1 false)
%tmp21 = bitcast %struct.int16x8x2_t* %tmp2 to i8*
%21 = bitcast %struct.int16x8x2_t* %0 to i8*
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp21, i8* %21, i32 32, i32 16, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp21, i8* %21, i32 32, i1 false)
%22 = load %struct.int16x8x2_t*, %struct.int16x8x2_t** %dst_addr, align 4
%23 = bitcast %struct.int16x8x2_t* %22 to i8*
%tmp22 = bitcast %struct.int16x8x2_t* %tmp2 to i8*
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %23, i8* %tmp22, i32 32, i32 16, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %23, i8* %tmp22, i32 32, i1 false)
br label %return
return: ; preds = %entry
@@ -76,7 +76,7 @@ entry:
cond.true: ; preds = %entry
%tmp3 = bitcast %struct._NSRange* %range to i8*
%tmp4 = bitcast %struct._NSRange* %range to i8*
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp3, i8* %tmp4, i32 8, i32 8, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp3, i8* %tmp4, i32 8, i1 false)
ret void
cond.false: ; preds = %entry
@@ -87,4 +87,4 @@ cond.false: ; preds = %entry
; CHECK: br i1
}
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll b/llvm/test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll
index b926b021caf..8472d442b47 100644
--- a/llvm/test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll
+++ b/llvm/test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll
@@ -11,8 +11,8 @@ define void @test_memcpy_self() nounwind {
; CHECK: ret void
%1 = alloca %struct.test
%2 = bitcast %struct.test* %1 to i8*
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %2, i8* %2, i32 24, i32 4, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %2, i8* %2, i32 24, i1 false)
ret void
}
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/2011-05-06-CapturedAlloca.ll b/llvm/test/Transforms/ScalarRepl/2011-05-06-CapturedAlloca.ll
index 997d03b059e..44013070367 100644
--- a/llvm/test/Transforms/ScalarRepl/2011-05-06-CapturedAlloca.ll
+++ b/llvm/test/Transforms/ScalarRepl/2011-05-06-CapturedAlloca.ll
@@ -15,7 +15,7 @@ define i32 @main() nounwind {
entry:
%l_10 = alloca [4 x i32], align 16
%tmp = bitcast [4 x i32]* %l_10 to i8*
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp, i8* bitcast ([4 x i32]* @func_1.l_10 to i8*), i64 16, i32 16, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp, i8* bitcast ([4 x i32]* @func_1.l_10 to i8*), i64 16, i1 false)
; CHECK: call void @llvm.memcpy
%arrayidx = getelementptr inbounds [4 x i32], [4 x i32]* %l_10, i64 0, i64 0
%call = call i32* @noop(i32* %arrayidx)
@@ -23,4 +23,4 @@ entry:
ret i32 0
}
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll b/llvm/test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll
index af6d1f36fae..f641f46f18a 100644
--- a/llvm/test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll
+++ b/llvm/test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll
@@ -13,7 +13,7 @@ define float @f() nounwind ssp {
entry:
%a = alloca <4 x float>, align 16
%p = bitcast <4 x float>* %a to i8*
- call void @llvm.memset.p0i8.i32(i8* %p, i8 0, i32 3, i32 16, i1 false)
+ call void @llvm.memset.p0i8.i32(i8* %p, i8 0, i32 3, i1 false)
%vec = load <4 x float>, <4 x float>* %a, align 8
%val = extractelement <4 x float> %vec, i32 0
ret float %val
@@ -27,11 +27,11 @@ define void @g() nounwind ssp {
entry:
%a = alloca { <4 x float> }, align 16
%p = bitcast { <4 x float> }* %a to i8*
- call void @llvm.memset.p0i8.i32(i8* %p, i8 0, i32 16, i32 16, i1 false)
+ call void @llvm.memset.p0i8.i32(i8* %p, i8 0, i32 16, i1 false)
%q = bitcast { <4 x float> }* %a to [2 x <2 x float>]*
%arrayidx = getelementptr inbounds [2 x <2 x float>], [2 x <2 x float>]* %q, i32 0, i32 0
store <2 x float> undef, <2 x float>* %arrayidx, align 8
ret void
}
-declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/2011-10-11-VectorMemset.ll b/llvm/test/Transforms/ScalarRepl/2011-10-11-VectorMemset.ll
index 9e312314929..3ea4971cac9 100644
--- a/llvm/test/Transforms/ScalarRepl/2011-10-11-VectorMemset.ll
+++ b/llvm/test/Transforms/ScalarRepl/2011-10-11-VectorMemset.ll
@@ -12,11 +12,11 @@ entry:
for_test158.preheader: ; preds = %entry
%a156286305 = bitcast [4 x <4 x float>]* %a156286 to i8*
- call void @llvm.memset.p0i8.i64(i8* %a156286305, i8 -1, i64 64, i32 16, i1 false)
+ call void @llvm.memset.p0i8.i64(i8* %a156286305, i8 -1, i64 64, i1 false)
unreachable
cif_done: ; preds = %entry
ret void
}
-declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/2011-11-11-EmptyStruct.ll b/llvm/test/Transforms/ScalarRepl/2011-11-11-EmptyStruct.ll
index 51d1d146a90..abe04225835 100644
--- a/llvm/test/Transforms/ScalarRepl/2011-11-11-EmptyStruct.ll
+++ b/llvm/test/Transforms/ScalarRepl/2011-11-11-EmptyStruct.ll
@@ -17,10 +17,10 @@ entry:
store double 1.000000e+00, double* %b, align 8
%0 = bitcast %struct.S* %retval to i8*
%1 = bitcast %struct.S* %ret to i8*
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* %1, i64 8, i32 8, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* %1, i64 8, i1 false)
%2 = bitcast %struct.S* %retval to double*
%3 = load double, double* %2, align 1
ret double %3
}
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/address-space.ll b/llvm/test/Transforms/ScalarRepl/address-space.ll
index b8b90efefc3..b34e5e343ae 100644
--- a/llvm/test/Transforms/ScalarRepl/address-space.ll
+++ b/llvm/test/Transforms/ScalarRepl/address-space.ll
@@ -16,7 +16,7 @@ entry:
%arrayidx = getelementptr inbounds %struct.anon, %struct.anon addrspace(2)* %pPtr, i64 0 ; <%struct.anon addrspace(2)*> [#uses=1]
%tmp1 = bitcast %struct.anon* %s to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.anon addrspace(2)* %arrayidx to i8 addrspace(2)* ; <i8 addrspace(2)*> [#uses=1]
- call void @llvm.memcpy.p0i8.p2i8.i64(i8* %tmp1, i8 addrspace(2)* %tmp2, i64 4, i32 4, i1 false)
+ call void @llvm.memcpy.p0i8.p2i8.i64(i8* %tmp1, i8 addrspace(2)* %tmp2, i64 4, i1 false)
%tmp3 = getelementptr inbounds %struct.anon, %struct.anon* %s, i32 0, i32 0 ; <[1 x float]*> [#uses=1]
%arrayidx4 = getelementptr inbounds [1 x float], [1 x float]* %tmp3, i32 0, i64 0 ; <float*> [#uses=2]
%tmp5 = load float, float* %arrayidx4 ; <float> [#uses=1]
@@ -25,11 +25,11 @@ entry:
%arrayidx7 = getelementptr inbounds %struct.anon, %struct.anon addrspace(2)* %pPtr, i64 0 ; <%struct.anon addrspace(2)*> [#uses=1]
%tmp8 = bitcast %struct.anon addrspace(2)* %arrayidx7 to i8 addrspace(2)* ; <i8 addrspace(2)*> [#uses=1]
%tmp9 = bitcast %struct.anon* %s to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.p2i8.p0i8.i64(i8 addrspace(2)* %tmp8, i8* %tmp9, i64 4, i32 4, i1 false)
+ call void @llvm.memcpy.p2i8.p0i8.i64(i8 addrspace(2)* %tmp8, i8* %tmp9, i64 4, i1 false)
ret void
}
-declare void @llvm.memcpy.p0i8.p2i8.i64(i8* nocapture, i8 addrspace(2)* nocapture, i64, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p2i8.i64(i8* nocapture, i8 addrspace(2)* nocapture, i64, i1) nounwind
-declare void @llvm.memcpy.p2i8.p0i8.i64(i8 addrspace(2)* nocapture, i8* nocapture, i64, i32, i1) nounwind
+declare void @llvm.memcpy.p2i8.p0i8.i64(i8 addrspace(2)* nocapture, i8* nocapture, i64, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/badarray.ll b/llvm/test/Transforms/ScalarRepl/badarray.ll
index 6f5bc95b43b..ed6ab2e6a96 100644
--- a/llvm/test/Transforms/ScalarRepl/badarray.ll
+++ b/llvm/test/Transforms/ScalarRepl/badarray.ll
@@ -48,10 +48,10 @@ entry:
%callret = call %padded *@test3f() ; <i32> [#uses=2]
%callretcast = bitcast %padded* %callret to i8* ; <i8*> [#uses=1]
%var_11 = bitcast %padded* %var_1 to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %callretcast, i8* %var_11, i32 8, i32 4, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %callretcast, i8* %var_11, i32 8, i1 false)
ret void
}
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind
declare %padded* @test3f()
diff --git a/llvm/test/Transforms/ScalarRepl/copy-aggregate.ll b/llvm/test/Transforms/ScalarRepl/copy-aggregate.ll
index 97977dbf11f..79273dd9957 100644
--- a/llvm/test/Transforms/ScalarRepl/copy-aggregate.ll
+++ b/llvm/test/Transforms/ScalarRepl/copy-aggregate.ll
@@ -75,9 +75,9 @@ entry:
%var = alloca [4 x %padded], align 4
%vari8 = bitcast [4 x %padded]* %var to i8*
%pi8 = bitcast [4 x %padded]* %p to i8*
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vari8, i8* %pi8, i32 16, i32 4, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vari8, i8* %pi8, i32 16, i1 false)
%qi8 = bitcast [4 x %padded]* %q to i8*
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %qi8, i8* %vari8, i32 16, i32 4, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %qi8, i8* %vari8, i32 16, i1 false)
ret void
}
@@ -98,10 +98,10 @@ entry:
store %homogeneous %res, %homogeneous* %varcast
%tmp1 = bitcast %wrapped_array* %arr to i8*
%tmp2 = bitcast %wrapped_array* %var to i8*
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp1, i8* %tmp2, i32 48, i32 16, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp1, i8* %tmp2, i32 48, i1 false)
ret void
}
declare %homogeneous @test6callee(i8* nocapture) nounwind
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/crash.ll b/llvm/test/Transforms/ScalarRepl/crash.ll
index 72e9f090fb6..715f739f590 100644
--- a/llvm/test/Transforms/ScalarRepl/crash.ll
+++ b/llvm/test/Transforms/ScalarRepl/crash.ll
@@ -157,7 +157,7 @@ cond_next114.i: ; preds = %cond_true
cond_next: ; preds = %cond_true
%SB19 = bitcast %struct.aal_spanbucket_t* %SB to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %SB19, i8* null, i32 12, i32 0, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %SB19, i8* null, i32 12, i1 false)
br i1 false, label %cond_next34, label %cond_next79
cond_next34: ; preds = %cond_next
@@ -195,7 +195,7 @@ entry:
%.compoundliteral = alloca %0
%tmp228 = getelementptr %0, %0* %.compoundliteral, i32 0, i32 7
%tmp229 = bitcast [0 x i16]* %tmp228 to i8*
- call void @llvm.memset.p0i8.i64(i8* %tmp229, i8 0, i64 0, i32 2, i1 false)
+ call void @llvm.memset.p0i8.i64(i8* %tmp229, i8 0, i64 0, i1 false)
unreachable
}
@@ -282,5 +282,5 @@ for.end: ; preds = %for.body10
ret void
}
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
-declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/inline-vector.ll b/llvm/test/Transforms/ScalarRepl/inline-vector.ll
index 85f37414e65..422d4dd74f1 100644
--- a/llvm/test/Transforms/ScalarRepl/inline-vector.ll
+++ b/llvm/test/Transforms/ScalarRepl/inline-vector.ll
@@ -16,7 +16,7 @@ entry:
%vector = alloca %struct.Vector4, align 16
%agg.tmp = alloca %struct.Vector4, align 16
%tmp = bitcast %struct.Vector4* %vector to i8*
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp, i8* bitcast (%struct.Vector4* @f.vector to i8*), i32 16, i32 16, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp, i8* bitcast (%struct.Vector4* @f.vector to i8*), i32 16, i1 false)
br label %for.cond
for.cond: ; preds = %for.body, %entry
@@ -28,7 +28,7 @@ for.cond: ; preds = %for.body, %entry
for.body: ; preds = %for.cond
%tmp2 = bitcast %struct.Vector4* %agg.tmp to i8*
%tmp3 = bitcast %struct.Vector4* %vector to i8*
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp2, i8* %tmp3, i32 16, i32 16, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp2, i8* %tmp3, i32 16, i1 false)
%0 = bitcast %struct.Vector4* %agg.tmp to [2 x i64]*
%1 = load [2 x i64], [2 x i64]* %0, align 16
%tmp2.i = extractvalue [2 x i64] %1, 0
@@ -49,5 +49,5 @@ for.end: ; preds = %for.cond
ret void
}
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind
declare i32 @printf(...)
diff --git a/llvm/test/Transforms/ScalarRepl/memcpy-align.ll b/llvm/test/Transforms/ScalarRepl/memcpy-align.ll
index 29a1bb8a4b5..4c9621a6a73 100644
--- a/llvm/test/Transforms/ScalarRepl/memcpy-align.ll
+++ b/llvm/test/Transforms/ScalarRepl/memcpy-align.ll
@@ -13,9 +13,9 @@ define void @good() nounwind {
entry:
%x0 = alloca %struct.anon, align 4 ; <%struct.anon*> [#uses=2]
%tmp = bitcast %struct.anon* %x0 to i8* ; <i8*> [#uses=1]
- call void @llvm.memset.p0i8.i32(i8* %tmp, i8 0, i32 4, i32 4, i1 false)
+ call void @llvm.memset.p0i8.i32(i8* %tmp, i8 0, i32 4, i1 false)
%tmp1 = bitcast %struct.anon* %x0 to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds (%0, %0* @c, i32
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 getelementptr inbounds (%0, %0* @c, i32
0, i32 0, i32 0, i32 0), i8* %tmp1, i32 4, i32 4, i1 false)
ret void
@@ -25,7 +25,7 @@ entry:
; CHECK: store i8 0, i8*{{.*}}, align 1
}
-declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i1) nounwind
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32,
i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll b/llvm/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll
index e8088c121fb..dc01d2b2ee5 100644
--- a/llvm/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll
+++ b/llvm/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll
@@ -14,10 +14,10 @@ entry:
%L = alloca %struct.foo, align 2 ; <%struct.foo*> [#uses=1]
%L2 = getelementptr %struct.foo, %struct.foo* %L, i32 0, i32 0 ; <i8*> [#uses=2]
%tmp13 = getelementptr %struct.foo, %struct.foo* %P, i32 0, i32 0 ; <i8*> [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32( i8* %L2, i8* %tmp13, i32 2, i32 1, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32( i8* %L2, i8* %tmp13, i32 2, i1 false)
%tmp5 = load i8, i8* %L2 ; <i8> [#uses=1]
%tmp56 = sext i8 %tmp5 to i32 ; <i32> [#uses=1]
ret i32 %tmp56
}
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1)
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1)
diff --git a/llvm/test/Transforms/ScalarRepl/memset-aggregate.ll b/llvm/test/Transforms/ScalarRepl/memset-aggregate.ll
index 98e2dddefe7..abdfeabc08b 100644
--- a/llvm/test/Transforms/ScalarRepl/memset-aggregate.ll
+++ b/llvm/test/Transforms/ScalarRepl/memset-aggregate.ll
@@ -14,7 +14,7 @@ entry:
%L = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2]
%L2 = bitcast %struct.foo* %L to i8* ; <i8*> [#uses=1]
%tmp13 = bitcast %struct.foo* %P to i8* ; <i8*> [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %L2, i8* %tmp13, i32 8, i32 4, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %L2, i8* %tmp13, i32 8, i1 false)
%tmp4 = getelementptr %struct.foo, %struct.foo* %L, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp5 = load i32, i32* %tmp4 ; <i32> [#uses=1]
ret i32 %tmp5
@@ -25,7 +25,7 @@ define i32 @test2() {
entry:
%L = alloca [4 x %struct.foo], align 16 ; <[4 x %struct.foo]*> [#uses=2]
%L12 = bitcast [4 x %struct.foo]* %L to i8* ; <i8*> [#uses=1]
- call void @llvm.memset.p0i8.i32(i8* %L12, i8 0, i32 32, i32 16, i1 false)
+ call void @llvm.memset.p0i8.i32(i8* %L12, i8 0, i32 32, i1 false)
%tmp4 = getelementptr [4 x %struct.foo], [4 x %struct.foo]* %L, i32 0, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp5 = load i32, i32* %tmp4 ; <i32> [#uses=1]
ret i32 %tmp5
@@ -36,7 +36,7 @@ define i32 @test3() {
entry:
%B = alloca %struct.bar, align 16 ; <%struct.bar*> [#uses=4]
%B1 = bitcast %struct.bar* %B to i8* ; <i8*> [#uses=1]
- call void @llvm.memset.p0i8.i32(i8* %B1, i8 1, i32 24, i32 16, i1 false)
+ call void @llvm.memset.p0i8.i32(i8* %B1, i8 1, i32 24, i1 false)
%tmp3 = getelementptr %struct.bar, %struct.bar* %B, i32 0, i32 0, i32 0 ; <i32*> [#uses=1]
store i32 1, i32* %tmp3
%tmp4 = getelementptr %struct.bar, %struct.bar* %B, i32 0, i32 2 ; <double*> [#uses=1]
@@ -56,12 +56,12 @@ entry:
store i32 1, i32* %0, align 8
%1 = getelementptr %struct.f, %struct.f* %A, i32 0, i32 1 ; <i32*> [#uses=1]
%2 = bitcast i32* %1 to i8* ; <i8*> [#uses=1]
- call void @llvm.memset.p0i8.i32(i8* %2, i8 2, i32 12, i32 4, i1 false)
+ call void @llvm.memset.p0i8.i32(i8* %2, i8 2, i32 12, i1 false)
%3 = getelementptr %struct.f, %struct.f* %A, i32 0, i32 2 ; <i32*> [#uses=1]
%4 = load i32, i32* %3, align 8 ; <i32> [#uses=1]
%retval12 = trunc i32 %4 to i16 ; <i16> [#uses=1]
ret i16 %retval12
}
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind
-declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/negative-memset.ll b/llvm/test/Transforms/ScalarRepl/negative-memset.ll
index 458d9610cd7..480a60713cf 100644
--- a/llvm/test/Transforms/ScalarRepl/negative-memset.ll
+++ b/llvm/test/Transforms/ScalarRepl/negative-memset.ll
@@ -11,10 +11,10 @@ entry:
%buff = alloca [1 x i8], align 1
store i32 0, i32* %retval
%0 = bitcast [1 x i8]* %buff to i8*
- call void @llvm.memset.p0i8.i32(i8* %0, i8 0, i32 1, i32 1, i1 false)
+ call void @llvm.memset.p0i8.i32(i8* %0, i8 0, i32 1, i1 false)
%arraydecay = getelementptr inbounds [1 x i8], [1 x i8]* %buff, i32 0, i32 0
- call void @llvm.memset.p0i8.i32(i8* %arraydecay, i8 -1, i32 -8, i32 1, i1 false) ; Negative 8!
+ call void @llvm.memset.p0i8.i32(i8* %arraydecay, i8 -1, i32 -8, i1 false) ; Negative 8!
ret i32 0
}
-declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i1) nounwind
diff --git a/llvm/test/Transforms/ScalarRepl/only-memcpy-uses.ll b/llvm/test/Transforms/ScalarRepl/only-memcpy-uses.ll
index d0ed20b26bc..72d135dff34 100644
--- a/llvm/test/Transforms/ScalarRepl/only-memcpy-uses.ll
+++ b/llvm/test/Transforms/ScalarRepl/only-memcpy-uses.ll
@@ -14,14 +14,14 @@ entry:
%agg.tmp = alloca %struct.S, align 4
%tmp = bitcast %struct.S* %t to i8*
%tmp1 = bitcast %struct.S* %s to i8*
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp, i8* %tmp1, i64 48, i32 4, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp, i8* %tmp1, i64 48, i1 false)
%tmp2 = bitcast %struct.S* %agg.tmp to i8*
%tmp3 = bitcast %struct.S* %t to i8*
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp2, i8* %tmp3, i64 48, i32 4, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp2, i8* %tmp3, i64 48, i1 false)
%call = call i32 (...) @bazz(%struct.S* byval %agg.tmp)
ret void
}
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) nounwind
declare i32 @bazz(...)
diff --git a/llvm/test/Transforms/ScalarRepl/vector_memcpy.ll b/llvm/test/Transforms/ScalarRepl/vector_memcpy.ll
index 031ad5e38ca..04d0659ebcd 100644
--- a/llvm/test/Transforms/ScalarRepl/vector_memcpy.ll
+++ b/llvm/test/Transforms/ScalarRepl/vector_memcpy.ll
@@ -9,7 +9,7 @@ define <16 x float> @foo(<16 x float> %A) nounwind {
store <16 x float> %A, <16 x float>* %tmp
%s = bitcast <16 x float>* %tmp to i8*
%s2 = bitcast <16 x float>* %tmp2 to i8*
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* %s2, i8* %s, i64 64, i32 16, i1 false)
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %s2, i8* %s, i64 64, i1 false)
%R = load <16 x float>, <16 x float>* %tmp2
ret <16 x float> %R
}
@@ -18,11 +18,11 @@ define <16 x float> @foo2(<16 x float> %A) nounwind {
%tmp2 = alloca <16 x float>, align 16
%s2 = bitcast <16 x float>* %tmp2 to i8*
- call void @llvm.memset.p0i8.i64(i8* %s2, i8 0, i64 64, i32 16, i1 false)
+ call void @llvm.memset.p0i8.i64(i8* %s2, i8 0, i64 64, i1 false)
%R = load <16 x float>, <16 x float>* %tmp2
ret <16 x float> %R
}
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
-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, i1) nounwind
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i1) nounwind
OpenPOWER on IntegriCloud