Skip to content

Commit 853f680

Browse files
committed
Fix convergent.ll test
1 parent 8d8c74e commit 853f680

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

llvm/test/Transforms/Attributor/convergent.ll

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ define i32 @calls_defined_with_asm(i32 %a, i32 %b) convergent {
8888
ret i32 %c
8989
}
9090

91-
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* %dest, i8* %src, i64 %size, i1 %isVolatile) convergent
92-
93-
define void @calls_intrinsic(i8* %dest, i8* %src, i64 %size) convergent {
91+
; Use opaque pointer version of calls_intrinsic
92+
define void @calls_intrinsic(ptr %dest, ptr %src, i64 %size) convergent {
9493
; TUNIT: Function Attrs: convergent nofree norecurse nosync nounwind willreturn memory(argmem: readwrite)
9594
; TUNIT-LABEL: define {{[^@]+}}@calls_intrinsic
9695
; TUNIT-SAME: (ptr nocapture nofree writeonly [[DEST:%.*]], ptr nocapture nofree readonly [[SRC:%.*]], i64 [[SIZE:%.*]]) #[[ATTR2:[0-9]+]] {
@@ -103,9 +102,14 @@ define void @calls_intrinsic(i8* %dest, i8* %src, i64 %size) convergent {
103102
; CGSCC-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture nofree writeonly [[DEST]], ptr noalias nocapture nofree readonly [[SRC]], i64 [[SIZE]], i1 noundef false) #[[ATTR5]]
104103
; CGSCC-NEXT: ret void
105104
;
106-
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %dest, i8* %src, i64 %size, i1 false)
105+
; Use opaque pointer version of memcpy
106+
call void @llvm.memcpy.p0.p0.i64(ptr %dest, ptr %src, i64 %size, i1 false)
107107
ret void
108108
}
109+
110+
; Use opaque pointer version of memcpy
111+
declare void @llvm.memcpy.p0.p0.i64(ptr %dest, ptr %src, i64 %size, i1 %isVolatile) convergent
112+
109113
;.
110114
; TUNIT: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind willreturn memory(none) }
111115
; TUNIT: attributes #[[ATTR1]] = { convergent }

0 commit comments

Comments
 (0)