fix tests due to LLVM IR syntax changes
MODIFY
tests/alive-tv/bugs/pr10067.srctgt.ll
tests/alive-tv/bugs/pr10067.srctgt.ll
@@ -10,7 +10,7 @@ target triple = "i386-apple-darwin10"
define i32 @src() noinline {
%x = alloca %struct1, align 8
%y = alloca %struct2, align 8
- call void @bar(%struct1* sret %x)
+ call void @bar(%struct1* sret(%struct1) %x)
%gepn1 = getelementptr inbounds %struct2, %struct2* %y, i32 0, i32 0, i32 0
store i32 0, i32* %gepn1, align 8
@@ -31,7 +31,7 @@ define i32 @tgt() noinline {
%x = alloca %struct1, align 8
%y = alloca %struct2, align 8
%y1 = bitcast %struct2* %y to %struct1*
- call void @bar(%struct1* sret %y1)
+ call void @bar(%struct1* sret(%struct1) %y1)
%gepn1 = getelementptr inbounds %struct2, %struct2* %y, i32 0, i32 0, i32 0
store i32 0, i32* %gepn1, align 8
%gepn2 = getelementptr inbounds %struct2, %struct2* %y, i32 0, i32 0, i32 1
@@ -43,4 +43,4 @@ define i32 @tgt() noinline {
ret i32 %ret
}
-declare void @bar(%struct1* sret)
+declare void @bar(%struct1* sret(%struct1))

MODIFY
tests/alive-tv/calls/call.src.ll
tests/alive-tv/calls/call.src.ll
@@ -34,7 +34,7 @@ define i8 @f5() {
ret i8 %b
}
-define i8 @f6(i8* byval %p) {
+define i8 @f6(i8* byval(i8) %p) {
%a = alloca i8
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %p, i64 1, i1 false)
%b = call i8 @g(i8* %a)
@@ -44,14 +44,14 @@ define i8 @f6(i8* byval %p) {
define i8 @f6_2(i8* %p) {
%a = alloca i8
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %p, i64 1, i1 false)
- %b = call i8 @g2(i8* byval %a)
+ %b = call i8 @g2(i8* byval(i8) %a)
ret i8 %b
}
define i8 @f6_3() {
%a = alloca i8
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* @glb, i64 1, i1 false)
- %b = call i8 @g2(i8* byval %a)
+ %b = call i8 @g2(i8* byval(i8) %a)
ret i8 %b
}
@@ -76,7 +76,7 @@ define void @f9() {
}
declare i8 @g(i8*)
-declare i8 @g2(i8* byval)
+declare i8 @g2(i8* byval(i8))
declare i8 @h(i8*) readnone
declare void @j(i32)
declare i8* @k()

MODIFY
tests/alive-tv/calls/call.tgt.ll
tests/alive-tv/calls/call.tgt.ll
@@ -34,18 +34,18 @@ define i8 @f5() {
ret i8 %b
}
-define i8 @f6(i8* byval %p) {
+define i8 @f6(i8* byval(i8) %p) {
%b = call i8 @g(i8* %p)
ret i8 %b
}
define i8 @f6_2(i8* %p) {
- %b = call i8 @g2(i8* byval %p)
+ %b = call i8 @g2(i8* byval(i8) %p)
ret i8 %b
}
define i8 @f6_3() {
- %b = call i8 @g2(i8* byval @glb)
+ %b = call i8 @g2(i8* byval(i8) @glb)
ret i8 %b
}
@@ -68,7 +68,7 @@ define void @f9() {
}
declare i8 @g(i8*)
-declare i8 @g2(i8* byval)
+declare i8 @g2(i8* byval(i8))
declare i8 @h(i8*) readnone
declare void @j(i32)
declare i8* @k()

MODIFY
tests/alive-tv/opt-memory/dereferenceable.srctgt.ll
tests/alive-tv/opt-memory/dereferenceable.srctgt.ll
; TEST-ARGS: -dbg
-define i32 @src(i32* dereferenceable(2) %p) {
- %v1 = load i32, i32* %p
+define i32 @src(i32* dereferenceable(2) align 4 %p) {
+ %v1 = load i32, i32* %p, align 4
ret i32 %v1
}
-define i32 @tgt(i32* dereferenceable(2) %p) {
- %v1 = load i32, i32* %p
+define i32 @tgt(i32* dereferenceable(2) align 4 %p) {
+ %v1 = load i32, i32* %p, align 4
ret i32 %v1
}
-
; CHECK: min_access_size: 2

fix tests due to LLVM IR syntax changes (#592)