@@ -42,6 +42,10 @@ declare float @llvm.vector.reduce.fmax.v16f32(<16 x float>)
42
42
43
43
declare void @llvm.memcpy.p0.p0.i32 (ptr , ptr , i32 , i1 )
44
44
45
+ declare i32 @llvm.ssa.copy.i32 (i32 )
46
+ declare float @llvm.ssa.copy.f32 (float )
47
+ declare ptr @llvm.ssa.copy.p0 (ptr )
48
+
45
49
define void @smax (i32 %a , i32 %b , <16 x i32 > %va , <16 x i32 > %vb ) {
46
50
; THRU-LABEL: 'smax'
47
51
; THRU-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s = call i32 @llvm.smax.i32(i32 %a, i32 %b)
@@ -333,3 +337,35 @@ define void @memcpy(ptr %a, ptr %b, i32 %c) {
333
337
call void @llvm.memcpy.p0.p0.i32 (ptr align 1 %a , ptr align 1 %b , i32 32 , i1 false )
334
338
ret void
335
339
}
340
+
341
+ define void @ssa_copy () {
342
+ ; CHECK: %{{.*}} = llvm.intr.ssa.copy %{{.*}} : f32
343
+ ; THRU-LABEL: 'ssa_copy'
344
+ ; THRU-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = call i32 @llvm.ssa.copy.i32(i32 undef)
345
+ ; THRU-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = call float @llvm.ssa.copy.f32(float undef)
346
+ ; THRU-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %p = call ptr @llvm.ssa.copy.p0(ptr undef)
347
+ ; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
348
+ ;
349
+ ; LATE-LABEL: 'ssa_copy'
350
+ ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = call i32 @llvm.ssa.copy.i32(i32 undef)
351
+ ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = call float @llvm.ssa.copy.f32(float undef)
352
+ ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %p = call ptr @llvm.ssa.copy.p0(ptr undef)
353
+ ; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
354
+ ;
355
+ ; SIZE-LABEL: 'ssa_copy'
356
+ ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = call i32 @llvm.ssa.copy.i32(i32 undef)
357
+ ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = call float @llvm.ssa.copy.f32(float undef)
358
+ ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %p = call ptr @llvm.ssa.copy.p0(ptr undef)
359
+ ; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
360
+ ;
361
+ ; SIZE_LATE-LABEL: 'ssa_copy'
362
+ ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = call i32 @llvm.ssa.copy.i32(i32 undef)
363
+ ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = call float @llvm.ssa.copy.f32(float undef)
364
+ ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %p = call ptr @llvm.ssa.copy.p0(ptr undef)
365
+ ; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
366
+ ;
367
+ %i = call i32 @llvm.ssa.copy.i32 (i32 undef )
368
+ %f = call float @llvm.ssa.copy.f32 (float undef )
369
+ %p = call ptr @llvm.ssa.copy.p0 (ptr undef )
370
+ ret void
371
+ }
0 commit comments