Skip to content

Commit 8d4f932

Browse files
committed
More tests
1 parent 1769175 commit 8d4f932

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

llvm/test/CodeGen/AMDGPU/amdgpu-attributor-no-agpr.ll

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,42 @@ define amdgpu_kernel void @earlyclobber_1() {
580580
ret void
581581
}
582582

583+
define amdgpu_kernel void @physreg_a32__vreg_a256__vreg_a512() {
584+
; CHECK-LABEL: define amdgpu_kernel void @physreg_a32__vreg_a256__vreg_a512(
585+
; CHECK-SAME: ) #[[ATTR1]] {
586+
; CHECK-NEXT: call void asm sideeffect "
587+
; CHECK-NEXT: call void @use_most()
588+
; CHECK-NEXT: ret void
589+
;
590+
call void asm sideeffect "; use $0, $1, $2", "{a16},a,a"(i32 poison, <8 x i32> poison, <16 x i32> poison)
591+
call void @use_most()
592+
ret void
593+
}
594+
595+
define amdgpu_kernel void @physreg_def_a32__def_vreg_a256__def_vreg_a512() {
596+
; CHECK-LABEL: define amdgpu_kernel void @physreg_def_a32__def_vreg_a256__def_vreg_a512(
597+
; CHECK-SAME: ) #[[ATTR1]] {
598+
; CHECK-NEXT: [[TMP1:%.*]] = call { i32, <8 x i32>, <16 x i32> } asm sideeffect "
599+
; CHECK-NEXT: call void @use_most()
600+
; CHECK-NEXT: ret void
601+
;
602+
call {i32, <8 x i32>, <16 x i32>} asm sideeffect "; def $0, $1, $2", "={a16},=a,=a"()
603+
call void @use_most()
604+
ret void
605+
}
606+
607+
define amdgpu_kernel void @physreg_def_a32___def_vreg_a512_use_vreg_a256() {
608+
; CHECK-LABEL: define amdgpu_kernel void @physreg_def_a32___def_vreg_a512_use_vreg_a256(
609+
; CHECK-SAME: ) #[[ATTR1]] {
610+
; CHECK-NEXT: [[TMP1:%.*]] = call { i32, <16 x i32> } asm sideeffect "
611+
; CHECK-NEXT: call void @use_most()
612+
; CHECK-NEXT: ret void
613+
;
614+
call {i32, <16 x i32>} asm sideeffect "; def $0, $1, $2", "={a16},=a,a"(<8 x i32> poison)
615+
call void @use_most()
616+
ret void
617+
}
618+
583619
attributes #0 = { "amdgpu-agpr-alloc"="0" }
584620
;.
585621
; CHECK: attributes #[[ATTR0]] = { "amdgpu-agpr-alloc"="0" "target-cpu"="gfx90a" "uniform-work-group-size"="false" }

0 commit comments

Comments
 (0)