blob: 1498c0a57b96fcd70de487fea7fed7662dbe3cb0 [file] [edit]
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -global-isel=0 -amdgpu-load-store-vectorizer=0 -mtriple=amdgcn -mcpu=gfx1250 < %s | FileCheck -check-prefixes=GFX1250,GFX1250-SDAG %s
; RUN: llc -global-isel=1 -new-reg-bank-select -amdgpu-load-store-vectorizer=0 -mtriple=amdgcn -mcpu=gfx1250 < %s | FileCheck -check-prefixes=GFX1250,GFX1250-GISEL %s
; RUN: llc -global-isel=0 -amdgpu-load-store-vectorizer=0 -mtriple=amdgcn -mcpu=gfx1310 < %s | FileCheck -check-prefixes=GFX13,GFX13-SDAG %s
; RUN: llc -global-isel=1 -new-reg-bank-select -amdgpu-load-store-vectorizer=0 -mtriple=amdgcn -mcpu=gfx1310 < %s | FileCheck -check-prefixes=GFX13,GFX13-GISEL %s
define i32 @v_permlane_bcast_b32_vss(i32 %src0, i32 %src1, i32 %src2) {
; GFX1250-LABEL: v_permlane_bcast_b32_vss:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_readfirstlane_b32 s0, v1
; GFX1250-NEXT: v_readfirstlane_b32 s1, v2
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_b32_vss:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_readfirstlane_b32 s0, v1
; GFX13-NEXT: v_readfirstlane_b32 s1, v2
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call i32 @llvm.amdgcn.permlane.bcast(i32 %src0, i32 %src1, i32 %src2)
ret i32 %v
}
define i32 @v_permlane_bcast_b32_vii(i32 %src0) {
; GFX1250-LABEL: v_permlane_bcast_b32_vii:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, 1, 2
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_b32_vii:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, 1, 2
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call i32 @llvm.amdgcn.permlane.bcast(i32 %src0, i32 1, i32 2)
ret i32 %v
}
define i32 @v_permlane_bcast_b32_vll(i32 %src0) {
; GFX1250-LABEL: v_permlane_bcast_b32_vll:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: s_movk_i32 s0, 0x64
; GFX1250-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, s0, 0x66
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_b32_vll:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: s_movk_i32 s0, 0x64
; GFX13-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, s0, 0x66
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call i32 @llvm.amdgcn.permlane.bcast(i32 %src0, i32 100, i32 102)
ret i32 %v
}
define i32 @v_permlane_bcast_b32_vvv(i32 %src0) {
; GFX1250-LABEL: v_permlane_bcast_b32_vvv:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_and_b32_e32 v1, 0x3ff, v31
; GFX1250-NEXT: v_bfe_u32 v2, v31, 10, 10
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
; GFX1250-NEXT: v_readfirstlane_b32 s0, v1
; GFX1250-NEXT: v_readfirstlane_b32 s1, v2
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_b32_vvv:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_and_b32_e32 v1, 0x3ff, v31
; GFX13-NEXT: v_bfe_u32 v2, v31, 10, 10
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
; GFX13-NEXT: v_readfirstlane_b32 s0, v1
; GFX13-NEXT: v_readfirstlane_b32 s1, v2
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%tidx = call i32 @llvm.amdgcn.workitem.id.x()
%tidy = call i32 @llvm.amdgcn.workitem.id.y()
%v = call i32 @llvm.amdgcn.permlane.bcast(i32 %src0, i32 %tidx, i32 %tidy)
ret i32 %v
}
define float @v_permlane_bcast_f32_vss(float %src0, i32 %src1, i32 %src2) {
; GFX1250-LABEL: v_permlane_bcast_f32_vss:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_readfirstlane_b32 s0, v1
; GFX1250-NEXT: v_readfirstlane_b32 s1, v2
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_f32_vss:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_readfirstlane_b32 s0, v1
; GFX13-NEXT: v_readfirstlane_b32 s1, v2
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call float @llvm.amdgcn.permlane.bcast(float %src0, i32 %src1, i32 %src2)
ret float %v
}
define float @v_permlane_bcast_f32_vii(float %src0) {
; GFX1250-LABEL: v_permlane_bcast_f32_vii:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, 1, 2
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_f32_vii:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, 1, 2
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call float @llvm.amdgcn.permlane.bcast(float %src0, i32 1, i32 2)
ret float %v
}
define float @v_permlane_bcast_f32_vll(float %src0) {
; GFX1250-LABEL: v_permlane_bcast_f32_vll:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: s_movk_i32 s0, 0x64
; GFX1250-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, s0, 0x66
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_f32_vll:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: s_movk_i32 s0, 0x64
; GFX13-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, s0, 0x66
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call float @llvm.amdgcn.permlane.bcast(float %src0, i32 100, i32 102)
ret float %v
}
define float @v_permlane_bcast_f32_vvv(float %src0) {
; GFX1250-LABEL: v_permlane_bcast_f32_vvv:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_and_b32_e32 v1, 0x3ff, v31
; GFX1250-NEXT: v_bfe_u32 v2, v31, 10, 10
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
; GFX1250-NEXT: v_readfirstlane_b32 s0, v1
; GFX1250-NEXT: v_readfirstlane_b32 s1, v2
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_f32_vvv:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_and_b32_e32 v1, 0x3ff, v31
; GFX13-NEXT: v_bfe_u32 v2, v31, 10, 10
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
; GFX13-NEXT: v_readfirstlane_b32 s0, v1
; GFX13-NEXT: v_readfirstlane_b32 s1, v2
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%tidx = call i32 @llvm.amdgcn.workitem.id.x()
%tidy = call i32 @llvm.amdgcn.workitem.id.y()
%v = call float @llvm.amdgcn.permlane.bcast(float %src0, i32 %tidx, i32 %tidy)
ret float %v
}
define i64 @v_permlane_bcast_i64_vss(i64 %src0, i32 %src1, i32 %src2) {
; GFX1250-LABEL: v_permlane_bcast_i64_vss:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_readfirstlane_b32 s0, v2
; GFX1250-NEXT: v_readfirstlane_b32 s1, v3
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX1250-NEXT: v_permlane_bcast_b32 v1, v1, s0, s1
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_i64_vss:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_readfirstlane_b32 s0, v2
; GFX13-NEXT: v_readfirstlane_b32 s1, v3
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX13-NEXT: v_permlane_bcast_b32 v1, v1, s0, s1
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call i64 @llvm.amdgcn.permlane.bcast(i64 %src0, i32 %src1, i32 %src2)
ret i64 %v
}
define i64 @v_permlane_bcast_i64_vii(i64 %src0) {
; GFX1250-LABEL: v_permlane_bcast_i64_vii:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, 1, 2
; GFX1250-NEXT: v_permlane_bcast_b32 v1, v1, 1, 2
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_i64_vii:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, 1, 2
; GFX13-NEXT: v_permlane_bcast_b32 v1, v1, 1, 2
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call i64 @llvm.amdgcn.permlane.bcast(i64 %src0, i32 1, i32 2)
ret i64 %v
}
define i64 @v_permlane_bcast_i64_vll(i64 %src0) {
; GFX1250-LABEL: v_permlane_bcast_i64_vll:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: s_movk_i32 s0, 0x64
; GFX1250-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, s0, 0x66
; GFX1250-NEXT: v_permlane_bcast_b32 v1, v1, s0, 0x66
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_i64_vll:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: s_movk_i32 s0, 0x64
; GFX13-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, s0, 0x66
; GFX13-NEXT: v_permlane_bcast_b32 v1, v1, s0, 0x66
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call i64 @llvm.amdgcn.permlane.bcast(i64 %src0, i32 100, i32 102)
ret i64 %v
}
define i64 @v_permlane_bcast_i64_vvv(i64 %src0) {
; GFX1250-LABEL: v_permlane_bcast_i64_vvv:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_and_b32_e32 v2, 0x3ff, v31
; GFX1250-NEXT: v_bfe_u32 v3, v31, 10, 10
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
; GFX1250-NEXT: v_readfirstlane_b32 s0, v2
; GFX1250-NEXT: v_readfirstlane_b32 s1, v3
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX1250-NEXT: v_permlane_bcast_b32 v1, v1, s0, s1
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_i64_vvv:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_and_b32_e32 v2, 0x3ff, v31
; GFX13-NEXT: v_bfe_u32 v3, v31, 10, 10
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
; GFX13-NEXT: v_readfirstlane_b32 s0, v2
; GFX13-NEXT: v_readfirstlane_b32 s1, v3
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX13-NEXT: v_permlane_bcast_b32 v1, v1, s0, s1
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%tidx = call i32 @llvm.amdgcn.workitem.id.x()
%tidy = call i32 @llvm.amdgcn.workitem.id.y()
%v = call i64 @llvm.amdgcn.permlane.bcast(i64 %src0, i32 %tidx, i32 %tidy)
ret i64 %v
}
define double @v_permlane_bcast_f64_vss(double %src0, i32 %src1, i32 %src2) {
; GFX1250-LABEL: v_permlane_bcast_f64_vss:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_readfirstlane_b32 s0, v2
; GFX1250-NEXT: v_readfirstlane_b32 s1, v3
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX1250-NEXT: v_permlane_bcast_b32 v1, v1, s0, s1
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_f64_vss:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_readfirstlane_b32 s0, v2
; GFX13-NEXT: v_readfirstlane_b32 s1, v3
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX13-NEXT: v_permlane_bcast_b32 v1, v1, s0, s1
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call double @llvm.amdgcn.permlane.bcast(double %src0, i32 %src1, i32 %src2)
ret double %v
}
define double @v_permlane_bcast_f64_vii(double %src0) {
; GFX1250-LABEL: v_permlane_bcast_f64_vii:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, 1, 2
; GFX1250-NEXT: v_permlane_bcast_b32 v1, v1, 1, 2
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_f64_vii:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, 1, 2
; GFX13-NEXT: v_permlane_bcast_b32 v1, v1, 1, 2
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call double @llvm.amdgcn.permlane.bcast(double %src0, i32 1, i32 2)
ret double %v
}
define double @v_permlane_bcast_f64_vll(double %src0) {
; GFX1250-LABEL: v_permlane_bcast_f64_vll:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: s_movk_i32 s0, 0x64
; GFX1250-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, s0, 0x66
; GFX1250-NEXT: v_permlane_bcast_b32 v1, v1, s0, 0x66
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_f64_vll:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: s_movk_i32 s0, 0x64
; GFX13-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, s0, 0x66
; GFX13-NEXT: v_permlane_bcast_b32 v1, v1, s0, 0x66
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call double @llvm.amdgcn.permlane.bcast(double %src0, i32 100, i32 102)
ret double %v
}
define double @v_permlane_bcast_f64_vvv(double %src0) {
; GFX1250-LABEL: v_permlane_bcast_f64_vvv:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_and_b32_e32 v2, 0x3ff, v31
; GFX1250-NEXT: v_bfe_u32 v3, v31, 10, 10
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
; GFX1250-NEXT: v_readfirstlane_b32 s0, v2
; GFX1250-NEXT: v_readfirstlane_b32 s1, v3
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX1250-NEXT: v_permlane_bcast_b32 v1, v1, s0, s1
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_f64_vvv:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_and_b32_e32 v2, 0x3ff, v31
; GFX13-NEXT: v_bfe_u32 v3, v31, 10, 10
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
; GFX13-NEXT: v_readfirstlane_b32 s0, v2
; GFX13-NEXT: v_readfirstlane_b32 s1, v3
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-NEXT: v_permlane_bcast_b32 v0, v0, s0, s1
; GFX13-NEXT: v_permlane_bcast_b32 v1, v1, s0, s1
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%tidx = call i32 @llvm.amdgcn.workitem.id.x()
%tidy = call i32 @llvm.amdgcn.workitem.id.y()
%v = call double @llvm.amdgcn.permlane.bcast(double %src0, i32 %tidx, i32 %tidy)
ret double %v
}
; does not work for GISEL
;define void @v_permlane_bcast_bfloat(ptr addrspace(1) %out, bfloat %src, i32 %src1, i32 %src2) {
; %v = call bfloat @llvm.amdgcn.permlane.bcast.bf16(bfloat %src, i32 %src1, i32 %src2)
; store bfloat %v, ptr addrspace(1) %out, align 4
; ret void
;}
define void @v_permlane_bcast_i16(ptr addrspace(1) %out, i16 %src, i32 %src1, i32 %src2) {
; GFX1250-LABEL: v_permlane_bcast_i16:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_readfirstlane_b32 s0, v3
; GFX1250-NEXT: v_readfirstlane_b32 s1, v4
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-NEXT: global_store_b16 v[0:1], v2, off
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_i16:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_readfirstlane_b32 s0, v3
; GFX13-NEXT: v_readfirstlane_b32 s1, v4
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-NEXT: global_store_b16 v[0:1], v2, off
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call i16 @llvm.amdgcn.permlane.bcast.i16(i16 %src, i32 %src1, i32 %src2)
store i16 %v, ptr addrspace(1) %out, align 4
ret void
}
define void @v_permlane_bcast_v2f16(ptr addrspace(1) %out, <2 x half> %src, i32 %src1, i32 %src2) {
; GFX1250-LABEL: v_permlane_bcast_v2f16:
; GFX1250: ; %bb.0:
; GFX1250-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-NEXT: s_wait_kmcnt 0x0
; GFX1250-NEXT: v_readfirstlane_b32 s0, v3
; GFX1250-NEXT: v_readfirstlane_b32 s1, v4
; GFX1250-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-NEXT: global_store_b32 v[0:1], v2, off
; GFX1250-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-LABEL: v_permlane_bcast_v2f16:
; GFX13: ; %bb.0:
; GFX13-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-NEXT: s_wait_expcnt 0x0
; GFX13-NEXT: s_wait_samplecnt 0x0
; GFX13-NEXT: s_wait_bvhcnt 0x0
; GFX13-NEXT: s_wait_kmcnt 0x0
; GFX13-NEXT: v_readfirstlane_b32 s0, v3
; GFX13-NEXT: v_readfirstlane_b32 s1, v4
; GFX13-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-NEXT: global_store_b32 v[0:1], v2, off
; GFX13-NEXT: s_set_pc_i64 s[30:31]
%v = call <2 x half> @llvm.amdgcn.permlane.bcast.v2f16(<2 x half> %src, i32 %src1, i32 %src2)
store <2 x half> %v, ptr addrspace(1) %out, align 4
ret void
}
define void @v_permlane_bcast_v2f32(ptr addrspace(1) %out, <2 x float> %src, i32 %src1, i32 %src2) {
; GFX1250-SDAG-LABEL: v_permlane_bcast_v2f32:
; GFX1250-SDAG: ; %bb.0:
; GFX1250-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s0, v4
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s1, v5
; GFX1250-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-SDAG-NEXT: global_store_b64 v[0:1], v[2:3], off
; GFX1250-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX1250-GISEL-LABEL: v_permlane_bcast_v2f32:
; GFX1250-GISEL: ; %bb.0:
; GFX1250-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s0, v4
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s1, v5
; GFX1250-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-GISEL-NEXT: global_store_b64 v[0:1], v[2:3], off
; GFX1250-GISEL-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-SDAG-LABEL: v_permlane_bcast_v2f32:
; GFX13-SDAG: ; %bb.0:
; GFX13-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-SDAG-NEXT: s_wait_expcnt 0x0
; GFX13-SDAG-NEXT: s_wait_samplecnt 0x0
; GFX13-SDAG-NEXT: s_wait_bvhcnt 0x0
; GFX13-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s0, v4
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s1, v5
; GFX13-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-SDAG-NEXT: global_store_b64 v[0:1], v[2:3], off
; GFX13-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-GISEL-LABEL: v_permlane_bcast_v2f32:
; GFX13-GISEL: ; %bb.0:
; GFX13-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-GISEL-NEXT: s_wait_expcnt 0x0
; GFX13-GISEL-NEXT: s_wait_samplecnt 0x0
; GFX13-GISEL-NEXT: s_wait_bvhcnt 0x0
; GFX13-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s0, v4
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s1, v5
; GFX13-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-GISEL-NEXT: global_store_b64 v[0:1], v[2:3], off
; GFX13-GISEL-NEXT: s_set_pc_i64 s[30:31]
%v = call <2 x float> @llvm.amdgcn.permlane.bcast.v2f32(<2 x float> %src, i32 %src1, i32 %src2)
store <2 x float> %v, ptr addrspace(1) %out, align 4
ret void
}
define void @v_permlane_bcast_v7i32(ptr addrspace(1) %out, <7 x i32> %src, i32 %src1, i32 %src2) {
; GFX1250-SDAG-LABEL: v_permlane_bcast_v7i32:
; GFX1250-SDAG: ; %bb.0:
; GFX1250-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s0, v9
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s1, v10
; GFX1250-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v8, v8, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-SDAG-NEXT: s_clause 0x1
; GFX1250-SDAG-NEXT: global_store_b96 v[0:1], v[6:8], off offset:16
; GFX1250-SDAG-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX1250-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX1250-GISEL-LABEL: v_permlane_bcast_v7i32:
; GFX1250-GISEL: ; %bb.0:
; GFX1250-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s0, v9
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s1, v10
; GFX1250-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v8, v8, s0, s1
; GFX1250-GISEL-NEXT: s_clause 0x1
; GFX1250-GISEL-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX1250-GISEL-NEXT: global_store_b96 v[0:1], v[6:8], off offset:16
; GFX1250-GISEL-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-SDAG-LABEL: v_permlane_bcast_v7i32:
; GFX13-SDAG: ; %bb.0:
; GFX13-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-SDAG-NEXT: s_wait_expcnt 0x0
; GFX13-SDAG-NEXT: s_wait_samplecnt 0x0
; GFX13-SDAG-NEXT: s_wait_bvhcnt 0x0
; GFX13-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s0, v9
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s1, v10
; GFX13-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v8, v8, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-SDAG-NEXT: s_clause 0x1
; GFX13-SDAG-NEXT: global_store_b96 v[0:1], v[6:8], off offset:16
; GFX13-SDAG-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX13-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-GISEL-LABEL: v_permlane_bcast_v7i32:
; GFX13-GISEL: ; %bb.0:
; GFX13-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-GISEL-NEXT: s_wait_expcnt 0x0
; GFX13-GISEL-NEXT: s_wait_samplecnt 0x0
; GFX13-GISEL-NEXT: s_wait_bvhcnt 0x0
; GFX13-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s0, v9
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s1, v10
; GFX13-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v8, v8, s0, s1
; GFX13-GISEL-NEXT: s_clause 0x1
; GFX13-GISEL-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX13-GISEL-NEXT: global_store_b96 v[0:1], v[6:8], off offset:16
; GFX13-GISEL-NEXT: s_set_pc_i64 s[30:31]
%v = call <7 x i32> @llvm.amdgcn.permlane.bcast.v7i32(<7 x i32> %src, i32 %src1, i32 %src2)
store <7 x i32> %v, ptr addrspace(1) %out, align 4
ret void
}
define void @v_permlane_bcast_v8i16(ptr addrspace(1) %out, <8 x i16> %src, i32 %src1, i32 %src2) {
; GFX1250-SDAG-LABEL: v_permlane_bcast_v8i16:
; GFX1250-SDAG: ; %bb.0:
; GFX1250-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s0, v6
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s1, v7
; GFX1250-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-SDAG-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX1250-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX1250-GISEL-LABEL: v_permlane_bcast_v8i16:
; GFX1250-GISEL: ; %bb.0:
; GFX1250-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s0, v6
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s1, v7
; GFX1250-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX1250-GISEL-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX1250-GISEL-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-SDAG-LABEL: v_permlane_bcast_v8i16:
; GFX13-SDAG: ; %bb.0:
; GFX13-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-SDAG-NEXT: s_wait_expcnt 0x0
; GFX13-SDAG-NEXT: s_wait_samplecnt 0x0
; GFX13-SDAG-NEXT: s_wait_bvhcnt 0x0
; GFX13-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s0, v6
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s1, v7
; GFX13-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-SDAG-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX13-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-GISEL-LABEL: v_permlane_bcast_v8i16:
; GFX13-GISEL: ; %bb.0:
; GFX13-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-GISEL-NEXT: s_wait_expcnt 0x0
; GFX13-GISEL-NEXT: s_wait_samplecnt 0x0
; GFX13-GISEL-NEXT: s_wait_bvhcnt 0x0
; GFX13-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s0, v6
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s1, v7
; GFX13-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX13-GISEL-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX13-GISEL-NEXT: s_set_pc_i64 s[30:31]
%v = call <8 x i16> @llvm.amdgcn.permlane.bcast.v8i16(<8 x i16> %src, i32 %src1, i32 %src2)
store <8 x i16> %v, ptr addrspace(1) %out, align 4
ret void
}
define void @v_permlane_bcast_v2i64(ptr addrspace(1) %out, <2 x i64> %src, i32 %src1, i32 %src2) {
; GFX1250-SDAG-LABEL: v_permlane_bcast_v2i64:
; GFX1250-SDAG: ; %bb.0:
; GFX1250-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s0, v6
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s1, v7
; GFX1250-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-SDAG-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX1250-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX1250-GISEL-LABEL: v_permlane_bcast_v2i64:
; GFX1250-GISEL: ; %bb.0:
; GFX1250-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s0, v6
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s1, v7
; GFX1250-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX1250-GISEL-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX1250-GISEL-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-SDAG-LABEL: v_permlane_bcast_v2i64:
; GFX13-SDAG: ; %bb.0:
; GFX13-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-SDAG-NEXT: s_wait_expcnt 0x0
; GFX13-SDAG-NEXT: s_wait_samplecnt 0x0
; GFX13-SDAG-NEXT: s_wait_bvhcnt 0x0
; GFX13-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s0, v6
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s1, v7
; GFX13-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-SDAG-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX13-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-GISEL-LABEL: v_permlane_bcast_v2i64:
; GFX13-GISEL: ; %bb.0:
; GFX13-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-GISEL-NEXT: s_wait_expcnt 0x0
; GFX13-GISEL-NEXT: s_wait_samplecnt 0x0
; GFX13-GISEL-NEXT: s_wait_bvhcnt 0x0
; GFX13-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s0, v6
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s1, v7
; GFX13-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX13-GISEL-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX13-GISEL-NEXT: s_set_pc_i64 s[30:31]
%v = call <2 x i64> @llvm.amdgcn.permlane.bcast.v2i64(<2 x i64> %src, i32 %src1, i32 %src2)
store <2 x i64> %v, ptr addrspace(1) %out, align 4
ret void
}
define void @v_permlane_bcast_v3i64(ptr addrspace(1) %out, <3 x i64> %src, i32 %src1, i32 %src2) {
; GFX1250-SDAG-LABEL: v_permlane_bcast_v3i64:
; GFX1250-SDAG: ; %bb.0:
; GFX1250-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s0, v8
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s1, v9
; GFX1250-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-SDAG-NEXT: s_clause 0x1
; GFX1250-SDAG-NEXT: global_store_b64 v[0:1], v[6:7], off offset:16
; GFX1250-SDAG-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX1250-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX1250-GISEL-LABEL: v_permlane_bcast_v3i64:
; GFX1250-GISEL: ; %bb.0:
; GFX1250-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s0, v8
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s1, v9
; GFX1250-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX1250-GISEL-NEXT: s_clause 0x1
; GFX1250-GISEL-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX1250-GISEL-NEXT: global_store_b64 v[0:1], v[6:7], off offset:16
; GFX1250-GISEL-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-SDAG-LABEL: v_permlane_bcast_v3i64:
; GFX13-SDAG: ; %bb.0:
; GFX13-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-SDAG-NEXT: s_wait_expcnt 0x0
; GFX13-SDAG-NEXT: s_wait_samplecnt 0x0
; GFX13-SDAG-NEXT: s_wait_bvhcnt 0x0
; GFX13-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s0, v8
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s1, v9
; GFX13-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-SDAG-NEXT: s_clause 0x1
; GFX13-SDAG-NEXT: global_store_b64 v[0:1], v[6:7], off offset:16
; GFX13-SDAG-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX13-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-GISEL-LABEL: v_permlane_bcast_v3i64:
; GFX13-GISEL: ; %bb.0:
; GFX13-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-GISEL-NEXT: s_wait_expcnt 0x0
; GFX13-GISEL-NEXT: s_wait_samplecnt 0x0
; GFX13-GISEL-NEXT: s_wait_bvhcnt 0x0
; GFX13-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s0, v8
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s1, v9
; GFX13-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX13-GISEL-NEXT: s_clause 0x1
; GFX13-GISEL-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX13-GISEL-NEXT: global_store_b64 v[0:1], v[6:7], off offset:16
; GFX13-GISEL-NEXT: s_set_pc_i64 s[30:31]
%v = call <3 x i64> @llvm.amdgcn.permlane.bcast.v2i64(<3 x i64> %src, i32 %src1, i32 %src2)
store <3 x i64> %v, ptr addrspace(1) %out, align 4
ret void
}
define void @v_permlane_bcast_v4f64(ptr addrspace(1) %out, <4 x double> %src, i32 %src1, i32 %src2) {
; GFX1250-SDAG-LABEL: v_permlane_bcast_v4f64:
; GFX1250-SDAG: ; %bb.0:
; GFX1250-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s0, v10
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s1, v11
; GFX1250-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v9, v9, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v8, v8, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-SDAG-NEXT: s_clause 0x1
; GFX1250-SDAG-NEXT: global_store_b128 v[0:1], v[6:9], off offset:16
; GFX1250-SDAG-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX1250-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX1250-GISEL-LABEL: v_permlane_bcast_v4f64:
; GFX1250-GISEL: ; %bb.0:
; GFX1250-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s0, v10
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s1, v11
; GFX1250-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v8, v8, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v9, v9, s0, s1
; GFX1250-GISEL-NEXT: s_clause 0x1
; GFX1250-GISEL-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX1250-GISEL-NEXT: global_store_b128 v[0:1], v[6:9], off offset:16
; GFX1250-GISEL-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-SDAG-LABEL: v_permlane_bcast_v4f64:
; GFX13-SDAG: ; %bb.0:
; GFX13-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-SDAG-NEXT: s_wait_expcnt 0x0
; GFX13-SDAG-NEXT: s_wait_samplecnt 0x0
; GFX13-SDAG-NEXT: s_wait_bvhcnt 0x0
; GFX13-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s0, v10
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s1, v11
; GFX13-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v9, v9, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v8, v8, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-SDAG-NEXT: s_clause 0x1
; GFX13-SDAG-NEXT: global_store_b128 v[0:1], v[6:9], off offset:16
; GFX13-SDAG-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX13-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-GISEL-LABEL: v_permlane_bcast_v4f64:
; GFX13-GISEL: ; %bb.0:
; GFX13-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-GISEL-NEXT: s_wait_expcnt 0x0
; GFX13-GISEL-NEXT: s_wait_samplecnt 0x0
; GFX13-GISEL-NEXT: s_wait_bvhcnt 0x0
; GFX13-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s0, v10
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s1, v11
; GFX13-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v8, v8, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v9, v9, s0, s1
; GFX13-GISEL-NEXT: s_clause 0x1
; GFX13-GISEL-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX13-GISEL-NEXT: global_store_b128 v[0:1], v[6:9], off offset:16
; GFX13-GISEL-NEXT: s_set_pc_i64 s[30:31]
%v = call <4 x double> @llvm.amdgcn.permlane.bcast.v4f64(<4 x double> %src, i32 %src1, i32 %src2)
store <4 x double> %v, ptr addrspace(1) %out, align 4
ret void
}
define void @v_permlane_bcast_v8f64(ptr addrspace(1) %out, <8 x double> %src, i32 %src1, i32 %src2) {
; GFX1250-SDAG-LABEL: v_permlane_bcast_v8f64:
; GFX1250-SDAG: ; %bb.0:
; GFX1250-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s0, v18
; GFX1250-SDAG-NEXT: v_readfirstlane_b32 s1, v19
; GFX1250-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v17, v17, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v16, v16, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v15, v15, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v14, v14, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v13, v13, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v12, v12, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v11, v11, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v10, v10, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v9, v9, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v8, v8, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-SDAG-NEXT: s_clause 0x3
; GFX1250-SDAG-NEXT: global_store_b128 v[0:1], v[14:17], off offset:48
; GFX1250-SDAG-NEXT: global_store_b128 v[0:1], v[10:13], off offset:32
; GFX1250-SDAG-NEXT: global_store_b128 v[0:1], v[6:9], off offset:16
; GFX1250-SDAG-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX1250-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX1250-GISEL-LABEL: v_permlane_bcast_v8f64:
; GFX1250-GISEL: ; %bb.0:
; GFX1250-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX1250-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s0, v18
; GFX1250-GISEL-NEXT: v_readfirstlane_b32 s1, v19
; GFX1250-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v8, v8, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v9, v9, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v10, v10, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v11, v11, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v12, v12, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v13, v13, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v14, v14, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v15, v15, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v16, v16, s0, s1
; GFX1250-GISEL-NEXT: v_permlane_bcast_b32 v17, v17, s0, s1
; GFX1250-GISEL-NEXT: s_clause 0x3
; GFX1250-GISEL-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX1250-GISEL-NEXT: global_store_b128 v[0:1], v[6:9], off offset:16
; GFX1250-GISEL-NEXT: global_store_b128 v[0:1], v[10:13], off offset:32
; GFX1250-GISEL-NEXT: global_store_b128 v[0:1], v[14:17], off offset:48
; GFX1250-GISEL-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-SDAG-LABEL: v_permlane_bcast_v8f64:
; GFX13-SDAG: ; %bb.0:
; GFX13-SDAG-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-SDAG-NEXT: s_wait_expcnt 0x0
; GFX13-SDAG-NEXT: s_wait_samplecnt 0x0
; GFX13-SDAG-NEXT: s_wait_bvhcnt 0x0
; GFX13-SDAG-NEXT: s_wait_kmcnt 0x0
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s0, v18
; GFX13-SDAG-NEXT: v_readfirstlane_b32 s1, v19
; GFX13-SDAG-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v17, v17, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v16, v16, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v15, v15, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v14, v14, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v13, v13, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v12, v12, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v11, v11, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v10, v10, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v9, v9, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v8, v8, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-SDAG-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-SDAG-NEXT: s_clause 0x3
; GFX13-SDAG-NEXT: global_store_b128 v[0:1], v[14:17], off offset:48
; GFX13-SDAG-NEXT: global_store_b128 v[0:1], v[10:13], off offset:32
; GFX13-SDAG-NEXT: global_store_b128 v[0:1], v[6:9], off offset:16
; GFX13-SDAG-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX13-SDAG-NEXT: s_set_pc_i64 s[30:31]
;
; GFX13-GISEL-LABEL: v_permlane_bcast_v8f64:
; GFX13-GISEL: ; %bb.0:
; GFX13-GISEL-NEXT: s_wait_loadcnt_dscnt 0x0
; GFX13-GISEL-NEXT: s_wait_expcnt 0x0
; GFX13-GISEL-NEXT: s_wait_samplecnt 0x0
; GFX13-GISEL-NEXT: s_wait_bvhcnt 0x0
; GFX13-GISEL-NEXT: s_wait_kmcnt 0x0
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s0, v18
; GFX13-GISEL-NEXT: v_readfirstlane_b32 s1, v19
; GFX13-GISEL-NEXT: s_delay_alu instid0(VALU_DEP_1)
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v2, v2, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v3, v3, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v4, v4, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v5, v5, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v6, v6, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v7, v7, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v8, v8, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v9, v9, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v10, v10, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v11, v11, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v12, v12, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v13, v13, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v14, v14, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v15, v15, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v16, v16, s0, s1
; GFX13-GISEL-NEXT: v_permlane_bcast_b32 v17, v17, s0, s1
; GFX13-GISEL-NEXT: s_clause 0x3
; GFX13-GISEL-NEXT: global_store_b128 v[0:1], v[2:5], off
; GFX13-GISEL-NEXT: global_store_b128 v[0:1], v[6:9], off offset:16
; GFX13-GISEL-NEXT: global_store_b128 v[0:1], v[10:13], off offset:32
; GFX13-GISEL-NEXT: global_store_b128 v[0:1], v[14:17], off offset:48
; GFX13-GISEL-NEXT: s_set_pc_i64 s[30:31]
%v = call <8 x double> @llvm.amdgcn.permlane.bcast.v8f64(<8 x double> %src, i32 %src1, i32 %src2)
store <8 x double> %v, ptr addrspace(1) %out, align 4
ret void
}