blob: 4b340f308d5f6d4abbcf8aa04c17ef8c8e59b987 [file] [log] [blame] [edit]
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -mtriple=amdgcn -mcpu=fiji < %s | FileCheck -check-prefixes=GCN %s
; RUN: llc -O0 -mtriple=amdgcn -mcpu=fiji < %s | FileCheck --check-prefixes=GCN-O0 %s
define amdgpu_kernel void @float4_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: float4_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s6, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s6, 1
; GCN-NEXT: s_cselect_b64 s[2:3], -1, 0
; GCN-NEXT: s_cmp_lg_u32 s6, 2
; GCN-NEXT: v_cndmask_b32_e64 v0, 0, 1.0, s[2:3]
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_lg_u32 s6, 3
; GCN-NEXT: v_cndmask_b32_e32 v0, 2.0, v0, vcc
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: v_cndmask_b32_e32 v2, 4.0, v0, vcc
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: flat_store_dword v[0:1], v2
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: float4_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s3, 4.0
; GCN-O0-NEXT: s_mov_b32 s4, 2.0
; GCN-O0-NEXT: s_mov_b32 s5, 1.0
; GCN-O0-NEXT: s_mov_b32 s6, 0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s6
; GCN-O0-NEXT: v_mov_b32_e32 v6, s5
; GCN-O0-NEXT: v_mov_b32_e32 v5, s4
; GCN-O0-NEXT: v_mov_b32_e32 v4, s3
; GCN-O0-NEXT: ; kill: def $vgpr0 killed $vgpr0 def $vgpr0_vgpr1_vgpr2_vgpr3 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v1, v6
; GCN-O0-NEXT: v_mov_b32_e32 v2, v5
; GCN-O0-NEXT: v_mov_b32_e32 v3, v4
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v2, v0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dword v[0:1], v2
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <4 x float> <float 0.0, float 1.0, float 2.0, float 4.0>, i32 %sel
store float %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @int4_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: int4_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s2, 1
; GCN-NEXT: s_cselect_b32 s3, 1, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 2
; GCN-NEXT: s_cselect_b32 s3, s3, 2
; GCN-NEXT: s_cmp_lg_u32 s2, 3
; GCN-NEXT: s_cselect_b32 s2, s3, 4
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: v_mov_b32_e32 v2, s2
; GCN-NEXT: flat_store_dword v[0:1], v2
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: int4_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s3, 4
; GCN-O0-NEXT: s_mov_b32 s4, 2
; GCN-O0-NEXT: s_mov_b32 s5, 1
; GCN-O0-NEXT: s_mov_b32 s6, 0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s6
; GCN-O0-NEXT: v_mov_b32_e32 v6, s5
; GCN-O0-NEXT: v_mov_b32_e32 v5, s4
; GCN-O0-NEXT: v_mov_b32_e32 v4, s3
; GCN-O0-NEXT: ; kill: def $vgpr0 killed $vgpr0 def $vgpr0_vgpr1_vgpr2_vgpr3 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v1, v6
; GCN-O0-NEXT: v_mov_b32_e32 v2, v5
; GCN-O0-NEXT: v_mov_b32_e32 v3, v4
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v2, v0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dword v[0:1], v2
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <4 x i32> <i32 0, i32 1, i32 2, i32 4>, i32 %sel
store i32 %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @double4_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: double4_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_mov_b32 s3, 0x3ff028f5
; GCN-NEXT: s_mov_b32 s4, 0xc28f5c29
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s2, 1
; GCN-NEXT: s_cselect_b32 s3, s3, 0x3f847ae1
; GCN-NEXT: s_cselect_b32 s4, s4, 0x47ae147b
; GCN-NEXT: s_cmp_eq_u32 s2, 2
; GCN-NEXT: s_cselect_b32 s4, 0xe147ae14, s4
; GCN-NEXT: s_cselect_b32 s3, 0x4000147a, s3
; GCN-NEXT: s_cmp_eq_u32 s2, 3
; GCN-NEXT: s_cselect_b32 s2, 0x40100a3d, s3
; GCN-NEXT: s_cselect_b32 s3, 0x70a3d70a, s4
; GCN-NEXT: v_mov_b32_e32 v3, s1
; GCN-NEXT: v_mov_b32_e32 v0, s3
; GCN-NEXT: v_mov_b32_e32 v1, s2
; GCN-NEXT: v_mov_b32_e32 v2, s0
; GCN-NEXT: flat_store_dwordx2 v[2:3], v[0:1]
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: double4_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s3, 0x40100a3d
; GCN-O0-NEXT: s_mov_b32 s4, 0x70a3d70a
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5
; GCN-O0-NEXT: s_mov_b32 s5, s3
; GCN-O0-NEXT: s_mov_b32 s3, s5
; GCN-O0-NEXT: s_mov_b32 s12, s4
; GCN-O0-NEXT: s_mov_b32 s6, 0x4000147a
; GCN-O0-NEXT: s_mov_b32 s4, 0xe147ae14
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5
; GCN-O0-NEXT: s_mov_b32 s5, s6
; GCN-O0-NEXT: s_mov_b32 s13, s5
; GCN-O0-NEXT: s_mov_b32 s14, s4
; GCN-O0-NEXT: s_mov_b32 s6, 0x3ff028f5
; GCN-O0-NEXT: s_mov_b32 s4, 0xc28f5c29
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5
; GCN-O0-NEXT: s_mov_b32 s5, s6
; GCN-O0-NEXT: s_mov_b32 s15, s5
; GCN-O0-NEXT: s_mov_b32 s16, s4
; GCN-O0-NEXT: s_mov_b32 s6, 0x3f847ae1
; GCN-O0-NEXT: s_mov_b32 s4, 0x47ae147b
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5
; GCN-O0-NEXT: s_mov_b32 s5, s6
; GCN-O0-NEXT: s_mov_b32 s17, s5
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 killed $sgpr4_sgpr5
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s16
; GCN-O0-NEXT: s_mov_b32 s7, s15
; GCN-O0-NEXT: s_mov_b32 s8, s14
; GCN-O0-NEXT: s_mov_b32 s9, s13
; GCN-O0-NEXT: s_mov_b32 s10, s12
; GCN-O0-NEXT: s_mov_b32 s11, s3
; GCN-O0-NEXT: s_mov_b32 s3, 1
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_lshl_b32 s2, s2, s3
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: v_mov_b32_e32 v5, s9
; GCN-O0-NEXT: v_mov_b32_e32 v6, s10
; GCN-O0-NEXT: v_mov_b32_e32 v7, s11
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v1
; GCN-O0-NEXT: v_mov_b32_e32 v1, s4
; GCN-O0-NEXT: v_mov_b32_e32 v2, s5
; GCN-O0-NEXT: v_mov_b32_e32 v3, s6
; GCN-O0-NEXT: v_mov_b32_e32 v4, s7
; GCN-O0-NEXT: v_mov_b32_e32 v5, s8
; GCN-O0-NEXT: v_mov_b32_e32 v6, s9
; GCN-O0-NEXT: v_mov_b32_e32 v7, s10
; GCN-O0-NEXT: v_mov_b32_e32 v8, s11
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v2, v1
; GCN-O0-NEXT: ; kill: def $vgpr2 killed $vgpr2 def $vgpr2_vgpr3 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v3, v0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dwordx2 v[0:1], v[2:3]
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <4 x double> <double 0.01, double 1.01, double 2.01, double 4.01>, i32 %sel
store double %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @double5_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: double5_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s6, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_mov_b32 s2, 0x3ff028f5
; GCN-NEXT: s_mov_b32 s3, 0xc28f5c29
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s6, 1
; GCN-NEXT: s_cselect_b32 s2, s2, 0x3f847ae1
; GCN-NEXT: s_cselect_b32 s3, s3, 0x47ae147b
; GCN-NEXT: s_cmp_eq_u32 s6, 2
; GCN-NEXT: s_cselect_b32 s8, 0xe147ae14, s3
; GCN-NEXT: s_cselect_b32 s7, 0x4000147a, s2
; GCN-NEXT: s_cmp_eq_u32 s6, 3
; GCN-NEXT: s_cselect_b64 s[2:3], -1, 0
; GCN-NEXT: s_and_b64 s[4:5], s[2:3], exec
; GCN-NEXT: s_cselect_b32 s9, 0x40100a3d, s7
; GCN-NEXT: s_cmp_eq_u32 s6, 4
; GCN-NEXT: s_cselect_b64 s[4:5], -1, 0
; GCN-NEXT: s_and_b64 s[6:7], s[4:5], exec
; GCN-NEXT: s_cselect_b32 s6, 0x40140a3d, s9
; GCN-NEXT: s_or_b64 s[2:3], s[4:5], s[2:3]
; GCN-NEXT: s_and_b64 s[2:3], s[2:3], exec
; GCN-NEXT: s_cselect_b32 s2, 0x70a3d70a, s8
; GCN-NEXT: v_mov_b32_e32 v3, s1
; GCN-NEXT: v_mov_b32_e32 v0, s2
; GCN-NEXT: v_mov_b32_e32 v1, s6
; GCN-NEXT: v_mov_b32_e32 v2, s0
; GCN-NEXT: flat_store_dwordx2 v[2:3], v[0:1]
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: double5_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s3, 0x40140a3d
; GCN-O0-NEXT: s_mov_b32 s4, 0x70a3d70a
; GCN-O0-NEXT: s_mov_b32 s6, s4
; GCN-O0-NEXT: s_mov_b32 s7, s3
; GCN-O0-NEXT: s_mov_b32 s25, s7
; GCN-O0-NEXT: s_mov_b32 s26, s6
; GCN-O0-NEXT: s_mov_b32 s3, 0x40100a3d
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5
; GCN-O0-NEXT: s_mov_b32 s5, s3
; GCN-O0-NEXT: s_mov_b32 s27, s5
; GCN-O0-NEXT: s_mov_b32 s28, s4
; GCN-O0-NEXT: s_mov_b32 s3, 0x4000147a
; GCN-O0-NEXT: s_mov_b32 s4, 0xe147ae14
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5
; GCN-O0-NEXT: s_mov_b32 s5, s3
; GCN-O0-NEXT: s_mov_b32 s29, s5
; GCN-O0-NEXT: s_mov_b32 s30, s4
; GCN-O0-NEXT: s_mov_b32 s3, 0x3ff028f5
; GCN-O0-NEXT: s_mov_b32 s4, 0xc28f5c29
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5
; GCN-O0-NEXT: s_mov_b32 s5, s3
; GCN-O0-NEXT: s_mov_b32 s31, s5
; GCN-O0-NEXT: s_mov_b32 s33, s4
; GCN-O0-NEXT: s_mov_b32 s3, 0x3f847ae1
; GCN-O0-NEXT: s_mov_b32 s4, 0x47ae147b
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5
; GCN-O0-NEXT: s_mov_b32 s5, s3
; GCN-O0-NEXT: s_mov_b32 s34, s5
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 killed $sgpr4_sgpr5
; GCN-O0-NEXT: ; implicit-def: $sgpr24
; GCN-O0-NEXT: ; implicit-def: $sgpr3
; GCN-O0-NEXT: ; implicit-def: $sgpr23
; GCN-O0-NEXT: ; implicit-def: $sgpr3
; GCN-O0-NEXT: ; implicit-def: $sgpr22
; GCN-O0-NEXT: ; implicit-def: $sgpr3
; GCN-O0-NEXT: ; implicit-def: $sgpr21
; GCN-O0-NEXT: ; implicit-def: $sgpr3
; GCN-O0-NEXT: ; implicit-def: $sgpr20
; GCN-O0-NEXT: ; implicit-def: $sgpr3
; GCN-O0-NEXT: ; implicit-def: $sgpr3
; GCN-O0-NEXT: ; implicit-def: $sgpr5
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18_sgpr19
; GCN-O0-NEXT: s_mov_b32 s5, s34
; GCN-O0-NEXT: s_mov_b32 s6, s33
; GCN-O0-NEXT: s_mov_b32 s7, s31
; GCN-O0-NEXT: s_mov_b32 s8, s30
; GCN-O0-NEXT: s_mov_b32 s9, s29
; GCN-O0-NEXT: s_mov_b32 s10, s28
; GCN-O0-NEXT: s_mov_b32 s11, s27
; GCN-O0-NEXT: s_mov_b32 s12, s26
; GCN-O0-NEXT: s_mov_b32 s13, s25
; GCN-O0-NEXT: s_mov_b32 s14, s24
; GCN-O0-NEXT: s_mov_b32 s15, s23
; GCN-O0-NEXT: s_mov_b32 s16, s22
; GCN-O0-NEXT: s_mov_b32 s17, s21
; GCN-O0-NEXT: s_mov_b32 s18, s20
; GCN-O0-NEXT: s_mov_b32 s19, s3
; GCN-O0-NEXT: s_mov_b32 s3, 1
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_lshl_b32 s2, s2, s3
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: v_mov_b32_e32 v5, s9
; GCN-O0-NEXT: v_mov_b32_e32 v6, s10
; GCN-O0-NEXT: v_mov_b32_e32 v7, s11
; GCN-O0-NEXT: v_mov_b32_e32 v8, s12
; GCN-O0-NEXT: v_mov_b32_e32 v9, s13
; GCN-O0-NEXT: v_mov_b32_e32 v10, s14
; GCN-O0-NEXT: v_mov_b32_e32 v11, s15
; GCN-O0-NEXT: v_mov_b32_e32 v12, s16
; GCN-O0-NEXT: v_mov_b32_e32 v13, s17
; GCN-O0-NEXT: v_mov_b32_e32 v14, s18
; GCN-O0-NEXT: v_mov_b32_e32 v15, s19
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v1
; GCN-O0-NEXT: v_mov_b32_e32 v1, s4
; GCN-O0-NEXT: v_mov_b32_e32 v2, s5
; GCN-O0-NEXT: v_mov_b32_e32 v3, s6
; GCN-O0-NEXT: v_mov_b32_e32 v4, s7
; GCN-O0-NEXT: v_mov_b32_e32 v5, s8
; GCN-O0-NEXT: v_mov_b32_e32 v6, s9
; GCN-O0-NEXT: v_mov_b32_e32 v7, s10
; GCN-O0-NEXT: v_mov_b32_e32 v8, s11
; GCN-O0-NEXT: v_mov_b32_e32 v9, s12
; GCN-O0-NEXT: v_mov_b32_e32 v10, s13
; GCN-O0-NEXT: v_mov_b32_e32 v11, s14
; GCN-O0-NEXT: v_mov_b32_e32 v12, s15
; GCN-O0-NEXT: v_mov_b32_e32 v13, s16
; GCN-O0-NEXT: v_mov_b32_e32 v14, s17
; GCN-O0-NEXT: v_mov_b32_e32 v15, s18
; GCN-O0-NEXT: v_mov_b32_e32 v16, s19
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v2, v1
; GCN-O0-NEXT: ; kill: def $vgpr2 killed $vgpr2 def $vgpr2_vgpr3 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v3, v0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dwordx2 v[0:1], v[2:3]
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <5 x double> <double 0.01, double 1.01, double 2.01, double 4.01, double 5.01>, i32 %sel
store double %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @half4_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: half4_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s6, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_mov_b32 s2, 0x40003c00
; GCN-NEXT: s_mov_b32 s3, 0x44004200
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_lshl_b32 s4, s6, 4
; GCN-NEXT: s_lshr_b64 s[2:3], s[2:3], s4
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: v_mov_b32_e32 v2, s2
; GCN-NEXT: flat_store_short v[0:1], v2
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: half4_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s4, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s5, 0x44004200
; GCN-O0-NEXT: s_mov_b32 s0, 0x40003c00
; GCN-O0-NEXT: ; kill: def $sgpr0 killed $sgpr0 def $sgpr0_sgpr1
; GCN-O0-NEXT: s_mov_b32 s1, s5
; GCN-O0-NEXT: s_mov_b32 s5, 4
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_lshl_b32 s4, s4, s5
; GCN-O0-NEXT: s_lshr_b64 s[0:1], s[0:1], s4
; GCN-O0-NEXT: ; kill: def $sgpr0 killed $sgpr0 killed $sgpr0_sgpr1
; GCN-O0-NEXT: v_mov_b32_e32 v0, s2
; GCN-O0-NEXT: v_mov_b32_e32 v1, s3
; GCN-O0-NEXT: v_mov_b32_e32 v2, s0
; GCN-O0-NEXT: flat_store_short v[0:1], v2
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <4 x half> <half 1.0, half 2.0, half 3.0, half 4.0>, i32 %sel
store half %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @float2_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: float2_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s2, 1
; GCN-NEXT: s_cselect_b64 s[2:3], -1, 0
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_cndmask_b32_e64 v2, 0, 1.0, s[2:3]
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: flat_store_dword v[0:1], v2
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: float2_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s3, 1.0
; GCN-O0-NEXT: s_mov_b32 s4, 0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v2, s3
; GCN-O0-NEXT: ; kill: def $vgpr0 killed $vgpr0 def $vgpr0_vgpr1 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v1, v2
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v2, v0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dword v[0:1], v2
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <2 x float> <float 0.0, float 1.0>, i32 %sel
store float %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @double2_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: double2_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_mov_b32 s3, 0x3ff028f5
; GCN-NEXT: s_mov_b32 s4, 0xc28f5c29
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s2, 1
; GCN-NEXT: s_cselect_b32 s2, s3, 0x3f847ae1
; GCN-NEXT: s_cselect_b32 s3, s4, 0x47ae147b
; GCN-NEXT: v_mov_b32_e32 v3, s1
; GCN-NEXT: v_mov_b32_e32 v0, s3
; GCN-NEXT: v_mov_b32_e32 v1, s2
; GCN-NEXT: v_mov_b32_e32 v2, s0
; GCN-NEXT: flat_store_dwordx2 v[2:3], v[0:1]
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: double2_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s3, 0x3ff028f5
; GCN-O0-NEXT: s_mov_b32 s4, 0xc28f5c29
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5
; GCN-O0-NEXT: s_mov_b32 s5, s3
; GCN-O0-NEXT: s_mov_b32 s3, s5
; GCN-O0-NEXT: s_mov_b32 s8, s4
; GCN-O0-NEXT: s_mov_b32 s6, 0x3f847ae1
; GCN-O0-NEXT: s_mov_b32 s4, 0x47ae147b
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5
; GCN-O0-NEXT: s_mov_b32 s5, s6
; GCN-O0-NEXT: s_mov_b32 s9, s5
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 killed $sgpr4_sgpr5
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7
; GCN-O0-NEXT: s_mov_b32 s5, s9
; GCN-O0-NEXT: s_mov_b32 s6, s8
; GCN-O0-NEXT: s_mov_b32 s7, s3
; GCN-O0-NEXT: s_mov_b32 s3, 1
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_lshl_b32 s2, s2, s3
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v1
; GCN-O0-NEXT: v_mov_b32_e32 v1, s4
; GCN-O0-NEXT: v_mov_b32_e32 v2, s5
; GCN-O0-NEXT: v_mov_b32_e32 v3, s6
; GCN-O0-NEXT: v_mov_b32_e32 v4, s7
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v2, v1
; GCN-O0-NEXT: ; kill: def $vgpr2 killed $vgpr2 def $vgpr2_vgpr3 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v3, v0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dwordx2 v[0:1], v[2:3]
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <2 x double> <double 0.01, double 1.01>, i32 %sel
store double %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @half8_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: half8_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: v_mov_b32_e32 v0, 0x3c00
; GCN-NEXT: v_mov_b32_e32 v1, 0x4000
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s2, 1
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 2
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, 0x4200
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 3
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc
; GCN-NEXT: v_mov_b32_e32 v1, 0x4400
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 4
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc
; GCN-NEXT: v_mov_b32_e32 v1, 0x4500
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 5
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc
; GCN-NEXT: v_mov_b32_e32 v1, 0x4600
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 6
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc
; GCN-NEXT: v_mov_b32_e32 v1, 0x4700
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 7
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v0, vcc
; GCN-NEXT: v_mov_b32_e32 v1, 0x4800
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: v_cndmask_b32_e32 v2, v1, v0, vcc
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: flat_store_short v[0:1], v2
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: half8_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s3, 1
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_cmp_eq_u32 s2, s3
; GCN-O0-NEXT: s_cselect_b64 s[4:5], -1, 0
; GCN-O0-NEXT: s_mov_b32 s3, 0x4000
; GCN-O0-NEXT: s_mov_b32 s6, 0x3c00
; GCN-O0-NEXT: v_mov_b32_e32 v0, s6
; GCN-O0-NEXT: v_mov_b32_e32 v1, s3
; GCN-O0-NEXT: v_cndmask_b32_e64 v0, v0, v1, s[4:5]
; GCN-O0-NEXT: s_mov_b32 s3, 2
; GCN-O0-NEXT: s_cmp_eq_u32 s2, s3
; GCN-O0-NEXT: s_cselect_b64 s[4:5], -1, 0
; GCN-O0-NEXT: s_mov_b32 s3, 0x4200
; GCN-O0-NEXT: v_mov_b32_e32 v1, s3
; GCN-O0-NEXT: v_cndmask_b32_e64 v0, v0, v1, s[4:5]
; GCN-O0-NEXT: s_mov_b32 s3, 3
; GCN-O0-NEXT: s_cmp_eq_u32 s2, s3
; GCN-O0-NEXT: s_cselect_b64 s[4:5], -1, 0
; GCN-O0-NEXT: s_mov_b32 s3, 0x4400
; GCN-O0-NEXT: v_mov_b32_e32 v1, s3
; GCN-O0-NEXT: v_cndmask_b32_e64 v0, v0, v1, s[4:5]
; GCN-O0-NEXT: s_mov_b32 s3, 4
; GCN-O0-NEXT: s_cmp_eq_u32 s2, s3
; GCN-O0-NEXT: s_cselect_b64 s[4:5], -1, 0
; GCN-O0-NEXT: s_mov_b32 s3, 0x4500
; GCN-O0-NEXT: v_mov_b32_e32 v1, s3
; GCN-O0-NEXT: v_cndmask_b32_e64 v0, v0, v1, s[4:5]
; GCN-O0-NEXT: s_mov_b32 s3, 5
; GCN-O0-NEXT: s_cmp_eq_u32 s2, s3
; GCN-O0-NEXT: s_cselect_b64 s[4:5], -1, 0
; GCN-O0-NEXT: s_mov_b32 s3, 0x4600
; GCN-O0-NEXT: v_mov_b32_e32 v1, s3
; GCN-O0-NEXT: v_cndmask_b32_e64 v0, v0, v1, s[4:5]
; GCN-O0-NEXT: s_mov_b32 s3, 6
; GCN-O0-NEXT: s_cmp_eq_u32 s2, s3
; GCN-O0-NEXT: s_cselect_b64 s[4:5], -1, 0
; GCN-O0-NEXT: s_mov_b32 s3, 0x4700
; GCN-O0-NEXT: v_mov_b32_e32 v1, s3
; GCN-O0-NEXT: v_cndmask_b32_e64 v0, v0, v1, s[4:5]
; GCN-O0-NEXT: s_mov_b32 s3, 7
; GCN-O0-NEXT: s_cmp_eq_u32 s2, s3
; GCN-O0-NEXT: s_cselect_b64 s[2:3], -1, 0
; GCN-O0-NEXT: s_mov_b32 s4, 0x4800
; GCN-O0-NEXT: v_mov_b32_e32 v1, s4
; GCN-O0-NEXT: v_cndmask_b32_e64 v2, v0, v1, s[2:3]
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_short v[0:1], v2
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <8 x half> <half 1.0, half 2.0, half 3.0, half 4.0, half 5.0, half 6.0, half 7.0, half 8.0>, i32 %sel
store half %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @short8_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: short8_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s2, 1
; GCN-NEXT: s_cselect_b32 s3, 2, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 2
; GCN-NEXT: s_cselect_b32 s3, s3, 3
; GCN-NEXT: s_cmp_lg_u32 s2, 3
; GCN-NEXT: s_cselect_b32 s3, s3, 4
; GCN-NEXT: s_cmp_lg_u32 s2, 4
; GCN-NEXT: s_cselect_b32 s3, s3, 5
; GCN-NEXT: s_cmp_lg_u32 s2, 5
; GCN-NEXT: s_cselect_b32 s3, s3, 6
; GCN-NEXT: s_cmp_lg_u32 s2, 6
; GCN-NEXT: s_cselect_b32 s3, s3, 7
; GCN-NEXT: s_cmp_lg_u32 s2, 7
; GCN-NEXT: s_cselect_b32 s2, s3, 8
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: v_mov_b32_e32 v2, s2
; GCN-NEXT: flat_store_short v[0:1], v2
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: short8_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s0, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s1, 1
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_cmp_eq_u32 s0, s1
; GCN-O0-NEXT: s_mov_b32 s4, 2
; GCN-O0-NEXT: s_cselect_b32 s1, s4, s1
; GCN-O0-NEXT: s_cmp_eq_u32 s0, s4
; GCN-O0-NEXT: s_mov_b32 s4, 3
; GCN-O0-NEXT: s_cselect_b32 s1, s4, s1
; GCN-O0-NEXT: s_cmp_eq_u32 s0, s4
; GCN-O0-NEXT: s_mov_b32 s4, 4
; GCN-O0-NEXT: s_cselect_b32 s1, s4, s1
; GCN-O0-NEXT: s_cmp_eq_u32 s0, s4
; GCN-O0-NEXT: s_mov_b32 s4, 5
; GCN-O0-NEXT: s_cselect_b32 s1, s4, s1
; GCN-O0-NEXT: s_cmp_eq_u32 s0, s4
; GCN-O0-NEXT: s_mov_b32 s4, 6
; GCN-O0-NEXT: s_cselect_b32 s1, s4, s1
; GCN-O0-NEXT: s_cmp_eq_u32 s0, s4
; GCN-O0-NEXT: s_mov_b32 s4, 7
; GCN-O0-NEXT: s_cselect_b32 s1, s4, s1
; GCN-O0-NEXT: s_cmp_eq_u32 s0, s4
; GCN-O0-NEXT: s_mov_b32 s0, 8
; GCN-O0-NEXT: s_cselect_b32 s0, s0, s1
; GCN-O0-NEXT: v_mov_b32_e32 v0, s2
; GCN-O0-NEXT: v_mov_b32_e32 v1, s3
; GCN-O0-NEXT: v_mov_b32_e32 v2, s0
; GCN-O0-NEXT: flat_store_short v[0:1], v2
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <8 x i16> <i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8>, i32 %sel
store i16 %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @float8_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: float8_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: v_mov_b32_e32 v0, 1.0
; GCN-NEXT: v_mov_b32_e32 v1, 2.0
; GCN-NEXT: v_mov_b32_e32 v2, 0x40400000
; GCN-NEXT: v_mov_b32_e32 v3, 4.0
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_mov_b32 m0, s2
; GCN-NEXT: v_mov_b32_e32 v4, 0x40a00000
; GCN-NEXT: v_mov_b32_e32 v5, 0x40c00000
; GCN-NEXT: v_mov_b32_e32 v6, 0x40e00000
; GCN-NEXT: v_mov_b32_e32 v7, 0x41000000
; GCN-NEXT: v_movrels_b32_e32 v2, v0
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: flat_store_dword v[0:1], v2
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: float8_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s3, 0x41000000
; GCN-O0-NEXT: s_mov_b32 s4, 0x40e00000
; GCN-O0-NEXT: s_mov_b32 s5, 0x40c00000
; GCN-O0-NEXT: s_mov_b32 s6, 0x40a00000
; GCN-O0-NEXT: s_mov_b32 s7, 4.0
; GCN-O0-NEXT: s_mov_b32 s8, 0x40400000
; GCN-O0-NEXT: s_mov_b32 s9, 2.0
; GCN-O0-NEXT: s_mov_b32 s10, 1.0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s10
; GCN-O0-NEXT: v_mov_b32_e32 v14, s9
; GCN-O0-NEXT: v_mov_b32_e32 v13, s8
; GCN-O0-NEXT: v_mov_b32_e32 v12, s7
; GCN-O0-NEXT: v_mov_b32_e32 v11, s6
; GCN-O0-NEXT: v_mov_b32_e32 v10, s5
; GCN-O0-NEXT: v_mov_b32_e32 v9, s4
; GCN-O0-NEXT: v_mov_b32_e32 v8, s3
; GCN-O0-NEXT: ; kill: def $vgpr0 killed $vgpr0 def $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v1, v14
; GCN-O0-NEXT: v_mov_b32_e32 v2, v13
; GCN-O0-NEXT: v_mov_b32_e32 v3, v12
; GCN-O0-NEXT: v_mov_b32_e32 v4, v11
; GCN-O0-NEXT: v_mov_b32_e32 v5, v10
; GCN-O0-NEXT: v_mov_b32_e32 v6, v9
; GCN-O0-NEXT: v_mov_b32_e32 v7, v8
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v2, v0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dword v[0:1], v2
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <8 x float> <float 1.0, float 2.0, float 3.0, float 4.0, float 5.0, float 6.0, float 7.0, float 8.0>, i32 %sel
store float %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @double8_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: double8_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dwordx2 s[16:17], s[4:5], 0x24
; GCN-NEXT: s_load_dword s18, s[4:5], 0x2c
; GCN-NEXT: s_mov_b32 s0, 0
; GCN-NEXT: s_mov_b32 s15, 0x40200000
; GCN-NEXT: s_mov_b32 s13, 0x401c0000
; GCN-NEXT: s_mov_b32 s11, 0x40180000
; GCN-NEXT: s_mov_b32 s9, 0x40140000
; GCN-NEXT: s_mov_b32 s7, 0x40100000
; GCN-NEXT: s_mov_b32 s5, 0x40080000
; GCN-NEXT: s_mov_b32 s3, 2.0
; GCN-NEXT: s_mov_b32 s1, 0x3ff00000
; GCN-NEXT: s_mov_b32 s2, s0
; GCN-NEXT: s_mov_b32 s4, s0
; GCN-NEXT: s_mov_b32 s6, s0
; GCN-NEXT: s_mov_b32 s8, s0
; GCN-NEXT: s_mov_b32 s10, s0
; GCN-NEXT: s_mov_b32 s12, s0
; GCN-NEXT: s_mov_b32 s14, s0
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: v_mov_b32_e32 v15, s15
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_lshl_b32 m0, s18, 1
; GCN-NEXT: v_mov_b32_e32 v2, s2
; GCN-NEXT: v_mov_b32_e32 v3, s3
; GCN-NEXT: v_mov_b32_e32 v4, s4
; GCN-NEXT: v_mov_b32_e32 v5, s5
; GCN-NEXT: v_mov_b32_e32 v6, s6
; GCN-NEXT: v_mov_b32_e32 v7, s7
; GCN-NEXT: v_mov_b32_e32 v8, s8
; GCN-NEXT: v_mov_b32_e32 v9, s9
; GCN-NEXT: v_mov_b32_e32 v10, s10
; GCN-NEXT: v_mov_b32_e32 v11, s11
; GCN-NEXT: v_mov_b32_e32 v12, s12
; GCN-NEXT: v_mov_b32_e32 v13, s13
; GCN-NEXT: v_mov_b32_e32 v14, s14
; GCN-NEXT: v_movrels_b32_e32 v16, v1
; GCN-NEXT: v_movrels_b32_e32 v15, v0
; GCN-NEXT: v_mov_b32_e32 v0, s16
; GCN-NEXT: v_mov_b32_e32 v1, s17
; GCN-NEXT: flat_store_dwordx2 v[0:1], v[15:16]
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: double8_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s4, 0
; GCN-O0-NEXT: s_mov_b32 s5, 0x40200000
; GCN-O0-NEXT: s_mov_b32 s3, s5
; GCN-O0-NEXT: s_mov_b32 s20, s4
; GCN-O0-NEXT: s_mov_b32 s4, 0
; GCN-O0-NEXT: s_mov_b32 s5, 0x401c0000
; GCN-O0-NEXT: s_mov_b32 s21, s5
; GCN-O0-NEXT: s_mov_b32 s22, s4
; GCN-O0-NEXT: s_mov_b32 s4, 0
; GCN-O0-NEXT: s_mov_b32 s5, 0x40180000
; GCN-O0-NEXT: s_mov_b32 s23, s5
; GCN-O0-NEXT: s_mov_b32 s24, s4
; GCN-O0-NEXT: s_mov_b32 s4, 0
; GCN-O0-NEXT: s_mov_b32 s5, 0x40140000
; GCN-O0-NEXT: s_mov_b32 s25, s5
; GCN-O0-NEXT: s_mov_b32 s26, s4
; GCN-O0-NEXT: s_mov_b64 s[4:5], 4.0
; GCN-O0-NEXT: s_mov_b32 s27, s5
; GCN-O0-NEXT: s_mov_b32 s28, s4
; GCN-O0-NEXT: s_mov_b32 s4, 0
; GCN-O0-NEXT: s_mov_b32 s5, 0x40080000
; GCN-O0-NEXT: s_mov_b32 s29, s5
; GCN-O0-NEXT: s_mov_b32 s30, s4
; GCN-O0-NEXT: s_mov_b64 s[4:5], 2.0
; GCN-O0-NEXT: s_mov_b32 s31, s5
; GCN-O0-NEXT: s_mov_b32 s33, s4
; GCN-O0-NEXT: s_mov_b64 s[4:5], 1.0
; GCN-O0-NEXT: s_mov_b32 s34, s5
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 killed $sgpr4_sgpr5
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18_sgpr19
; GCN-O0-NEXT: s_mov_b32 s5, s34
; GCN-O0-NEXT: s_mov_b32 s6, s33
; GCN-O0-NEXT: s_mov_b32 s7, s31
; GCN-O0-NEXT: s_mov_b32 s8, s30
; GCN-O0-NEXT: s_mov_b32 s9, s29
; GCN-O0-NEXT: s_mov_b32 s10, s28
; GCN-O0-NEXT: s_mov_b32 s11, s27
; GCN-O0-NEXT: s_mov_b32 s12, s26
; GCN-O0-NEXT: s_mov_b32 s13, s25
; GCN-O0-NEXT: s_mov_b32 s14, s24
; GCN-O0-NEXT: s_mov_b32 s15, s23
; GCN-O0-NEXT: s_mov_b32 s16, s22
; GCN-O0-NEXT: s_mov_b32 s17, s21
; GCN-O0-NEXT: s_mov_b32 s18, s20
; GCN-O0-NEXT: s_mov_b32 s19, s3
; GCN-O0-NEXT: s_mov_b32 s3, 1
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_lshl_b32 s2, s2, s3
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: v_mov_b32_e32 v5, s9
; GCN-O0-NEXT: v_mov_b32_e32 v6, s10
; GCN-O0-NEXT: v_mov_b32_e32 v7, s11
; GCN-O0-NEXT: v_mov_b32_e32 v8, s12
; GCN-O0-NEXT: v_mov_b32_e32 v9, s13
; GCN-O0-NEXT: v_mov_b32_e32 v10, s14
; GCN-O0-NEXT: v_mov_b32_e32 v11, s15
; GCN-O0-NEXT: v_mov_b32_e32 v12, s16
; GCN-O0-NEXT: v_mov_b32_e32 v13, s17
; GCN-O0-NEXT: v_mov_b32_e32 v14, s18
; GCN-O0-NEXT: v_mov_b32_e32 v15, s19
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v1
; GCN-O0-NEXT: v_mov_b32_e32 v1, s4
; GCN-O0-NEXT: v_mov_b32_e32 v2, s5
; GCN-O0-NEXT: v_mov_b32_e32 v3, s6
; GCN-O0-NEXT: v_mov_b32_e32 v4, s7
; GCN-O0-NEXT: v_mov_b32_e32 v5, s8
; GCN-O0-NEXT: v_mov_b32_e32 v6, s9
; GCN-O0-NEXT: v_mov_b32_e32 v7, s10
; GCN-O0-NEXT: v_mov_b32_e32 v8, s11
; GCN-O0-NEXT: v_mov_b32_e32 v9, s12
; GCN-O0-NEXT: v_mov_b32_e32 v10, s13
; GCN-O0-NEXT: v_mov_b32_e32 v11, s14
; GCN-O0-NEXT: v_mov_b32_e32 v12, s15
; GCN-O0-NEXT: v_mov_b32_e32 v13, s16
; GCN-O0-NEXT: v_mov_b32_e32 v14, s17
; GCN-O0-NEXT: v_mov_b32_e32 v15, s18
; GCN-O0-NEXT: v_mov_b32_e32 v16, s19
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v2, v1
; GCN-O0-NEXT: ; kill: def $vgpr2 killed $vgpr2 def $vgpr2_vgpr3 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v3, v0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dwordx2 v[0:1], v[2:3]
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <8 x double> <double 1.0, double 2.0, double 3.0, double 4.0, double 5.0, double 6.0, double 7.0, double 8.0>, i32 %sel
store double %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @double7_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: double7_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dwordx2 s[14:15], s[4:5], 0x24
; GCN-NEXT: s_load_dword s16, s[4:5], 0x2c
; GCN-NEXT: s_mov_b32 s0, 0
; GCN-NEXT: s_mov_b32 s13, 0x401c0000
; GCN-NEXT: s_mov_b32 s11, 0x40180000
; GCN-NEXT: s_mov_b32 s9, 0x40140000
; GCN-NEXT: s_mov_b32 s7, 0x40100000
; GCN-NEXT: s_mov_b32 s5, 0x40080000
; GCN-NEXT: s_mov_b32 s3, 2.0
; GCN-NEXT: s_mov_b32 s1, 0x3ff00000
; GCN-NEXT: s_mov_b32 s2, s0
; GCN-NEXT: s_mov_b32 s4, s0
; GCN-NEXT: s_mov_b32 s6, s0
; GCN-NEXT: s_mov_b32 s8, s0
; GCN-NEXT: s_mov_b32 s10, s0
; GCN-NEXT: s_mov_b32 s12, s0
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: v_mov_b32_e32 v15, s15
; GCN-NEXT: s_lshl_b32 m0, s16, 1
; GCN-NEXT: v_mov_b32_e32 v2, s2
; GCN-NEXT: v_mov_b32_e32 v3, s3
; GCN-NEXT: v_mov_b32_e32 v4, s4
; GCN-NEXT: v_mov_b32_e32 v5, s5
; GCN-NEXT: v_mov_b32_e32 v6, s6
; GCN-NEXT: v_mov_b32_e32 v7, s7
; GCN-NEXT: v_mov_b32_e32 v8, s8
; GCN-NEXT: v_mov_b32_e32 v9, s9
; GCN-NEXT: v_mov_b32_e32 v10, s10
; GCN-NEXT: v_mov_b32_e32 v11, s11
; GCN-NEXT: v_mov_b32_e32 v12, s12
; GCN-NEXT: v_mov_b32_e32 v13, s13
; GCN-NEXT: v_mov_b32_e32 v14, s14
; GCN-NEXT: v_movrels_b32_e32 v16, v1
; GCN-NEXT: v_movrels_b32_e32 v15, v0
; GCN-NEXT: v_mov_b32_e32 v0, s14
; GCN-NEXT: v_mov_b32_e32 v1, s15
; GCN-NEXT: flat_store_dwordx2 v[0:1], v[15:16]
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: double7_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s4, 0
; GCN-O0-NEXT: s_mov_b32 s5, 0x401c0000
; GCN-O0-NEXT: s_mov_b32 s21, s5
; GCN-O0-NEXT: s_mov_b32 s22, s4
; GCN-O0-NEXT: s_mov_b32 s4, 0
; GCN-O0-NEXT: s_mov_b32 s5, 0x40180000
; GCN-O0-NEXT: s_mov_b32 s23, s5
; GCN-O0-NEXT: s_mov_b32 s24, s4
; GCN-O0-NEXT: s_mov_b32 s4, 0
; GCN-O0-NEXT: s_mov_b32 s5, 0x40140000
; GCN-O0-NEXT: s_mov_b32 s25, s5
; GCN-O0-NEXT: s_mov_b32 s26, s4
; GCN-O0-NEXT: s_mov_b64 s[4:5], 4.0
; GCN-O0-NEXT: s_mov_b32 s27, s5
; GCN-O0-NEXT: s_mov_b32 s28, s4
; GCN-O0-NEXT: s_mov_b32 s4, 0
; GCN-O0-NEXT: s_mov_b32 s5, 0x40080000
; GCN-O0-NEXT: s_mov_b32 s29, s5
; GCN-O0-NEXT: s_mov_b32 s30, s4
; GCN-O0-NEXT: s_mov_b64 s[4:5], 2.0
; GCN-O0-NEXT: s_mov_b32 s31, s5
; GCN-O0-NEXT: s_mov_b32 s33, s4
; GCN-O0-NEXT: s_mov_b64 s[4:5], 1.0
; GCN-O0-NEXT: s_mov_b32 s34, s5
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 killed $sgpr4_sgpr5
; GCN-O0-NEXT: ; implicit-def: $sgpr20
; GCN-O0-NEXT: ; implicit-def: $sgpr3
; GCN-O0-NEXT: ; implicit-def: $sgpr3
; GCN-O0-NEXT: ; implicit-def: $sgpr5
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18_sgpr19
; GCN-O0-NEXT: s_mov_b32 s5, s34
; GCN-O0-NEXT: s_mov_b32 s6, s33
; GCN-O0-NEXT: s_mov_b32 s7, s31
; GCN-O0-NEXT: s_mov_b32 s8, s30
; GCN-O0-NEXT: s_mov_b32 s9, s29
; GCN-O0-NEXT: s_mov_b32 s10, s28
; GCN-O0-NEXT: s_mov_b32 s11, s27
; GCN-O0-NEXT: s_mov_b32 s12, s26
; GCN-O0-NEXT: s_mov_b32 s13, s25
; GCN-O0-NEXT: s_mov_b32 s14, s24
; GCN-O0-NEXT: s_mov_b32 s15, s23
; GCN-O0-NEXT: s_mov_b32 s16, s22
; GCN-O0-NEXT: s_mov_b32 s17, s21
; GCN-O0-NEXT: s_mov_b32 s18, s20
; GCN-O0-NEXT: s_mov_b32 s19, s3
; GCN-O0-NEXT: s_mov_b32 s3, 1
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_lshl_b32 s2, s2, s3
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: v_mov_b32_e32 v5, s9
; GCN-O0-NEXT: v_mov_b32_e32 v6, s10
; GCN-O0-NEXT: v_mov_b32_e32 v7, s11
; GCN-O0-NEXT: v_mov_b32_e32 v8, s12
; GCN-O0-NEXT: v_mov_b32_e32 v9, s13
; GCN-O0-NEXT: v_mov_b32_e32 v10, s14
; GCN-O0-NEXT: v_mov_b32_e32 v11, s15
; GCN-O0-NEXT: v_mov_b32_e32 v12, s16
; GCN-O0-NEXT: v_mov_b32_e32 v13, s17
; GCN-O0-NEXT: v_mov_b32_e32 v14, s18
; GCN-O0-NEXT: v_mov_b32_e32 v15, s19
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v1
; GCN-O0-NEXT: v_mov_b32_e32 v1, s4
; GCN-O0-NEXT: v_mov_b32_e32 v2, s5
; GCN-O0-NEXT: v_mov_b32_e32 v3, s6
; GCN-O0-NEXT: v_mov_b32_e32 v4, s7
; GCN-O0-NEXT: v_mov_b32_e32 v5, s8
; GCN-O0-NEXT: v_mov_b32_e32 v6, s9
; GCN-O0-NEXT: v_mov_b32_e32 v7, s10
; GCN-O0-NEXT: v_mov_b32_e32 v8, s11
; GCN-O0-NEXT: v_mov_b32_e32 v9, s12
; GCN-O0-NEXT: v_mov_b32_e32 v10, s13
; GCN-O0-NEXT: v_mov_b32_e32 v11, s14
; GCN-O0-NEXT: v_mov_b32_e32 v12, s15
; GCN-O0-NEXT: v_mov_b32_e32 v13, s16
; GCN-O0-NEXT: v_mov_b32_e32 v14, s17
; GCN-O0-NEXT: v_mov_b32_e32 v15, s18
; GCN-O0-NEXT: v_mov_b32_e32 v16, s19
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v2, v1
; GCN-O0-NEXT: ; kill: def $vgpr2 killed $vgpr2 def $vgpr2_vgpr3 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v3, v0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dwordx2 v[0:1], v[2:3]
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <7 x double> <double 1.0, double 2.0, double 3.0, double 4.0, double 5.0, double 6.0, double 7.0>, i32 %sel
store double %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @float16_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: float16_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: v_mov_b32_e32 v0, 1.0
; GCN-NEXT: v_mov_b32_e32 v1, 2.0
; GCN-NEXT: v_mov_b32_e32 v2, 0x40400000
; GCN-NEXT: v_mov_b32_e32 v3, 4.0
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_mov_b32 m0, s2
; GCN-NEXT: v_mov_b32_e32 v4, 0x40a00000
; GCN-NEXT: v_mov_b32_e32 v5, 0x40c00000
; GCN-NEXT: v_mov_b32_e32 v6, 0x40e00000
; GCN-NEXT: v_mov_b32_e32 v7, 0x41000000
; GCN-NEXT: v_mov_b32_e32 v8, 0x41100000
; GCN-NEXT: v_mov_b32_e32 v9, 0x41200000
; GCN-NEXT: v_mov_b32_e32 v10, 0x41300000
; GCN-NEXT: v_mov_b32_e32 v11, 0x41400000
; GCN-NEXT: v_mov_b32_e32 v12, 0x41500000
; GCN-NEXT: v_mov_b32_e32 v13, 0x41600000
; GCN-NEXT: v_mov_b32_e32 v14, 0x41700000
; GCN-NEXT: v_mov_b32_e32 v15, 0x41800000
; GCN-NEXT: v_movrels_b32_e32 v2, v0
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: flat_store_dword v[0:1], v2
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: float16_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s3, 0x41800000
; GCN-O0-NEXT: s_mov_b32 s4, 0x41700000
; GCN-O0-NEXT: s_mov_b32 s5, 0x41600000
; GCN-O0-NEXT: s_mov_b32 s6, 0x41500000
; GCN-O0-NEXT: s_mov_b32 s7, 0x41400000
; GCN-O0-NEXT: s_mov_b32 s8, 0x41300000
; GCN-O0-NEXT: s_mov_b32 s9, 0x41200000
; GCN-O0-NEXT: s_mov_b32 s10, 0x41100000
; GCN-O0-NEXT: s_mov_b32 s11, 0x41000000
; GCN-O0-NEXT: s_mov_b32 s12, 0x40e00000
; GCN-O0-NEXT: s_mov_b32 s13, 0x40c00000
; GCN-O0-NEXT: s_mov_b32 s14, 0x40a00000
; GCN-O0-NEXT: s_mov_b32 s15, 4.0
; GCN-O0-NEXT: s_mov_b32 s16, 0x40400000
; GCN-O0-NEXT: s_mov_b32 s17, 2.0
; GCN-O0-NEXT: s_mov_b32 s18, 1.0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s18
; GCN-O0-NEXT: v_mov_b32_e32 v30, s17
; GCN-O0-NEXT: v_mov_b32_e32 v29, s16
; GCN-O0-NEXT: v_mov_b32_e32 v28, s15
; GCN-O0-NEXT: v_mov_b32_e32 v27, s14
; GCN-O0-NEXT: v_mov_b32_e32 v26, s13
; GCN-O0-NEXT: v_mov_b32_e32 v25, s12
; GCN-O0-NEXT: v_mov_b32_e32 v24, s11
; GCN-O0-NEXT: v_mov_b32_e32 v23, s10
; GCN-O0-NEXT: v_mov_b32_e32 v22, s9
; GCN-O0-NEXT: v_mov_b32_e32 v21, s8
; GCN-O0-NEXT: v_mov_b32_e32 v20, s7
; GCN-O0-NEXT: v_mov_b32_e32 v19, s6
; GCN-O0-NEXT: v_mov_b32_e32 v18, s5
; GCN-O0-NEXT: v_mov_b32_e32 v17, s4
; GCN-O0-NEXT: v_mov_b32_e32 v16, s3
; GCN-O0-NEXT: ; kill: def $vgpr0 killed $vgpr0 def $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v1, v30
; GCN-O0-NEXT: v_mov_b32_e32 v2, v29
; GCN-O0-NEXT: v_mov_b32_e32 v3, v28
; GCN-O0-NEXT: v_mov_b32_e32 v4, v27
; GCN-O0-NEXT: v_mov_b32_e32 v5, v26
; GCN-O0-NEXT: v_mov_b32_e32 v6, v25
; GCN-O0-NEXT: v_mov_b32_e32 v7, v24
; GCN-O0-NEXT: v_mov_b32_e32 v8, v23
; GCN-O0-NEXT: v_mov_b32_e32 v9, v22
; GCN-O0-NEXT: v_mov_b32_e32 v10, v21
; GCN-O0-NEXT: v_mov_b32_e32 v11, v20
; GCN-O0-NEXT: v_mov_b32_e32 v12, v19
; GCN-O0-NEXT: v_mov_b32_e32 v13, v18
; GCN-O0-NEXT: v_mov_b32_e32 v14, v17
; GCN-O0-NEXT: v_mov_b32_e32 v15, v16
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v2, v0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dword v[0:1], v2
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <16 x float> <float 1.0, float 2.0, float 3.0, float 4.0, float 5.0, float 6.0, float 7.0, float 8.0, float 9.0, float 10.0, float 11.0, float 12.0, float 13.0, float 14.0, float 15.0, float 16.0>, i32 %sel
store float %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @double15_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: double15_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_mov_b32 s36, 0
; GCN-NEXT: s_mov_b32 s65, 0x402e0000
; GCN-NEXT: s_mov_b32 s63, 0x402c0000
; GCN-NEXT: s_mov_b32 s61, 0x402a0000
; GCN-NEXT: s_mov_b32 s59, 0x40280000
; GCN-NEXT: s_mov_b32 s57, 0x40260000
; GCN-NEXT: s_mov_b32 s55, 0x40240000
; GCN-NEXT: s_mov_b32 s53, 0x40220000
; GCN-NEXT: s_mov_b32 s51, 0x40200000
; GCN-NEXT: s_mov_b32 s49, 0x401c0000
; GCN-NEXT: s_mov_b32 s47, 0x40180000
; GCN-NEXT: s_mov_b32 s45, 0x40140000
; GCN-NEXT: s_mov_b32 s43, 0x40100000
; GCN-NEXT: s_mov_b32 s41, 0x40080000
; GCN-NEXT: s_mov_b32 s39, 2.0
; GCN-NEXT: s_mov_b32 s37, 0x3ff00000
; GCN-NEXT: s_mov_b32 s38, s36
; GCN-NEXT: s_mov_b32 s40, s36
; GCN-NEXT: s_mov_b32 s42, s36
; GCN-NEXT: s_mov_b32 s44, s36
; GCN-NEXT: s_mov_b32 s46, s36
; GCN-NEXT: s_mov_b32 s48, s36
; GCN-NEXT: s_mov_b32 s50, s36
; GCN-NEXT: s_mov_b32 s52, s36
; GCN-NEXT: s_mov_b32 s54, s36
; GCN-NEXT: s_mov_b32 s56, s36
; GCN-NEXT: s_mov_b32 s58, s36
; GCN-NEXT: s_mov_b32 s60, s36
; GCN-NEXT: s_mov_b32 s62, s36
; GCN-NEXT: s_mov_b32 s64, s36
; GCN-NEXT: v_mov_b32_e32 v0, s36
; GCN-NEXT: v_mov_b32_e32 v1, s37
; GCN-NEXT: v_mov_b32_e32 v31, s67
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_lshl_b32 m0, s2, 1
; GCN-NEXT: v_mov_b32_e32 v2, s38
; GCN-NEXT: v_mov_b32_e32 v3, s39
; GCN-NEXT: v_mov_b32_e32 v4, s40
; GCN-NEXT: v_mov_b32_e32 v5, s41
; GCN-NEXT: v_mov_b32_e32 v6, s42
; GCN-NEXT: v_mov_b32_e32 v7, s43
; GCN-NEXT: v_mov_b32_e32 v8, s44
; GCN-NEXT: v_mov_b32_e32 v9, s45
; GCN-NEXT: v_mov_b32_e32 v10, s46
; GCN-NEXT: v_mov_b32_e32 v11, s47
; GCN-NEXT: v_mov_b32_e32 v12, s48
; GCN-NEXT: v_mov_b32_e32 v13, s49
; GCN-NEXT: v_mov_b32_e32 v14, s50
; GCN-NEXT: v_mov_b32_e32 v15, s51
; GCN-NEXT: v_mov_b32_e32 v16, s52
; GCN-NEXT: v_mov_b32_e32 v17, s53
; GCN-NEXT: v_mov_b32_e32 v18, s54
; GCN-NEXT: v_mov_b32_e32 v19, s55
; GCN-NEXT: v_mov_b32_e32 v20, s56
; GCN-NEXT: v_mov_b32_e32 v21, s57
; GCN-NEXT: v_mov_b32_e32 v22, s58
; GCN-NEXT: v_mov_b32_e32 v23, s59
; GCN-NEXT: v_mov_b32_e32 v24, s60
; GCN-NEXT: v_mov_b32_e32 v25, s61
; GCN-NEXT: v_mov_b32_e32 v26, s62
; GCN-NEXT: v_mov_b32_e32 v27, s63
; GCN-NEXT: v_mov_b32_e32 v28, s64
; GCN-NEXT: v_mov_b32_e32 v29, s65
; GCN-NEXT: v_mov_b32_e32 v30, s66
; GCN-NEXT: v_movrels_b32_e32 v32, v1
; GCN-NEXT: v_movrels_b32_e32 v31, v0
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: flat_store_dwordx2 v[0:1], v[31:32]
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: double15_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s6, 0
; GCN-O0-NEXT: s_mov_b32 s7, 0x402e0000
; GCN-O0-NEXT: s_mov_b32 s5, s7
; GCN-O0-NEXT: ; kill: def $sgpr6 killed $sgpr6 killed $sgpr6_sgpr7
; GCN-O0-NEXT: s_mov_b32 s8, 0
; GCN-O0-NEXT: s_mov_b32 s9, 0x402c0000
; GCN-O0-NEXT: s_mov_b32 s7, s9
; GCN-O0-NEXT: ; kill: def $sgpr8 killed $sgpr8 killed $sgpr8_sgpr9
; GCN-O0-NEXT: s_mov_b32 s10, 0
; GCN-O0-NEXT: s_mov_b32 s11, 0x402a0000
; GCN-O0-NEXT: s_mov_b32 s9, s11
; GCN-O0-NEXT: ; kill: def $sgpr10 killed $sgpr10 killed $sgpr10_sgpr11
; GCN-O0-NEXT: s_mov_b32 s12, 0
; GCN-O0-NEXT: s_mov_b32 s13, 0x40280000
; GCN-O0-NEXT: s_mov_b32 s11, s13
; GCN-O0-NEXT: ; kill: def $sgpr12 killed $sgpr12 killed $sgpr12_sgpr13
; GCN-O0-NEXT: s_mov_b32 s14, 0
; GCN-O0-NEXT: s_mov_b32 s15, 0x40260000
; GCN-O0-NEXT: s_mov_b32 s13, s15
; GCN-O0-NEXT: ; kill: def $sgpr14 killed $sgpr14 killed $sgpr14_sgpr15
; GCN-O0-NEXT: s_mov_b32 s16, 0
; GCN-O0-NEXT: s_mov_b32 s17, 0x40240000
; GCN-O0-NEXT: s_mov_b32 s15, s17
; GCN-O0-NEXT: ; kill: def $sgpr16 killed $sgpr16 killed $sgpr16_sgpr17
; GCN-O0-NEXT: s_mov_b32 s18, 0
; GCN-O0-NEXT: s_mov_b32 s19, 0x40220000
; GCN-O0-NEXT: s_mov_b32 s17, s19
; GCN-O0-NEXT: ; kill: def $sgpr18 killed $sgpr18 killed $sgpr18_sgpr19
; GCN-O0-NEXT: s_mov_b32 s20, 0
; GCN-O0-NEXT: s_mov_b32 s21, 0x40200000
; GCN-O0-NEXT: s_mov_b32 s19, s21
; GCN-O0-NEXT: ; kill: def $sgpr20 killed $sgpr20 killed $sgpr20_sgpr21
; GCN-O0-NEXT: s_mov_b32 s22, 0
; GCN-O0-NEXT: s_mov_b32 s23, 0x401c0000
; GCN-O0-NEXT: s_mov_b32 s21, s23
; GCN-O0-NEXT: ; kill: def $sgpr22 killed $sgpr22 killed $sgpr22_sgpr23
; GCN-O0-NEXT: s_mov_b32 s24, 0
; GCN-O0-NEXT: s_mov_b32 s25, 0x40180000
; GCN-O0-NEXT: s_mov_b32 s23, s25
; GCN-O0-NEXT: ; kill: def $sgpr24 killed $sgpr24 killed $sgpr24_sgpr25
; GCN-O0-NEXT: s_mov_b32 s26, 0
; GCN-O0-NEXT: s_mov_b32 s27, 0x40140000
; GCN-O0-NEXT: s_mov_b32 s25, s27
; GCN-O0-NEXT: ; kill: def $sgpr26 killed $sgpr26 killed $sgpr26_sgpr27
; GCN-O0-NEXT: s_mov_b64 s[28:29], 4.0
; GCN-O0-NEXT: s_mov_b32 s27, s29
; GCN-O0-NEXT: ; kill: def $sgpr28 killed $sgpr28 killed $sgpr28_sgpr29
; GCN-O0-NEXT: s_mov_b32 s30, 0
; GCN-O0-NEXT: s_mov_b32 s31, 0x40080000
; GCN-O0-NEXT: s_mov_b32 s29, s31
; GCN-O0-NEXT: ; kill: def $sgpr30 killed $sgpr30 killed $sgpr30_sgpr31
; GCN-O0-NEXT: s_mov_b64 s[34:35], 2.0
; GCN-O0-NEXT: s_mov_b32 s31, s35
; GCN-O0-NEXT: s_mov_b32 s33, s34
; GCN-O0-NEXT: s_mov_b64 s[36:37], 1.0
; GCN-O0-NEXT: s_mov_b32 s34, s37
; GCN-O0-NEXT: ; kill: def $sgpr36 killed $sgpr36 killed $sgpr36_sgpr37
; GCN-O0-NEXT: ; implicit-def: $sgpr4
; GCN-O0-NEXT: ; implicit-def: $sgpr3
; GCN-O0-NEXT: ; implicit-def: $sgpr3
; GCN-O0-NEXT: ; implicit-def: $sgpr35
; GCN-O0-NEXT: ; kill: def $sgpr36 killed $sgpr36 def $sgpr36_sgpr37_sgpr38_sgpr39_sgpr40_sgpr41_sgpr42_sgpr43_sgpr44_sgpr45_sgpr46_sgpr47_sgpr48_sgpr49_sgpr50_sgpr51_sgpr52_sgpr53_sgpr54_sgpr55_sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67
; GCN-O0-NEXT: s_mov_b32 s37, s34
; GCN-O0-NEXT: s_mov_b32 s38, s33
; GCN-O0-NEXT: s_mov_b32 s39, s31
; GCN-O0-NEXT: s_mov_b32 s40, s30
; GCN-O0-NEXT: s_mov_b32 s41, s29
; GCN-O0-NEXT: s_mov_b32 s42, s28
; GCN-O0-NEXT: s_mov_b32 s43, s27
; GCN-O0-NEXT: s_mov_b32 s44, s26
; GCN-O0-NEXT: s_mov_b32 s45, s25
; GCN-O0-NEXT: s_mov_b32 s46, s24
; GCN-O0-NEXT: s_mov_b32 s47, s23
; GCN-O0-NEXT: s_mov_b32 s48, s22
; GCN-O0-NEXT: s_mov_b32 s49, s21
; GCN-O0-NEXT: s_mov_b32 s50, s20
; GCN-O0-NEXT: s_mov_b32 s51, s19
; GCN-O0-NEXT: s_mov_b32 s52, s18
; GCN-O0-NEXT: s_mov_b32 s53, s17
; GCN-O0-NEXT: s_mov_b32 s54, s16
; GCN-O0-NEXT: s_mov_b32 s55, s15
; GCN-O0-NEXT: s_mov_b32 s56, s14
; GCN-O0-NEXT: s_mov_b32 s57, s13
; GCN-O0-NEXT: s_mov_b32 s58, s12
; GCN-O0-NEXT: s_mov_b32 s59, s11
; GCN-O0-NEXT: s_mov_b32 s60, s10
; GCN-O0-NEXT: s_mov_b32 s61, s9
; GCN-O0-NEXT: s_mov_b32 s62, s8
; GCN-O0-NEXT: s_mov_b32 s63, s7
; GCN-O0-NEXT: s_mov_b32 s64, s6
; GCN-O0-NEXT: s_mov_b32 s65, s5
; GCN-O0-NEXT: s_mov_b32 s66, s4
; GCN-O0-NEXT: s_mov_b32 s67, s3
; GCN-O0-NEXT: s_mov_b32 s3, 1
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_lshl_b32 s2, s2, s3
; GCN-O0-NEXT: v_mov_b32_e32 v0, s36
; GCN-O0-NEXT: v_mov_b32_e32 v1, s37
; GCN-O0-NEXT: v_mov_b32_e32 v2, s38
; GCN-O0-NEXT: v_mov_b32_e32 v3, s39
; GCN-O0-NEXT: v_mov_b32_e32 v4, s40
; GCN-O0-NEXT: v_mov_b32_e32 v5, s41
; GCN-O0-NEXT: v_mov_b32_e32 v6, s42
; GCN-O0-NEXT: v_mov_b32_e32 v7, s43
; GCN-O0-NEXT: v_mov_b32_e32 v8, s44
; GCN-O0-NEXT: v_mov_b32_e32 v9, s45
; GCN-O0-NEXT: v_mov_b32_e32 v10, s46
; GCN-O0-NEXT: v_mov_b32_e32 v11, s47
; GCN-O0-NEXT: v_mov_b32_e32 v12, s48
; GCN-O0-NEXT: v_mov_b32_e32 v13, s49
; GCN-O0-NEXT: v_mov_b32_e32 v14, s50
; GCN-O0-NEXT: v_mov_b32_e32 v15, s51
; GCN-O0-NEXT: v_mov_b32_e32 v16, s52
; GCN-O0-NEXT: v_mov_b32_e32 v17, s53
; GCN-O0-NEXT: v_mov_b32_e32 v18, s54
; GCN-O0-NEXT: v_mov_b32_e32 v19, s55
; GCN-O0-NEXT: v_mov_b32_e32 v20, s56
; GCN-O0-NEXT: v_mov_b32_e32 v21, s57
; GCN-O0-NEXT: v_mov_b32_e32 v22, s58
; GCN-O0-NEXT: v_mov_b32_e32 v23, s59
; GCN-O0-NEXT: v_mov_b32_e32 v24, s60
; GCN-O0-NEXT: v_mov_b32_e32 v25, s61
; GCN-O0-NEXT: v_mov_b32_e32 v26, s62
; GCN-O0-NEXT: v_mov_b32_e32 v27, s63
; GCN-O0-NEXT: v_mov_b32_e32 v28, s64
; GCN-O0-NEXT: v_mov_b32_e32 v29, s65
; GCN-O0-NEXT: v_mov_b32_e32 v30, s66
; GCN-O0-NEXT: v_mov_b32_e32 v31, s67
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v1
; GCN-O0-NEXT: v_mov_b32_e32 v1, s36
; GCN-O0-NEXT: v_mov_b32_e32 v2, s37
; GCN-O0-NEXT: v_mov_b32_e32 v3, s38
; GCN-O0-NEXT: v_mov_b32_e32 v4, s39
; GCN-O0-NEXT: v_mov_b32_e32 v5, s40
; GCN-O0-NEXT: v_mov_b32_e32 v6, s41
; GCN-O0-NEXT: v_mov_b32_e32 v7, s42
; GCN-O0-NEXT: v_mov_b32_e32 v8, s43
; GCN-O0-NEXT: v_mov_b32_e32 v9, s44
; GCN-O0-NEXT: v_mov_b32_e32 v10, s45
; GCN-O0-NEXT: v_mov_b32_e32 v11, s46
; GCN-O0-NEXT: v_mov_b32_e32 v12, s47
; GCN-O0-NEXT: v_mov_b32_e32 v13, s48
; GCN-O0-NEXT: v_mov_b32_e32 v14, s49
; GCN-O0-NEXT: v_mov_b32_e32 v15, s50
; GCN-O0-NEXT: v_mov_b32_e32 v16, s51
; GCN-O0-NEXT: v_mov_b32_e32 v17, s52
; GCN-O0-NEXT: v_mov_b32_e32 v18, s53
; GCN-O0-NEXT: v_mov_b32_e32 v19, s54
; GCN-O0-NEXT: v_mov_b32_e32 v20, s55
; GCN-O0-NEXT: v_mov_b32_e32 v21, s56
; GCN-O0-NEXT: v_mov_b32_e32 v22, s57
; GCN-O0-NEXT: v_mov_b32_e32 v23, s58
; GCN-O0-NEXT: v_mov_b32_e32 v24, s59
; GCN-O0-NEXT: v_mov_b32_e32 v25, s60
; GCN-O0-NEXT: v_mov_b32_e32 v26, s61
; GCN-O0-NEXT: v_mov_b32_e32 v27, s62
; GCN-O0-NEXT: v_mov_b32_e32 v28, s63
; GCN-O0-NEXT: v_mov_b32_e32 v29, s64
; GCN-O0-NEXT: v_mov_b32_e32 v30, s65
; GCN-O0-NEXT: v_mov_b32_e32 v31, s66
; GCN-O0-NEXT: v_mov_b32_e32 v32, s67
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v2, v1
; GCN-O0-NEXT: ; kill: def $vgpr2 killed $vgpr2 def $vgpr2_vgpr3 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v3, v0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dwordx2 v[0:1], v[2:3]
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <15 x double> <double 1.0, double 2.0, double 3.0, double 4.0, double 5.0, double 6.0, double 7.0, double 8.0, double 9.0, double 10.0, double 11.0, double 12.0, double 13.0, double 14.0, double 15.0>, i32 %sel
store double %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @double16_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: double16_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_mov_b32 s36, 0
; GCN-NEXT: s_mov_b32 s67, 0x40300000
; GCN-NEXT: s_mov_b32 s65, 0x402e0000
; GCN-NEXT: s_mov_b32 s63, 0x402c0000
; GCN-NEXT: s_mov_b32 s61, 0x402a0000
; GCN-NEXT: s_mov_b32 s59, 0x40280000
; GCN-NEXT: s_mov_b32 s57, 0x40260000
; GCN-NEXT: s_mov_b32 s55, 0x40240000
; GCN-NEXT: s_mov_b32 s53, 0x40220000
; GCN-NEXT: s_mov_b32 s51, 0x40200000
; GCN-NEXT: s_mov_b32 s49, 0x401c0000
; GCN-NEXT: s_mov_b32 s47, 0x40180000
; GCN-NEXT: s_mov_b32 s45, 0x40140000
; GCN-NEXT: s_mov_b32 s43, 0x40100000
; GCN-NEXT: s_mov_b32 s41, 0x40080000
; GCN-NEXT: s_mov_b32 s39, 2.0
; GCN-NEXT: s_mov_b32 s37, 0x3ff00000
; GCN-NEXT: s_mov_b32 s38, s36
; GCN-NEXT: s_mov_b32 s40, s36
; GCN-NEXT: s_mov_b32 s42, s36
; GCN-NEXT: s_mov_b32 s44, s36
; GCN-NEXT: s_mov_b32 s46, s36
; GCN-NEXT: s_mov_b32 s48, s36
; GCN-NEXT: s_mov_b32 s50, s36
; GCN-NEXT: s_mov_b32 s52, s36
; GCN-NEXT: s_mov_b32 s54, s36
; GCN-NEXT: s_mov_b32 s56, s36
; GCN-NEXT: s_mov_b32 s58, s36
; GCN-NEXT: s_mov_b32 s60, s36
; GCN-NEXT: s_mov_b32 s62, s36
; GCN-NEXT: s_mov_b32 s64, s36
; GCN-NEXT: s_mov_b32 s66, s36
; GCN-NEXT: v_mov_b32_e32 v0, s36
; GCN-NEXT: v_mov_b32_e32 v1, s37
; GCN-NEXT: v_mov_b32_e32 v31, s67
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_lshl_b32 m0, s2, 1
; GCN-NEXT: v_mov_b32_e32 v2, s38
; GCN-NEXT: v_mov_b32_e32 v3, s39
; GCN-NEXT: v_mov_b32_e32 v4, s40
; GCN-NEXT: v_mov_b32_e32 v5, s41
; GCN-NEXT: v_mov_b32_e32 v6, s42
; GCN-NEXT: v_mov_b32_e32 v7, s43
; GCN-NEXT: v_mov_b32_e32 v8, s44
; GCN-NEXT: v_mov_b32_e32 v9, s45
; GCN-NEXT: v_mov_b32_e32 v10, s46
; GCN-NEXT: v_mov_b32_e32 v11, s47
; GCN-NEXT: v_mov_b32_e32 v12, s48
; GCN-NEXT: v_mov_b32_e32 v13, s49
; GCN-NEXT: v_mov_b32_e32 v14, s50
; GCN-NEXT: v_mov_b32_e32 v15, s51
; GCN-NEXT: v_mov_b32_e32 v16, s52
; GCN-NEXT: v_mov_b32_e32 v17, s53
; GCN-NEXT: v_mov_b32_e32 v18, s54
; GCN-NEXT: v_mov_b32_e32 v19, s55
; GCN-NEXT: v_mov_b32_e32 v20, s56
; GCN-NEXT: v_mov_b32_e32 v21, s57
; GCN-NEXT: v_mov_b32_e32 v22, s58
; GCN-NEXT: v_mov_b32_e32 v23, s59
; GCN-NEXT: v_mov_b32_e32 v24, s60
; GCN-NEXT: v_mov_b32_e32 v25, s61
; GCN-NEXT: v_mov_b32_e32 v26, s62
; GCN-NEXT: v_mov_b32_e32 v27, s63
; GCN-NEXT: v_mov_b32_e32 v28, s64
; GCN-NEXT: v_mov_b32_e32 v29, s65
; GCN-NEXT: v_mov_b32_e32 v30, s66
; GCN-NEXT: v_movrels_b32_e32 v32, v1
; GCN-NEXT: v_movrels_b32_e32 v31, v0
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: flat_store_dwordx2 v[0:1], v[31:32]
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: double16_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s4, 0
; GCN-O0-NEXT: s_mov_b32 s5, 0x40300000
; GCN-O0-NEXT: s_mov_b32 s3, s5
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 killed $sgpr4_sgpr5
; GCN-O0-NEXT: s_mov_b32 s6, 0
; GCN-O0-NEXT: s_mov_b32 s7, 0x402e0000
; GCN-O0-NEXT: s_mov_b32 s5, s7
; GCN-O0-NEXT: ; kill: def $sgpr6 killed $sgpr6 killed $sgpr6_sgpr7
; GCN-O0-NEXT: s_mov_b32 s8, 0
; GCN-O0-NEXT: s_mov_b32 s9, 0x402c0000
; GCN-O0-NEXT: s_mov_b32 s7, s9
; GCN-O0-NEXT: ; kill: def $sgpr8 killed $sgpr8 killed $sgpr8_sgpr9
; GCN-O0-NEXT: s_mov_b32 s10, 0
; GCN-O0-NEXT: s_mov_b32 s11, 0x402a0000
; GCN-O0-NEXT: s_mov_b32 s9, s11
; GCN-O0-NEXT: ; kill: def $sgpr10 killed $sgpr10 killed $sgpr10_sgpr11
; GCN-O0-NEXT: s_mov_b32 s12, 0
; GCN-O0-NEXT: s_mov_b32 s13, 0x40280000
; GCN-O0-NEXT: s_mov_b32 s11, s13
; GCN-O0-NEXT: ; kill: def $sgpr12 killed $sgpr12 killed $sgpr12_sgpr13
; GCN-O0-NEXT: s_mov_b32 s14, 0
; GCN-O0-NEXT: s_mov_b32 s15, 0x40260000
; GCN-O0-NEXT: s_mov_b32 s13, s15
; GCN-O0-NEXT: ; kill: def $sgpr14 killed $sgpr14 killed $sgpr14_sgpr15
; GCN-O0-NEXT: s_mov_b32 s16, 0
; GCN-O0-NEXT: s_mov_b32 s17, 0x40240000
; GCN-O0-NEXT: s_mov_b32 s15, s17
; GCN-O0-NEXT: ; kill: def $sgpr16 killed $sgpr16 killed $sgpr16_sgpr17
; GCN-O0-NEXT: s_mov_b32 s18, 0
; GCN-O0-NEXT: s_mov_b32 s19, 0x40220000
; GCN-O0-NEXT: s_mov_b32 s17, s19
; GCN-O0-NEXT: ; kill: def $sgpr18 killed $sgpr18 killed $sgpr18_sgpr19
; GCN-O0-NEXT: s_mov_b32 s20, 0
; GCN-O0-NEXT: s_mov_b32 s21, 0x40200000
; GCN-O0-NEXT: s_mov_b32 s19, s21
; GCN-O0-NEXT: ; kill: def $sgpr20 killed $sgpr20 killed $sgpr20_sgpr21
; GCN-O0-NEXT: s_mov_b32 s22, 0
; GCN-O0-NEXT: s_mov_b32 s23, 0x401c0000
; GCN-O0-NEXT: s_mov_b32 s21, s23
; GCN-O0-NEXT: ; kill: def $sgpr22 killed $sgpr22 killed $sgpr22_sgpr23
; GCN-O0-NEXT: s_mov_b32 s24, 0
; GCN-O0-NEXT: s_mov_b32 s25, 0x40180000
; GCN-O0-NEXT: s_mov_b32 s23, s25
; GCN-O0-NEXT: ; kill: def $sgpr24 killed $sgpr24 killed $sgpr24_sgpr25
; GCN-O0-NEXT: s_mov_b32 s26, 0
; GCN-O0-NEXT: s_mov_b32 s27, 0x40140000
; GCN-O0-NEXT: s_mov_b32 s25, s27
; GCN-O0-NEXT: ; kill: def $sgpr26 killed $sgpr26 killed $sgpr26_sgpr27
; GCN-O0-NEXT: s_mov_b64 s[28:29], 4.0
; GCN-O0-NEXT: s_mov_b32 s27, s29
; GCN-O0-NEXT: ; kill: def $sgpr28 killed $sgpr28 killed $sgpr28_sgpr29
; GCN-O0-NEXT: s_mov_b32 s30, 0
; GCN-O0-NEXT: s_mov_b32 s31, 0x40080000
; GCN-O0-NEXT: s_mov_b32 s29, s31
; GCN-O0-NEXT: ; kill: def $sgpr30 killed $sgpr30 killed $sgpr30_sgpr31
; GCN-O0-NEXT: s_mov_b64 s[34:35], 2.0
; GCN-O0-NEXT: s_mov_b32 s31, s35
; GCN-O0-NEXT: s_mov_b32 s33, s34
; GCN-O0-NEXT: s_mov_b64 s[36:37], 1.0
; GCN-O0-NEXT: s_mov_b32 s34, s37
; GCN-O0-NEXT: ; kill: def $sgpr36 killed $sgpr36 killed $sgpr36_sgpr37
; GCN-O0-NEXT: ; kill: def $sgpr36 killed $sgpr36 def $sgpr36_sgpr37_sgpr38_sgpr39_sgpr40_sgpr41_sgpr42_sgpr43_sgpr44_sgpr45_sgpr46_sgpr47_sgpr48_sgpr49_sgpr50_sgpr51_sgpr52_sgpr53_sgpr54_sgpr55_sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67
; GCN-O0-NEXT: s_mov_b32 s37, s34
; GCN-O0-NEXT: s_mov_b32 s38, s33
; GCN-O0-NEXT: s_mov_b32 s39, s31
; GCN-O0-NEXT: s_mov_b32 s40, s30
; GCN-O0-NEXT: s_mov_b32 s41, s29
; GCN-O0-NEXT: s_mov_b32 s42, s28
; GCN-O0-NEXT: s_mov_b32 s43, s27
; GCN-O0-NEXT: s_mov_b32 s44, s26
; GCN-O0-NEXT: s_mov_b32 s45, s25
; GCN-O0-NEXT: s_mov_b32 s46, s24
; GCN-O0-NEXT: s_mov_b32 s47, s23
; GCN-O0-NEXT: s_mov_b32 s48, s22
; GCN-O0-NEXT: s_mov_b32 s49, s21
; GCN-O0-NEXT: s_mov_b32 s50, s20
; GCN-O0-NEXT: s_mov_b32 s51, s19
; GCN-O0-NEXT: s_mov_b32 s52, s18
; GCN-O0-NEXT: s_mov_b32 s53, s17
; GCN-O0-NEXT: s_mov_b32 s54, s16
; GCN-O0-NEXT: s_mov_b32 s55, s15
; GCN-O0-NEXT: s_mov_b32 s56, s14
; GCN-O0-NEXT: s_mov_b32 s57, s13
; GCN-O0-NEXT: s_mov_b32 s58, s12
; GCN-O0-NEXT: s_mov_b32 s59, s11
; GCN-O0-NEXT: s_mov_b32 s60, s10
; GCN-O0-NEXT: s_mov_b32 s61, s9
; GCN-O0-NEXT: s_mov_b32 s62, s8
; GCN-O0-NEXT: s_mov_b32 s63, s7
; GCN-O0-NEXT: s_mov_b32 s64, s6
; GCN-O0-NEXT: s_mov_b32 s65, s5
; GCN-O0-NEXT: s_mov_b32 s66, s4
; GCN-O0-NEXT: s_mov_b32 s67, s3
; GCN-O0-NEXT: s_mov_b32 s3, 1
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_lshl_b32 s2, s2, s3
; GCN-O0-NEXT: v_mov_b32_e32 v0, s36
; GCN-O0-NEXT: v_mov_b32_e32 v1, s37
; GCN-O0-NEXT: v_mov_b32_e32 v2, s38
; GCN-O0-NEXT: v_mov_b32_e32 v3, s39
; GCN-O0-NEXT: v_mov_b32_e32 v4, s40
; GCN-O0-NEXT: v_mov_b32_e32 v5, s41
; GCN-O0-NEXT: v_mov_b32_e32 v6, s42
; GCN-O0-NEXT: v_mov_b32_e32 v7, s43
; GCN-O0-NEXT: v_mov_b32_e32 v8, s44
; GCN-O0-NEXT: v_mov_b32_e32 v9, s45
; GCN-O0-NEXT: v_mov_b32_e32 v10, s46
; GCN-O0-NEXT: v_mov_b32_e32 v11, s47
; GCN-O0-NEXT: v_mov_b32_e32 v12, s48
; GCN-O0-NEXT: v_mov_b32_e32 v13, s49
; GCN-O0-NEXT: v_mov_b32_e32 v14, s50
; GCN-O0-NEXT: v_mov_b32_e32 v15, s51
; GCN-O0-NEXT: v_mov_b32_e32 v16, s52
; GCN-O0-NEXT: v_mov_b32_e32 v17, s53
; GCN-O0-NEXT: v_mov_b32_e32 v18, s54
; GCN-O0-NEXT: v_mov_b32_e32 v19, s55
; GCN-O0-NEXT: v_mov_b32_e32 v20, s56
; GCN-O0-NEXT: v_mov_b32_e32 v21, s57
; GCN-O0-NEXT: v_mov_b32_e32 v22, s58
; GCN-O0-NEXT: v_mov_b32_e32 v23, s59
; GCN-O0-NEXT: v_mov_b32_e32 v24, s60
; GCN-O0-NEXT: v_mov_b32_e32 v25, s61
; GCN-O0-NEXT: v_mov_b32_e32 v26, s62
; GCN-O0-NEXT: v_mov_b32_e32 v27, s63
; GCN-O0-NEXT: v_mov_b32_e32 v28, s64
; GCN-O0-NEXT: v_mov_b32_e32 v29, s65
; GCN-O0-NEXT: v_mov_b32_e32 v30, s66
; GCN-O0-NEXT: v_mov_b32_e32 v31, s67
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v1
; GCN-O0-NEXT: v_mov_b32_e32 v1, s36
; GCN-O0-NEXT: v_mov_b32_e32 v2, s37
; GCN-O0-NEXT: v_mov_b32_e32 v3, s38
; GCN-O0-NEXT: v_mov_b32_e32 v4, s39
; GCN-O0-NEXT: v_mov_b32_e32 v5, s40
; GCN-O0-NEXT: v_mov_b32_e32 v6, s41
; GCN-O0-NEXT: v_mov_b32_e32 v7, s42
; GCN-O0-NEXT: v_mov_b32_e32 v8, s43
; GCN-O0-NEXT: v_mov_b32_e32 v9, s44
; GCN-O0-NEXT: v_mov_b32_e32 v10, s45
; GCN-O0-NEXT: v_mov_b32_e32 v11, s46
; GCN-O0-NEXT: v_mov_b32_e32 v12, s47
; GCN-O0-NEXT: v_mov_b32_e32 v13, s48
; GCN-O0-NEXT: v_mov_b32_e32 v14, s49
; GCN-O0-NEXT: v_mov_b32_e32 v15, s50
; GCN-O0-NEXT: v_mov_b32_e32 v16, s51
; GCN-O0-NEXT: v_mov_b32_e32 v17, s52
; GCN-O0-NEXT: v_mov_b32_e32 v18, s53
; GCN-O0-NEXT: v_mov_b32_e32 v19, s54
; GCN-O0-NEXT: v_mov_b32_e32 v20, s55
; GCN-O0-NEXT: v_mov_b32_e32 v21, s56
; GCN-O0-NEXT: v_mov_b32_e32 v22, s57
; GCN-O0-NEXT: v_mov_b32_e32 v23, s58
; GCN-O0-NEXT: v_mov_b32_e32 v24, s59
; GCN-O0-NEXT: v_mov_b32_e32 v25, s60
; GCN-O0-NEXT: v_mov_b32_e32 v26, s61
; GCN-O0-NEXT: v_mov_b32_e32 v27, s62
; GCN-O0-NEXT: v_mov_b32_e32 v28, s63
; GCN-O0-NEXT: v_mov_b32_e32 v29, s64
; GCN-O0-NEXT: v_mov_b32_e32 v30, s65
; GCN-O0-NEXT: v_mov_b32_e32 v31, s66
; GCN-O0-NEXT: v_mov_b32_e32 v32, s67
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v2, v1
; GCN-O0-NEXT: ; kill: def $vgpr2 killed $vgpr2 def $vgpr2_vgpr3 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v3, v0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dwordx2 v[0:1], v[2:3]
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <16 x double> <double 1.0, double 2.0, double 3.0, double 4.0, double 5.0, double 6.0, double 7.0, double 8.0, double 9.0, double 10.0, double 11.0, double 12.0, double 13.0, double 14.0, double 15.0, double 16.0>, i32 %sel
store double %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @float32_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: float32_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: v_mov_b32_e32 v0, 1.0
; GCN-NEXT: v_mov_b32_e32 v1, 2.0
; GCN-NEXT: v_mov_b32_e32 v2, 0x40400000
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_mov_b32 m0, s2
; GCN-NEXT: v_mov_b32_e32 v3, 4.0
; GCN-NEXT: v_mov_b32_e32 v4, 0x40a00000
; GCN-NEXT: v_mov_b32_e32 v5, 0x40c00000
; GCN-NEXT: v_mov_b32_e32 v6, 0x40e00000
; GCN-NEXT: v_mov_b32_e32 v7, 0x41000000
; GCN-NEXT: v_mov_b32_e32 v8, 0x41100000
; GCN-NEXT: v_mov_b32_e32 v9, 0x41200000
; GCN-NEXT: v_mov_b32_e32 v10, 0x41300000
; GCN-NEXT: v_mov_b32_e32 v11, 0x41400000
; GCN-NEXT: v_mov_b32_e32 v12, 0x41500000
; GCN-NEXT: v_mov_b32_e32 v13, 0x41600000
; GCN-NEXT: v_mov_b32_e32 v14, 0x41700000
; GCN-NEXT: v_mov_b32_e32 v15, 0x41800000
; GCN-NEXT: v_mov_b32_e32 v16, 0x41880000
; GCN-NEXT: v_mov_b32_e32 v17, 0x41900000
; GCN-NEXT: v_mov_b32_e32 v18, 0x41980000
; GCN-NEXT: v_mov_b32_e32 v19, 0x41a00000
; GCN-NEXT: v_mov_b32_e32 v20, 0x41a80000
; GCN-NEXT: v_mov_b32_e32 v21, 0x41b00000
; GCN-NEXT: v_mov_b32_e32 v22, 0x41b80000
; GCN-NEXT: v_mov_b32_e32 v23, 0x41c00000
; GCN-NEXT: v_mov_b32_e32 v24, 0x41c80000
; GCN-NEXT: v_mov_b32_e32 v25, 0x41d00000
; GCN-NEXT: v_mov_b32_e32 v26, 0x41d80000
; GCN-NEXT: v_mov_b32_e32 v27, 0x41e00000
; GCN-NEXT: v_mov_b32_e32 v28, 0x41e80000
; GCN-NEXT: v_mov_b32_e32 v29, 0x41f00000
; GCN-NEXT: v_mov_b32_e32 v30, 0x41f80000
; GCN-NEXT: v_mov_b32_e32 v31, 0x42000000
; GCN-NEXT: v_movrels_b32_e32 v2, v0
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: flat_store_dword v[0:1], v2
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: float32_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s3, 0x42000000
; GCN-O0-NEXT: s_mov_b32 s4, 0x41f80000
; GCN-O0-NEXT: s_mov_b32 s5, 0x41f00000
; GCN-O0-NEXT: s_mov_b32 s6, 0x41e80000
; GCN-O0-NEXT: s_mov_b32 s7, 0x41e00000
; GCN-O0-NEXT: s_mov_b32 s8, 0x41d80000
; GCN-O0-NEXT: s_mov_b32 s9, 0x41d00000
; GCN-O0-NEXT: s_mov_b32 s10, 0x41c80000
; GCN-O0-NEXT: s_mov_b32 s11, 0x41c00000
; GCN-O0-NEXT: s_mov_b32 s12, 0x41b80000
; GCN-O0-NEXT: s_mov_b32 s13, 0x41b00000
; GCN-O0-NEXT: s_mov_b32 s14, 0x41a80000
; GCN-O0-NEXT: s_mov_b32 s15, 0x41a00000
; GCN-O0-NEXT: s_mov_b32 s16, 0x41980000
; GCN-O0-NEXT: s_mov_b32 s17, 0x41900000
; GCN-O0-NEXT: s_mov_b32 s18, 0x41880000
; GCN-O0-NEXT: s_mov_b32 s19, 0x41800000
; GCN-O0-NEXT: s_mov_b32 s20, 0x41700000
; GCN-O0-NEXT: s_mov_b32 s21, 0x41600000
; GCN-O0-NEXT: s_mov_b32 s22, 0x41500000
; GCN-O0-NEXT: s_mov_b32 s23, 0x41400000
; GCN-O0-NEXT: s_mov_b32 s24, 0x41300000
; GCN-O0-NEXT: s_mov_b32 s25, 0x41200000
; GCN-O0-NEXT: s_mov_b32 s26, 0x41100000
; GCN-O0-NEXT: s_mov_b32 s27, 0x41000000
; GCN-O0-NEXT: s_mov_b32 s28, 0x40e00000
; GCN-O0-NEXT: s_mov_b32 s29, 0x40c00000
; GCN-O0-NEXT: s_mov_b32 s30, 0x40a00000
; GCN-O0-NEXT: s_mov_b32 s31, 4.0
; GCN-O0-NEXT: s_mov_b32 s33, 0x40400000
; GCN-O0-NEXT: s_mov_b32 s34, 2.0
; GCN-O0-NEXT: s_mov_b32 s35, 1.0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s35
; GCN-O0-NEXT: v_mov_b32_e32 v62, s34
; GCN-O0-NEXT: v_mov_b32_e32 v61, s33
; GCN-O0-NEXT: v_mov_b32_e32 v60, s31
; GCN-O0-NEXT: v_mov_b32_e32 v59, s30
; GCN-O0-NEXT: v_mov_b32_e32 v58, s29
; GCN-O0-NEXT: v_mov_b32_e32 v57, s28
; GCN-O0-NEXT: v_mov_b32_e32 v56, s27
; GCN-O0-NEXT: v_mov_b32_e32 v55, s26
; GCN-O0-NEXT: v_mov_b32_e32 v54, s25
; GCN-O0-NEXT: v_mov_b32_e32 v53, s24
; GCN-O0-NEXT: v_mov_b32_e32 v52, s23
; GCN-O0-NEXT: v_mov_b32_e32 v51, s22
; GCN-O0-NEXT: v_mov_b32_e32 v50, s21
; GCN-O0-NEXT: v_mov_b32_e32 v49, s20
; GCN-O0-NEXT: v_mov_b32_e32 v48, s19
; GCN-O0-NEXT: v_mov_b32_e32 v47, s18
; GCN-O0-NEXT: v_mov_b32_e32 v46, s17
; GCN-O0-NEXT: v_mov_b32_e32 v45, s16
; GCN-O0-NEXT: v_mov_b32_e32 v44, s15
; GCN-O0-NEXT: v_mov_b32_e32 v43, s14
; GCN-O0-NEXT: v_mov_b32_e32 v42, s13
; GCN-O0-NEXT: v_mov_b32_e32 v41, s12
; GCN-O0-NEXT: v_mov_b32_e32 v40, s11
; GCN-O0-NEXT: v_mov_b32_e32 v39, s10
; GCN-O0-NEXT: v_mov_b32_e32 v38, s9
; GCN-O0-NEXT: v_mov_b32_e32 v37, s8
; GCN-O0-NEXT: v_mov_b32_e32 v36, s7
; GCN-O0-NEXT: v_mov_b32_e32 v35, s6
; GCN-O0-NEXT: v_mov_b32_e32 v34, s5
; GCN-O0-NEXT: v_mov_b32_e32 v33, s4
; GCN-O0-NEXT: v_mov_b32_e32 v32, s3
; GCN-O0-NEXT: ; kill: def $vgpr0 killed $vgpr0 def $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v1, v62
; GCN-O0-NEXT: v_mov_b32_e32 v2, v61
; GCN-O0-NEXT: v_mov_b32_e32 v3, v60
; GCN-O0-NEXT: v_mov_b32_e32 v4, v59
; GCN-O0-NEXT: v_mov_b32_e32 v5, v58
; GCN-O0-NEXT: v_mov_b32_e32 v6, v57
; GCN-O0-NEXT: v_mov_b32_e32 v7, v56
; GCN-O0-NEXT: v_mov_b32_e32 v8, v55
; GCN-O0-NEXT: v_mov_b32_e32 v9, v54
; GCN-O0-NEXT: v_mov_b32_e32 v10, v53
; GCN-O0-NEXT: v_mov_b32_e32 v11, v52
; GCN-O0-NEXT: v_mov_b32_e32 v12, v51
; GCN-O0-NEXT: v_mov_b32_e32 v13, v50
; GCN-O0-NEXT: v_mov_b32_e32 v14, v49
; GCN-O0-NEXT: v_mov_b32_e32 v15, v48
; GCN-O0-NEXT: v_mov_b32_e32 v16, v47
; GCN-O0-NEXT: v_mov_b32_e32 v17, v46
; GCN-O0-NEXT: v_mov_b32_e32 v18, v45
; GCN-O0-NEXT: v_mov_b32_e32 v19, v44
; GCN-O0-NEXT: v_mov_b32_e32 v20, v43
; GCN-O0-NEXT: v_mov_b32_e32 v21, v42
; GCN-O0-NEXT: v_mov_b32_e32 v22, v41
; GCN-O0-NEXT: v_mov_b32_e32 v23, v40
; GCN-O0-NEXT: v_mov_b32_e32 v24, v39
; GCN-O0-NEXT: v_mov_b32_e32 v25, v38
; GCN-O0-NEXT: v_mov_b32_e32 v26, v37
; GCN-O0-NEXT: v_mov_b32_e32 v27, v36
; GCN-O0-NEXT: v_mov_b32_e32 v28, v35
; GCN-O0-NEXT: v_mov_b32_e32 v29, v34
; GCN-O0-NEXT: v_mov_b32_e32 v30, v33
; GCN-O0-NEXT: v_mov_b32_e32 v31, v32
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 m0, s2
; GCN-O0-NEXT: v_movrels_b32_e32 v2, v0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dword v[0:1], v2
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <32 x float> <float 1.0, float 2.0, float 3.0, float 4.0, float 5.0, float 6.0, float 7.0, float 8.0, float 9.0, float 10.0, float 11.0, float 12.0, float 13.0, float 14.0, float 15.0, float 16.0, float 17.0, float 18.0, float 19.0, float 20.0, float 21.0, float 22.0, float 23.0, float 24.0, float 25.0, float 26.0, float 27.0, float 28.0, float 29.0, float 30.0, float 31.0, float 32.0>, i32 %sel
store float %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @byte8_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: byte8_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s6, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_mov_b32 s2, 0x4030201
; GCN-NEXT: s_mov_b32 s3, 0x8070605
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_lshl_b32 s4, s6, 3
; GCN-NEXT: s_lshr_b64 s[2:3], s[2:3], s4
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: v_mov_b32_e32 v2, s2
; GCN-NEXT: flat_store_byte v[0:1], v2
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: byte8_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s0, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s1, 3
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_lshl_b32 s4, s0, s1
; GCN-O0-NEXT: s_mov_b32 s5, 0x8070605
; GCN-O0-NEXT: s_mov_b32 s0, 0x4030201
; GCN-O0-NEXT: ; kill: def $sgpr0 killed $sgpr0 def $sgpr0_sgpr1
; GCN-O0-NEXT: s_mov_b32 s1, s5
; GCN-O0-NEXT: s_lshr_b64 s[0:1], s[0:1], s4
; GCN-O0-NEXT: ; kill: def $sgpr0 killed $sgpr0 killed $sgpr0_sgpr1
; GCN-O0-NEXT: v_mov_b32_e32 v0, s2
; GCN-O0-NEXT: v_mov_b32_e32 v1, s3
; GCN-O0-NEXT: v_mov_b32_e32 v2, s0
; GCN-O0-NEXT: flat_store_byte v[0:1], v2
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <8 x i8> <i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8>, i32 %sel
store i8 %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @byte16_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: byte16_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s2, 1
; GCN-NEXT: s_cselect_b32 s3, 2, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 2
; GCN-NEXT: s_cselect_b32 s3, s3, 3
; GCN-NEXT: s_cmp_lg_u32 s2, 3
; GCN-NEXT: s_cselect_b32 s3, s3, 4
; GCN-NEXT: s_cmp_lg_u32 s2, 4
; GCN-NEXT: s_cselect_b32 s3, s3, 5
; GCN-NEXT: s_cmp_lg_u32 s2, 5
; GCN-NEXT: s_cselect_b32 s3, s3, 6
; GCN-NEXT: s_cmp_lg_u32 s2, 6
; GCN-NEXT: s_cselect_b32 s3, s3, 7
; GCN-NEXT: s_cmp_lg_u32 s2, 7
; GCN-NEXT: s_cselect_b32 s3, s3, 8
; GCN-NEXT: s_cmp_lg_u32 s2, 8
; GCN-NEXT: s_cselect_b32 s3, s3, 9
; GCN-NEXT: s_cmp_lg_u32 s2, 9
; GCN-NEXT: s_cselect_b32 s3, s3, 10
; GCN-NEXT: s_cmp_lg_u32 s2, 10
; GCN-NEXT: s_cselect_b32 s3, s3, 11
; GCN-NEXT: s_cmp_lg_u32 s2, 11
; GCN-NEXT: s_cselect_b32 s3, s3, 12
; GCN-NEXT: s_cmp_lg_u32 s2, 12
; GCN-NEXT: s_cselect_b32 s3, s3, 13
; GCN-NEXT: s_cmp_lg_u32 s2, 13
; GCN-NEXT: s_cselect_b32 s3, s3, 14
; GCN-NEXT: s_cmp_lg_u32 s2, 14
; GCN-NEXT: s_cselect_b32 s3, s3, 15
; GCN-NEXT: s_cmp_lg_u32 s2, 15
; GCN-NEXT: s_cselect_b32 s2, s3, 16
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: v_mov_b32_e32 v2, s2
; GCN-NEXT: flat_store_byte v[0:1], v2
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: byte16_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_mov_b32 s12, SCRATCH_RSRC_DWORD0
; GCN-O0-NEXT: s_mov_b32 s13, SCRATCH_RSRC_DWORD1
; GCN-O0-NEXT: s_mov_b32 s14, -1
; GCN-O0-NEXT: s_mov_b32 s15, 0xe80000
; GCN-O0-NEXT: s_add_u32 s12, s12, s11
; GCN-O0-NEXT: s_addc_u32 s13, s13, 0
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s3, 15
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_and_b32 s3, s2, s3
; GCN-O0-NEXT: s_mov_b32 s2, 0
; GCN-O0-NEXT: s_or_b32 s2, s2, s3
; GCN-O0-NEXT: v_mov_b32_e32 v0, 16
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:15
; GCN-O0-NEXT: v_mov_b32_e32 v0, 15
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:14
; GCN-O0-NEXT: v_mov_b32_e32 v0, 14
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:13
; GCN-O0-NEXT: v_mov_b32_e32 v0, 13
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:12
; GCN-O0-NEXT: v_mov_b32_e32 v0, 12
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:11
; GCN-O0-NEXT: v_mov_b32_e32 v0, 11
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:10
; GCN-O0-NEXT: v_mov_b32_e32 v0, 10
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:9
; GCN-O0-NEXT: v_mov_b32_e32 v0, 9
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:8
; GCN-O0-NEXT: v_mov_b32_e32 v0, 8
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:7
; GCN-O0-NEXT: v_mov_b32_e32 v0, 7
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:6
; GCN-O0-NEXT: v_mov_b32_e32 v0, 6
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:5
; GCN-O0-NEXT: v_mov_b32_e32 v0, 5
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:4
; GCN-O0-NEXT: v_mov_b32_e32 v0, 4
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:3
; GCN-O0-NEXT: v_mov_b32_e32 v0, 3
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:2
; GCN-O0-NEXT: v_mov_b32_e32 v0, 2
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:1
; GCN-O0-NEXT: v_mov_b32_e32 v0, 1
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s2
; GCN-O0-NEXT: buffer_load_ubyte v2, v0, s[12:15], 0 offen
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: flat_store_byte v[0:1], v2
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <16 x i8> <i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15, i8 16>, i32 %sel
store i8 %ext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @bit4_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: bit4_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_lshl_b32 s2, s2, 3
; GCN-NEXT: s_lshr_b32 s2, 0x1000100, s2
; GCN-NEXT: s_and_b32 s2, s2, 1
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: v_mov_b32_e32 v2, s2
; GCN-NEXT: flat_store_dword v[0:1], v2
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: bit4_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_load_dwordx2 s[2:3], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s0, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s1, 3
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_lshl_b32 s1, s0, s1
; GCN-O0-NEXT: s_mov_b32 s0, 0x1000100
; GCN-O0-NEXT: s_lshr_b32 s0, s0, s1
; GCN-O0-NEXT: s_mov_b32 s1, 1
; GCN-O0-NEXT: s_and_b32 s0, s0, s1
; GCN-O0-NEXT: v_mov_b32_e32 v0, s2
; GCN-O0-NEXT: v_mov_b32_e32 v1, s3
; GCN-O0-NEXT: v_mov_b32_e32 v2, s0
; GCN-O0-NEXT: flat_store_dword v[0:1], v2
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <4 x i1> <i1 0, i1 1, i1 0, i1 1>, i32 %sel
%zext = zext i1 %ext to i32
store i32 %zext, ptr addrspace(1) %out
ret void
}
define amdgpu_kernel void @bit128_extelt(ptr addrspace(1) %out, i32 %sel) {
; GCN-LABEL: bit128_extelt:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-NEXT: s_waitcnt lgkmcnt(0)
; GCN-NEXT: s_cmp_lg_u32 s2, 1
; GCN-NEXT: s_cselect_b64 s[4:5], -1, 0
; GCN-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
; GCN-NEXT: s_cmp_lg_u32 s2, 2
; GCN-NEXT: v_readfirstlane_b32 s3, v0
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 3
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 4
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 5
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 6
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 7
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 8
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 9
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 10
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 11
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 12
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 13
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 14
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 15
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 16
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 17
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 18
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 19
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 20
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 21
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 22
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 23
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 24
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 25
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 26
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 27
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 28
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 29
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 30
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 31
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 32
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 33
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 34
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 35
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 36
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 37
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 38
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 39
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 40
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 41
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 42
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 43
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 44
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 45
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 46
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 47
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 48
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 49
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 50
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 51
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 52
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 53
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 54
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 55
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 56
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 57
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 58
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 59
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 60
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 61
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 62
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmp_lg_u32 s2, 63
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmp_lg_u32 s2, 64
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x41
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x42
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x43
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x44
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x45
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x46
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x47
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x48
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x49
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x4a
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x4b
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x4c
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x4d
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x4e
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x4f
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x50
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x51
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x52
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x53
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x54
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x55
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x56
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x57
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x58
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x59
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x5a
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x5b
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x5c
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x5d
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x5e
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x5f
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x60
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x61
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x62
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x63
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x64
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x65
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x66
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x67
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x68
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x69
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x6a
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x6b
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x6c
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x6d
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x6e
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x6f
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x70
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x71
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x72
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x73
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x74
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x75
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x76
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x77
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x78
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x79
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x7a
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x7b
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x7c
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x7d
; GCN-NEXT: s_cselect_b32 s3, s3, 0
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x7e
; GCN-NEXT: s_cselect_b32 s3, s3, 1
; GCN-NEXT: s_cmpk_lg_i32 s2, 0x7f
; GCN-NEXT: s_cselect_b32 s2, s3, 0
; GCN-NEXT: s_and_b32 s2, s2, 1
; GCN-NEXT: v_mov_b32_e32 v0, s0
; GCN-NEXT: v_mov_b32_e32 v1, s1
; GCN-NEXT: v_mov_b32_e32 v2, s2
; GCN-NEXT: flat_store_dword v[0:1], v2
; GCN-NEXT: s_endpgm
;
; GCN-O0-LABEL: bit128_extelt:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_mov_b32 s12, SCRATCH_RSRC_DWORD0
; GCN-O0-NEXT: s_mov_b32 s13, SCRATCH_RSRC_DWORD1
; GCN-O0-NEXT: s_mov_b32 s14, -1
; GCN-O0-NEXT: s_mov_b32 s15, 0xe80000
; GCN-O0-NEXT: s_add_u32 s12, s12, s11
; GCN-O0-NEXT: s_addc_u32 s13, s13, 0
; GCN-O0-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GCN-O0-NEXT: s_load_dword s2, s[4:5], 0x2c
; GCN-O0-NEXT: s_mov_b32 s3, 0x7f
; GCN-O0-NEXT: s_waitcnt lgkmcnt(0)
; GCN-O0-NEXT: s_and_b32 s3, s2, s3
; GCN-O0-NEXT: s_mov_b32 s2, 0
; GCN-O0-NEXT: s_add_i32 s2, s2, s3
; GCN-O0-NEXT: v_mov_b32_e32 v1, 0
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:127
; GCN-O0-NEXT: v_mov_b32_e32 v0, 1
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:126
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:125
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:124
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:123
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:122
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:121
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:120
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:119
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:118
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:117
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:116
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:115
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:114
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:113
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:112
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:111
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:110
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:109
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:108
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:107
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:106
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:105
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:104
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:103
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:102
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:101
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:100
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:99
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:98
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:97
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:96
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:95
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:94
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:93
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:92
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:91
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:90
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:89
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:88
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:87
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:86
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:85
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:84
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:83
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:82
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:81
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:80
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:79
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:78
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:77
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:76
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:75
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:74
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:73
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:72
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:71
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:70
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:69
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:68
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:67
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:66
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:65
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:64
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:63
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:62
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:61
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:60
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:59
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:58
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:57
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:56
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:55
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:54
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:53
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:52
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:51
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:50
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:49
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:48
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:47
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:46
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:45
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:44
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:43
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:42
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:41
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:40
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:39
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:38
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:37
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:36
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:35
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:34
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:33
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:32
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:31
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:30
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:29
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:28
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:27
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:26
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:25
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:24
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:23
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:22
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:21
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:20
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:19
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:18
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:17
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:16
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:15
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:14
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:13
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:12
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:11
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:10
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:9
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:8
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:7
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:6
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:5
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:4
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:3
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0 offset:2
; GCN-O0-NEXT: buffer_store_byte v1, off, s[12:15], 0 offset:1
; GCN-O0-NEXT: buffer_store_byte v0, off, s[12:15], 0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s2
; GCN-O0-NEXT: buffer_load_ubyte v0, v0, s[12:15], 0 offen
; GCN-O0-NEXT: s_mov_b32 s2, 1
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_and_b32_e64 v2, v0, s2
; GCN-O0-NEXT: v_mov_b32_e32 v0, s0
; GCN-O0-NEXT: v_mov_b32_e32 v1, s1
; GCN-O0-NEXT: flat_store_dword v[0:1], v2
; GCN-O0-NEXT: s_endpgm
entry:
%ext = extractelement <128 x i1> <i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0>, i32 %sel
%zext = zext i1 %ext to i32
store i32 %zext, ptr addrspace(1) %out
ret void
}
define float @float32_extelt_vec(i32 %sel) {
; GCN-LABEL: float32_extelt_vec:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
; GCN-NEXT: v_cndmask_b32_e64 v1, 1.0, 2.0, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x40400000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 2, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 3, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, 4.0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x40a00000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 4, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x40c00000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 5, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x40e00000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 6, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41000000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 7, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41100000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 8, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41200000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 9, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41300000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 10, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41400000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 11, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41500000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 12, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41600000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 13, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41700000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 14, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41800000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 15, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41880000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 16, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41900000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 17, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41980000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 18, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41a00000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 19, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41a80000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 20, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41b00000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 21, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41b80000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 22, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41c00000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 23, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41c80000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 24, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41d00000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 25, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41d80000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 26, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41e00000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 27, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41e80000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 28, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41f00000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 29, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x41f80000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 30, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v2, 0x42000000
; GCN-NEXT: v_cmp_ne_u32_e32 vcc, 31, v0
; GCN-NEXT: v_cndmask_b32_e32 v0, v2, v1, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: float32_extelt_vec:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_or_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_store_dword v63, off, s[0:3], s32 offset:204 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: buffer_store_dword v40, off, s[0:3], s32 offset:56 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v41, off, s[0:3], s32 offset:52 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v42, off, s[0:3], s32 offset:48 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v43, off, s[0:3], s32 offset:44 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v44, off, s[0:3], s32 offset:40 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v45, off, s[0:3], s32 offset:36 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v46, off, s[0:3], s32 offset:32 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v47, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v56, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v57, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v58, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v59, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v60, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v61, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v62, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:192 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b32 s4, 0x42000000
; GCN-O0-NEXT: s_mov_b32 s5, 0x41f80000
; GCN-O0-NEXT: s_mov_b32 s6, 0x41f00000
; GCN-O0-NEXT: s_mov_b32 s7, 0x41e80000
; GCN-O0-NEXT: s_mov_b32 s8, 0x41e00000
; GCN-O0-NEXT: s_mov_b32 s9, 0x41d80000
; GCN-O0-NEXT: s_mov_b32 s10, 0x41d00000
; GCN-O0-NEXT: s_mov_b32 s11, 0x41c80000
; GCN-O0-NEXT: s_mov_b32 s12, 0x41c00000
; GCN-O0-NEXT: s_mov_b32 s13, 0x41b80000
; GCN-O0-NEXT: s_mov_b32 s14, 0x41b00000
; GCN-O0-NEXT: s_mov_b32 s15, 0x41a80000
; GCN-O0-NEXT: s_mov_b32 s16, 0x41a00000
; GCN-O0-NEXT: s_mov_b32 s17, 0x41980000
; GCN-O0-NEXT: s_mov_b32 s18, 0x41900000
; GCN-O0-NEXT: s_mov_b32 s19, 0x41880000
; GCN-O0-NEXT: s_mov_b32 s20, 0x41800000
; GCN-O0-NEXT: s_mov_b32 s21, 0x41700000
; GCN-O0-NEXT: s_mov_b32 s22, 0x41600000
; GCN-O0-NEXT: s_mov_b32 s23, 0x41500000
; GCN-O0-NEXT: s_mov_b32 s24, 0x41400000
; GCN-O0-NEXT: s_mov_b32 s25, 0x41300000
; GCN-O0-NEXT: s_mov_b32 s26, 0x41200000
; GCN-O0-NEXT: s_mov_b32 s27, 0x41100000
; GCN-O0-NEXT: s_mov_b32 s28, 0x41000000
; GCN-O0-NEXT: s_mov_b32 s29, 0x40e00000
; GCN-O0-NEXT: s_mov_b32 s40, 0x40c00000
; GCN-O0-NEXT: s_mov_b32 s41, 0x40a00000
; GCN-O0-NEXT: s_mov_b32 s42, 4.0
; GCN-O0-NEXT: s_mov_b32 s43, 0x40400000
; GCN-O0-NEXT: s_mov_b32 s44, 2.0
; GCN-O0-NEXT: s_mov_b32 s45, 1.0
; GCN-O0-NEXT: v_mov_b32_e32 v0, s45
; GCN-O0-NEXT: v_mov_b32_e32 v62, s44
; GCN-O0-NEXT: v_mov_b32_e32 v61, s43
; GCN-O0-NEXT: v_mov_b32_e32 v60, s42
; GCN-O0-NEXT: v_mov_b32_e32 v59, s41
; GCN-O0-NEXT: v_mov_b32_e32 v58, s40
; GCN-O0-NEXT: v_mov_b32_e32 v57, s29
; GCN-O0-NEXT: v_mov_b32_e32 v56, s28
; GCN-O0-NEXT: v_mov_b32_e32 v47, s27
; GCN-O0-NEXT: v_mov_b32_e32 v46, s26
; GCN-O0-NEXT: v_mov_b32_e32 v45, s25
; GCN-O0-NEXT: v_mov_b32_e32 v44, s24
; GCN-O0-NEXT: v_mov_b32_e32 v43, s23
; GCN-O0-NEXT: v_mov_b32_e32 v42, s22
; GCN-O0-NEXT: v_mov_b32_e32 v41, s21
; GCN-O0-NEXT: v_mov_b32_e32 v40, s20
; GCN-O0-NEXT: v_mov_b32_e32 v55, s19
; GCN-O0-NEXT: v_mov_b32_e32 v54, s18
; GCN-O0-NEXT: v_mov_b32_e32 v53, s17
; GCN-O0-NEXT: v_mov_b32_e32 v52, s16
; GCN-O0-NEXT: v_mov_b32_e32 v51, s15
; GCN-O0-NEXT: v_mov_b32_e32 v50, s14
; GCN-O0-NEXT: v_mov_b32_e32 v49, s13
; GCN-O0-NEXT: v_mov_b32_e32 v48, s12
; GCN-O0-NEXT: v_mov_b32_e32 v39, s11
; GCN-O0-NEXT: v_mov_b32_e32 v38, s10
; GCN-O0-NEXT: v_mov_b32_e32 v37, s9
; GCN-O0-NEXT: v_mov_b32_e32 v36, s8
; GCN-O0-NEXT: v_mov_b32_e32 v35, s7
; GCN-O0-NEXT: v_mov_b32_e32 v34, s6
; GCN-O0-NEXT: v_mov_b32_e32 v33, s5
; GCN-O0-NEXT: v_mov_b32_e32 v32, s4
; GCN-O0-NEXT: ; kill: def $vgpr0 killed $vgpr0 def $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31 killed $exec
; GCN-O0-NEXT: v_mov_b32_e32 v1, v62
; GCN-O0-NEXT: v_mov_b32_e32 v2, v61
; GCN-O0-NEXT: v_mov_b32_e32 v3, v60
; GCN-O0-NEXT: v_mov_b32_e32 v4, v59
; GCN-O0-NEXT: v_mov_b32_e32 v5, v58
; GCN-O0-NEXT: v_mov_b32_e32 v6, v57
; GCN-O0-NEXT: v_mov_b32_e32 v7, v56
; GCN-O0-NEXT: v_mov_b32_e32 v8, v47
; GCN-O0-NEXT: v_mov_b32_e32 v9, v46
; GCN-O0-NEXT: v_mov_b32_e32 v10, v45
; GCN-O0-NEXT: v_mov_b32_e32 v11, v44
; GCN-O0-NEXT: v_mov_b32_e32 v12, v43
; GCN-O0-NEXT: v_mov_b32_e32 v13, v42
; GCN-O0-NEXT: v_mov_b32_e32 v14, v41
; GCN-O0-NEXT: v_mov_b32_e32 v15, v40
; GCN-O0-NEXT: v_mov_b32_e32 v16, v55
; GCN-O0-NEXT: v_mov_b32_e32 v17, v54
; GCN-O0-NEXT: v_mov_b32_e32 v18, v53
; GCN-O0-NEXT: v_mov_b32_e32 v19, v52
; GCN-O0-NEXT: v_mov_b32_e32 v20, v51
; GCN-O0-NEXT: v_mov_b32_e32 v21, v50
; GCN-O0-NEXT: v_mov_b32_e32 v22, v49
; GCN-O0-NEXT: v_mov_b32_e32 v23, v48
; GCN-O0-NEXT: v_mov_b32_e32 v24, v39
; GCN-O0-NEXT: v_mov_b32_e32 v25, v38
; GCN-O0-NEXT: v_mov_b32_e32 v26, v37
; GCN-O0-NEXT: v_mov_b32_e32 v27, v36
; GCN-O0-NEXT: v_mov_b32_e32 v28, v35
; GCN-O0-NEXT: v_mov_b32_e32 v29, v34
; GCN-O0-NEXT: v_mov_b32_e32 v30, v33
; GCN-O0-NEXT: v_mov_b32_e32 v31, v32
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:64 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:68 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:72 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v3, off, s[0:3], s32 offset:76 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v4, off, s[0:3], s32 offset:80 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 offset:84 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v6, off, s[0:3], s32 offset:88 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v7, off, s[0:3], s32 offset:92 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v8, off, s[0:3], s32 offset:96 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v9, off, s[0:3], s32 offset:100 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v10, off, s[0:3], s32 offset:104 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v11, off, s[0:3], s32 offset:108 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v12, off, s[0:3], s32 offset:112 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v13, off, s[0:3], s32 offset:116 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v14, off, s[0:3], s32 offset:120 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v15, off, s[0:3], s32 offset:124 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v16, off, s[0:3], s32 offset:128 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v17, off, s[0:3], s32 offset:132 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v18, off, s[0:3], s32 offset:136 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v19, off, s[0:3], s32 offset:140 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v20, off, s[0:3], s32 offset:144 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v21, off, s[0:3], s32 offset:148 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v22, off, s[0:3], s32 offset:152 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v23, off, s[0:3], s32 offset:156 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v24, off, s[0:3], s32 offset:160 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v25, off, s[0:3], s32 offset:164 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v26, off, s[0:3], s32 offset:168 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v27, off, s[0:3], s32 offset:172 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v28, off, s[0:3], s32 offset:176 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v29, off, s[0:3], s32 offset:180 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v30, off, s[0:3], s32 offset:184 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v31, off, s[0:3], s32 offset:188 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[4:5], exec
; GCN-O0-NEXT: ; implicit-def: $vgpr63 : SGPR spill to VGPR lane
; GCN-O0-NEXT: v_writelane_b32 v63, s4, 0
; GCN-O0-NEXT: v_writelane_b32 v63, s5, 1
; GCN-O0-NEXT: s_or_saveexec_b64 s[46:47], -1
; GCN-O0-NEXT: buffer_store_dword v63, off, s[0:3], s32 offset:60 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[46:47]
; GCN-O0-NEXT: ; implicit-def: $vgpr0
; GCN-O0-NEXT: ; implicit-def: $sgpr4_sgpr5
; GCN-O0-NEXT: .LBB20_1: ; =>This Inner Loop Header: Depth=1
; GCN-O0-NEXT: s_or_saveexec_b64 s[46:47], -1
; GCN-O0-NEXT: buffer_load_dword v63, off, s[0:3], s32 offset:60 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[46:47]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v63, 2
; GCN-O0-NEXT: v_readlane_b32 s5, v63, 3
; GCN-O0-NEXT: buffer_load_dword v33, off, s[0:3], s32 offset:196 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:64 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:68 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:72 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:76 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:80 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 offset:84 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v6, off, s[0:3], s32 offset:88 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 offset:92 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v8, off, s[0:3], s32 offset:96 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v9, off, s[0:3], s32 offset:100 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v10, off, s[0:3], s32 offset:104 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v11, off, s[0:3], s32 offset:108 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v12, off, s[0:3], s32 offset:112 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v13, off, s[0:3], s32 offset:116 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v14, off, s[0:3], s32 offset:120 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v15, off, s[0:3], s32 offset:124 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v16, off, s[0:3], s32 offset:128 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v17, off, s[0:3], s32 offset:132 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v18, off, s[0:3], s32 offset:136 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v19, off, s[0:3], s32 offset:140 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v20, off, s[0:3], s32 offset:144 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v21, off, s[0:3], s32 offset:148 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v22, off, s[0:3], s32 offset:152 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v23, off, s[0:3], s32 offset:156 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v24, off, s[0:3], s32 offset:160 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v25, off, s[0:3], s32 offset:164 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v26, off, s[0:3], s32 offset:168 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v27, off, s[0:3], s32 offset:172 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v28, off, s[0:3], s32 offset:176 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v29, off, s[0:3], s32 offset:180 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v30, off, s[0:3], s32 offset:184 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v31, off, s[0:3], s32 offset:188 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v32, off, s[0:3], s32 offset:192 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readfirstlane_b32 s6, v32
; GCN-O0-NEXT: v_cmp_eq_u32_e64 s[4:5], s6, v32
; GCN-O0-NEXT: s_and_saveexec_b64 s[4:5], s[4:5]
; GCN-O0-NEXT: s_mov_b32 m0, s6
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:200 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:196 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[6:7], s[4:5]
; GCN-O0-NEXT: v_writelane_b32 v63, s6, 2
; GCN-O0-NEXT: v_writelane_b32 v63, s7, 3
; GCN-O0-NEXT: s_or_saveexec_b64 s[46:47], -1
; GCN-O0-NEXT: buffer_store_dword v63, off, s[0:3], s32 offset:60 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[46:47]
; GCN-O0-NEXT: s_xor_b64 exec, exec, s[4:5]
; GCN-O0-NEXT: s_cbranch_execnz .LBB20_1
; GCN-O0-NEXT: ; %bb.2:
; GCN-O0-NEXT: s_or_saveexec_b64 s[46:47], -1
; GCN-O0-NEXT: buffer_load_dword v63, off, s[0:3], s32 offset:60 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[46:47]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v63, 0
; GCN-O0-NEXT: v_readlane_b32 s5, v63, 1
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: ; %bb.3:
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:200 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v62, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v61, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v60, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v59, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v58, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v57, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v56, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v47, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v46, off, s[0:3], s32 offset:32 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v45, off, s[0:3], s32 offset:36 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v44, off, s[0:3], s32 offset:40 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v43, off, s[0:3], s32 offset:44 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v42, off, s[0:3], s32 offset:48 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v41, off, s[0:3], s32 offset:52 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v40, off, s[0:3], s32 offset:56 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_or_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_load_dword v63, off, s[0:3], s32 offset:204 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
entry:
%ext = extractelement <32 x float> <float 1.0, float 2.0, float 3.0, float 4.0, float 5.0, float 6.0, float 7.0, float 8.0, float 9.0, float 10.0, float 11.0, float 12.0, float 13.0, float 14.0, float 15.0, float 16.0, float 17.0, float 18.0, float 19.0, float 20.0, float 21.0, float 22.0, float 23.0, float 24.0, float 25.0, float 26.0, float 27.0, float 28.0, float 29.0, float 30.0, float 31.0, float 32.0>, i32 %sel
ret float %ext
}
define double @double16_extelt_vec(i32 %sel) {
; GCN-LABEL: double16_extelt_vec:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: v_mov_b32_e32 v3, 0x3ff19999
; GCN-NEXT: v_mov_b32_e32 v4, 0x4000cccc
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
; GCN-NEXT: v_cmp_eq_u32_e64 s[4:5], 2, v0
; GCN-NEXT: v_mov_b32_e32 v1, 0x9999999a
; GCN-NEXT: v_mov_b32_e32 v2, 0xcccccccd
; GCN-NEXT: v_cndmask_b32_e32 v3, v3, v4, vcc
; GCN-NEXT: v_mov_b32_e32 v4, 0x4008cccc
; GCN-NEXT: s_or_b64 vcc, s[4:5], vcc
; GCN-NEXT: v_cndmask_b32_e64 v3, v3, v4, s[4:5]
; GCN-NEXT: v_cndmask_b32_e32 v2, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v4, 0x40106666
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 3, v0
; GCN-NEXT: v_cndmask_b32_e32 v3, v3, v4, vcc
; GCN-NEXT: v_mov_b32_e32 v4, 0x40146666
; GCN-NEXT: v_cmp_eq_u32_e64 s[4:5], 4, v0
; GCN-NEXT: v_cndmask_b32_e64 v3, v3, v4, s[4:5]
; GCN-NEXT: s_or_b64 s[4:5], s[4:5], vcc
; GCN-NEXT: v_mov_b32_e32 v4, 0x40186666
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 5, v0
; GCN-NEXT: v_cndmask_b32_e32 v3, v3, v4, vcc
; GCN-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
; GCN-NEXT: v_mov_b32_e32 v5, 0x401c6666
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 6, v0
; GCN-NEXT: v_mov_b32_e32 v4, 0x66666666
; GCN-NEXT: v_cndmask_b32_e32 v3, v3, v5, vcc
; GCN-NEXT: s_or_b64 vcc, vcc, s[4:5]
; GCN-NEXT: v_cndmask_b32_e32 v2, v2, v4, vcc
; GCN-NEXT: v_mov_b32_e32 v4, 0x40203333
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 7, v0
; GCN-NEXT: v_cndmask_b32_e32 v3, v3, v4, vcc
; GCN-NEXT: v_mov_b32_e32 v4, 0x40223333
; GCN-NEXT: v_cmp_eq_u32_e64 s[4:5], 8, v0
; GCN-NEXT: v_cndmask_b32_e64 v3, v3, v4, s[4:5]
; GCN-NEXT: s_or_b64 s[4:5], s[4:5], vcc
; GCN-NEXT: v_mov_b32_e32 v4, 0x40243333
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 9, v0
; GCN-NEXT: v_cndmask_b32_e32 v3, v3, v4, vcc
; GCN-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
; GCN-NEXT: v_mov_b32_e32 v4, 0x40263333
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 10, v0
; GCN-NEXT: v_cndmask_b32_e32 v3, v3, v4, vcc
; GCN-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
; GCN-NEXT: v_mov_b32_e32 v4, 0x40283333
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 11, v0
; GCN-NEXT: v_cndmask_b32_e32 v3, v3, v4, vcc
; GCN-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
; GCN-NEXT: v_mov_b32_e32 v4, 0x402a3333
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 12, v0
; GCN-NEXT: v_cndmask_b32_e32 v3, v3, v4, vcc
; GCN-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
; GCN-NEXT: v_mov_b32_e32 v4, 0x402c3333
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 13, v0
; GCN-NEXT: v_cndmask_b32_e32 v3, v3, v4, vcc
; GCN-NEXT: s_or_b64 s[4:5], vcc, s[4:5]
; GCN-NEXT: v_mov_b32_e32 v5, 0x402e3333
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 14, v0
; GCN-NEXT: v_mov_b32_e32 v4, 0x33333333
; GCN-NEXT: v_cndmask_b32_e32 v3, v3, v5, vcc
; GCN-NEXT: s_or_b64 vcc, vcc, s[4:5]
; GCN-NEXT: v_cndmask_b32_e32 v2, v2, v4, vcc
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 15, v0
; GCN-NEXT: v_cndmask_b32_e32 v0, v2, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, 0x40301999
; GCN-NEXT: v_cndmask_b32_e32 v1, v3, v1, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: double16_extelt_vec:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_store_dword v34, off, s[0:3], s32 offset:280 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v35, off, s[0:3], s32 offset:284 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: v_writelane_b32 v34, s36, 0
; GCN-O0-NEXT: v_writelane_b32 v34, s37, 1
; GCN-O0-NEXT: v_writelane_b32 v34, s38, 2
; GCN-O0-NEXT: v_writelane_b32 v34, s39, 3
; GCN-O0-NEXT: v_writelane_b32 v34, s48, 4
; GCN-O0-NEXT: v_writelane_b32 v34, s49, 5
; GCN-O0-NEXT: v_writelane_b32 v34, s50, 6
; GCN-O0-NEXT: v_writelane_b32 v34, s51, 7
; GCN-O0-NEXT: v_writelane_b32 v34, s52, 8
; GCN-O0-NEXT: v_writelane_b32 v34, s53, 9
; GCN-O0-NEXT: v_writelane_b32 v34, s54, 10
; GCN-O0-NEXT: v_writelane_b32 v34, s55, 11
; GCN-O0-NEXT: v_writelane_b32 v34, s64, 12
; GCN-O0-NEXT: v_writelane_b32 v34, s65, 13
; GCN-O0-NEXT: v_writelane_b32 v34, s66, 14
; GCN-O0-NEXT: v_writelane_b32 v34, s67, 15
; GCN-O0-NEXT: s_mov_b32 s4, 0x40301999
; GCN-O0-NEXT: s_mov_b32 s40, 0x9999999a
; GCN-O0-NEXT: s_mov_b32 s6, s40
; GCN-O0-NEXT: s_mov_b32 s7, s4
; GCN-O0-NEXT: s_mov_b32 s4, s7
; GCN-O0-NEXT: s_mov_b32 s5, s6
; GCN-O0-NEXT: s_mov_b32 s6, 0x402e3333
; GCN-O0-NEXT: s_mov_b32 s22, 0x33333333
; GCN-O0-NEXT: ; implicit-def: $vgpr35 : SGPR spill to VGPR lane
; GCN-O0-NEXT: v_writelane_b32 v35, s22, 0
; GCN-O0-NEXT: s_mov_b32 s8, s22
; GCN-O0-NEXT: s_mov_b32 s9, s6
; GCN-O0-NEXT: s_mov_b32 s6, s9
; GCN-O0-NEXT: s_mov_b32 s7, s8
; GCN-O0-NEXT: s_mov_b32 s8, 0x402c3333
; GCN-O0-NEXT: s_mov_b32 s10, s22
; GCN-O0-NEXT: s_mov_b32 s11, s8
; GCN-O0-NEXT: s_mov_b32 s8, s11
; GCN-O0-NEXT: s_mov_b32 s9, s10
; GCN-O0-NEXT: s_mov_b32 s10, 0x402a3333
; GCN-O0-NEXT: s_mov_b32 s12, s22
; GCN-O0-NEXT: s_mov_b32 s13, s10
; GCN-O0-NEXT: s_mov_b32 s10, s13
; GCN-O0-NEXT: s_mov_b32 s11, s12
; GCN-O0-NEXT: s_mov_b32 s12, 0x40283333
; GCN-O0-NEXT: s_mov_b32 s14, s22
; GCN-O0-NEXT: s_mov_b32 s15, s12
; GCN-O0-NEXT: s_mov_b32 s12, s15
; GCN-O0-NEXT: s_mov_b32 s13, s14
; GCN-O0-NEXT: s_mov_b32 s14, 0x40263333
; GCN-O0-NEXT: s_mov_b32 s16, s22
; GCN-O0-NEXT: s_mov_b32 s17, s14
; GCN-O0-NEXT: s_mov_b32 s14, s17
; GCN-O0-NEXT: s_mov_b32 s15, s16
; GCN-O0-NEXT: s_mov_b32 s16, 0x40243333
; GCN-O0-NEXT: s_mov_b32 s18, s22
; GCN-O0-NEXT: s_mov_b32 s19, s16
; GCN-O0-NEXT: s_mov_b32 s16, s19
; GCN-O0-NEXT: s_mov_b32 s17, s18
; GCN-O0-NEXT: s_mov_b32 s18, 0x40223333
; GCN-O0-NEXT: s_mov_b32 s20, s22
; GCN-O0-NEXT: s_mov_b32 s21, s18
; GCN-O0-NEXT: s_mov_b32 s18, s21
; GCN-O0-NEXT: s_mov_b32 s19, s20
; GCN-O0-NEXT: s_mov_b32 s20, 0x40203333
; GCN-O0-NEXT: ; kill: def $sgpr22 killed $sgpr22 def $sgpr22_sgpr23
; GCN-O0-NEXT: s_mov_b32 s23, s20
; GCN-O0-NEXT: s_mov_b32 s20, s23
; GCN-O0-NEXT: s_mov_b32 s21, s22
; GCN-O0-NEXT: s_mov_b32 s22, 0x401c6666
; GCN-O0-NEXT: s_mov_b32 s42, 0x66666666
; GCN-O0-NEXT: s_mov_b32 s24, s42
; GCN-O0-NEXT: s_mov_b32 s25, s22
; GCN-O0-NEXT: s_mov_b32 s22, s25
; GCN-O0-NEXT: s_mov_b32 s23, s24
; GCN-O0-NEXT: s_mov_b32 s24, 0x40186666
; GCN-O0-NEXT: s_mov_b32 s26, s42
; GCN-O0-NEXT: s_mov_b32 s27, s24
; GCN-O0-NEXT: s_mov_b32 s24, s27
; GCN-O0-NEXT: s_mov_b32 s25, s26
; GCN-O0-NEXT: s_mov_b32 s26, 0x40146666
; GCN-O0-NEXT: s_mov_b32 s28, s42
; GCN-O0-NEXT: s_mov_b32 s29, s26
; GCN-O0-NEXT: s_mov_b32 s26, s29
; GCN-O0-NEXT: s_mov_b32 s27, s28
; GCN-O0-NEXT: s_mov_b32 s28, 0x40106666
; GCN-O0-NEXT: ; kill: def $sgpr42 killed $sgpr42 def $sgpr42_sgpr43
; GCN-O0-NEXT: s_mov_b32 s43, s28
; GCN-O0-NEXT: s_mov_b32 s28, s43
; GCN-O0-NEXT: s_mov_b32 s29, s42
; GCN-O0-NEXT: s_mov_b32 s41, 0x4008cccc
; GCN-O0-NEXT: s_mov_b32 s42, 0xcccccccd
; GCN-O0-NEXT: s_mov_b32 s44, s42
; GCN-O0-NEXT: s_mov_b32 s45, s41
; GCN-O0-NEXT: s_mov_b32 s72, s45
; GCN-O0-NEXT: s_mov_b32 s73, s44
; GCN-O0-NEXT: s_mov_b32 s41, 0x4000cccc
; GCN-O0-NEXT: ; kill: def $sgpr42 killed $sgpr42 def $sgpr42_sgpr43
; GCN-O0-NEXT: s_mov_b32 s43, s41
; GCN-O0-NEXT: s_mov_b32 s74, s43
; GCN-O0-NEXT: s_mov_b32 s75, s42
; GCN-O0-NEXT: s_mov_b32 s42, 0x3ff19999
; GCN-O0-NEXT: ; kill: def $sgpr40 killed $sgpr40 def $sgpr40_sgpr41
; GCN-O0-NEXT: s_mov_b32 s41, s42
; GCN-O0-NEXT: s_mov_b32 s76, s41
; GCN-O0-NEXT: s_mov_b32 s36, s40
; GCN-O0-NEXT: ; kill: def $sgpr36 killed $sgpr36 def $sgpr36_sgpr37_sgpr38_sgpr39_sgpr40_sgpr41_sgpr42_sgpr43_sgpr44_sgpr45_sgpr46_sgpr47_sgpr48_sgpr49_sgpr50_sgpr51_sgpr52_sgpr53_sgpr54_sgpr55_sgpr56_sgpr57_sgpr58_sgpr59_sgpr60_sgpr61_sgpr62_sgpr63_sgpr64_sgpr65_sgpr66_sgpr67
; GCN-O0-NEXT: s_mov_b32 s37, s76
; GCN-O0-NEXT: s_mov_b32 s38, s75
; GCN-O0-NEXT: s_mov_b32 s39, s74
; GCN-O0-NEXT: s_mov_b32 s40, s73
; GCN-O0-NEXT: s_mov_b32 s41, s72
; GCN-O0-NEXT: s_mov_b32 s42, s29
; GCN-O0-NEXT: s_mov_b32 s43, s28
; GCN-O0-NEXT: s_mov_b32 s44, s27
; GCN-O0-NEXT: s_mov_b32 s45, s26
; GCN-O0-NEXT: s_mov_b32 s46, s25
; GCN-O0-NEXT: s_mov_b32 s47, s24
; GCN-O0-NEXT: s_mov_b32 s48, s23
; GCN-O0-NEXT: s_mov_b32 s49, s22
; GCN-O0-NEXT: s_mov_b32 s50, s21
; GCN-O0-NEXT: s_mov_b32 s51, s20
; GCN-O0-NEXT: s_mov_b32 s52, s19
; GCN-O0-NEXT: s_mov_b32 s53, s18
; GCN-O0-NEXT: s_mov_b32 s54, s17
; GCN-O0-NEXT: s_mov_b32 s55, s16
; GCN-O0-NEXT: s_mov_b32 s56, s15
; GCN-O0-NEXT: s_mov_b32 s57, s14
; GCN-O0-NEXT: s_mov_b32 s58, s13
; GCN-O0-NEXT: s_mov_b32 s59, s12
; GCN-O0-NEXT: s_mov_b32 s60, s11
; GCN-O0-NEXT: s_mov_b32 s61, s10
; GCN-O0-NEXT: s_mov_b32 s62, s9
; GCN-O0-NEXT: s_mov_b32 s63, s8
; GCN-O0-NEXT: s_mov_b32 s64, s7
; GCN-O0-NEXT: s_mov_b32 s65, s6
; GCN-O0-NEXT: s_mov_b32 s66, s5
; GCN-O0-NEXT: s_mov_b32 s67, s4
; GCN-O0-NEXT: v_writelane_b32 v35, s36, 1
; GCN-O0-NEXT: v_writelane_b32 v35, s37, 2
; GCN-O0-NEXT: v_writelane_b32 v35, s38, 3
; GCN-O0-NEXT: v_writelane_b32 v35, s39, 4
; GCN-O0-NEXT: v_writelane_b32 v35, s40, 5
; GCN-O0-NEXT: v_writelane_b32 v35, s41, 6
; GCN-O0-NEXT: v_writelane_b32 v35, s42, 7
; GCN-O0-NEXT: v_writelane_b32 v35, s43, 8
; GCN-O0-NEXT: v_writelane_b32 v35, s44, 9
; GCN-O0-NEXT: v_writelane_b32 v35, s45, 10
; GCN-O0-NEXT: v_writelane_b32 v35, s46, 11
; GCN-O0-NEXT: v_writelane_b32 v35, s47, 12
; GCN-O0-NEXT: v_writelane_b32 v35, s48, 13
; GCN-O0-NEXT: v_writelane_b32 v35, s49, 14
; GCN-O0-NEXT: v_writelane_b32 v35, s50, 15
; GCN-O0-NEXT: v_writelane_b32 v35, s51, 16
; GCN-O0-NEXT: v_writelane_b32 v35, s52, 17
; GCN-O0-NEXT: v_writelane_b32 v35, s53, 18
; GCN-O0-NEXT: v_writelane_b32 v35, s54, 19
; GCN-O0-NEXT: v_writelane_b32 v35, s55, 20
; GCN-O0-NEXT: v_writelane_b32 v35, s56, 21
; GCN-O0-NEXT: v_writelane_b32 v35, s57, 22
; GCN-O0-NEXT: v_writelane_b32 v35, s58, 23
; GCN-O0-NEXT: v_writelane_b32 v35, s59, 24
; GCN-O0-NEXT: v_writelane_b32 v35, s60, 25
; GCN-O0-NEXT: v_writelane_b32 v35, s61, 26
; GCN-O0-NEXT: v_writelane_b32 v35, s62, 27
; GCN-O0-NEXT: v_writelane_b32 v35, s63, 28
; GCN-O0-NEXT: v_writelane_b32 v35, s64, 29
; GCN-O0-NEXT: v_writelane_b32 v35, s65, 30
; GCN-O0-NEXT: v_writelane_b32 v35, s66, 31
; GCN-O0-NEXT: v_writelane_b32 v35, s67, 32
; GCN-O0-NEXT: s_mov_b32 s4, 1
; GCN-O0-NEXT: v_lshlrev_b32_e64 v0, s4, v0
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:132 ; 4-byte Folded Spill
; GCN-O0-NEXT: v_mov_b32_e32 v0, s36
; GCN-O0-NEXT: v_mov_b32_e32 v1, s37
; GCN-O0-NEXT: v_mov_b32_e32 v2, s38
; GCN-O0-NEXT: v_mov_b32_e32 v3, s39
; GCN-O0-NEXT: v_mov_b32_e32 v4, s40
; GCN-O0-NEXT: v_mov_b32_e32 v5, s41
; GCN-O0-NEXT: v_mov_b32_e32 v6, s42
; GCN-O0-NEXT: v_mov_b32_e32 v7, s43
; GCN-O0-NEXT: v_mov_b32_e32 v8, s44
; GCN-O0-NEXT: v_mov_b32_e32 v9, s45
; GCN-O0-NEXT: v_mov_b32_e32 v10, s46
; GCN-O0-NEXT: v_mov_b32_e32 v11, s47
; GCN-O0-NEXT: v_mov_b32_e32 v12, s48
; GCN-O0-NEXT: v_mov_b32_e32 v13, s49
; GCN-O0-NEXT: v_mov_b32_e32 v14, s50
; GCN-O0-NEXT: v_mov_b32_e32 v15, s51
; GCN-O0-NEXT: v_mov_b32_e32 v16, s52
; GCN-O0-NEXT: v_mov_b32_e32 v17, s53
; GCN-O0-NEXT: v_mov_b32_e32 v18, s54
; GCN-O0-NEXT: v_mov_b32_e32 v19, s55
; GCN-O0-NEXT: v_mov_b32_e32 v20, s56
; GCN-O0-NEXT: v_mov_b32_e32 v21, s57
; GCN-O0-NEXT: v_mov_b32_e32 v22, s58
; GCN-O0-NEXT: v_mov_b32_e32 v23, s59
; GCN-O0-NEXT: v_mov_b32_e32 v24, s60
; GCN-O0-NEXT: v_mov_b32_e32 v25, s61
; GCN-O0-NEXT: v_mov_b32_e32 v26, s62
; GCN-O0-NEXT: v_mov_b32_e32 v27, s63
; GCN-O0-NEXT: v_mov_b32_e32 v28, s64
; GCN-O0-NEXT: v_mov_b32_e32 v29, s65
; GCN-O0-NEXT: v_mov_b32_e32 v30, s66
; GCN-O0-NEXT: v_mov_b32_e32 v31, s67
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v6, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v7, off, s[0:3], s32 offset:32 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v8, off, s[0:3], s32 offset:36 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v9, off, s[0:3], s32 offset:40 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v10, off, s[0:3], s32 offset:44 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v11, off, s[0:3], s32 offset:48 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v12, off, s[0:3], s32 offset:52 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v13, off, s[0:3], s32 offset:56 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v14, off, s[0:3], s32 offset:60 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v15, off, s[0:3], s32 offset:64 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v16, off, s[0:3], s32 offset:68 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v17, off, s[0:3], s32 offset:72 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v18, off, s[0:3], s32 offset:76 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v19, off, s[0:3], s32 offset:80 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v20, off, s[0:3], s32 offset:84 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v21, off, s[0:3], s32 offset:88 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v22, off, s[0:3], s32 offset:92 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v23, off, s[0:3], s32 offset:96 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v24, off, s[0:3], s32 offset:100 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v25, off, s[0:3], s32 offset:104 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v26, off, s[0:3], s32 offset:108 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v27, off, s[0:3], s32 offset:112 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v28, off, s[0:3], s32 offset:116 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v29, off, s[0:3], s32 offset:120 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v30, off, s[0:3], s32 offset:124 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v31, off, s[0:3], s32 offset:128 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[4:5], exec
; GCN-O0-NEXT: v_writelane_b32 v35, s4, 33
; GCN-O0-NEXT: v_writelane_b32 v35, s5, 34
; GCN-O0-NEXT: s_or_saveexec_b64 s[78:79], -1
; GCN-O0-NEXT: buffer_store_dword v35, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[78:79]
; GCN-O0-NEXT: ; implicit-def: $vgpr0
; GCN-O0-NEXT: ; implicit-def: $sgpr4_sgpr5
; GCN-O0-NEXT: .LBB21_1: ; =>This Inner Loop Header: Depth=1
; GCN-O0-NEXT: s_or_saveexec_b64 s[78:79], -1
; GCN-O0-NEXT: buffer_load_dword v35, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[78:79]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v35, 35
; GCN-O0-NEXT: v_readlane_b32 s5, v35, 36
; GCN-O0-NEXT: buffer_load_dword v33, off, s[0:3], s32 offset:136 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v6, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 offset:32 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v8, off, s[0:3], s32 offset:36 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v9, off, s[0:3], s32 offset:40 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v10, off, s[0:3], s32 offset:44 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v11, off, s[0:3], s32 offset:48 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v12, off, s[0:3], s32 offset:52 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v13, off, s[0:3], s32 offset:56 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v14, off, s[0:3], s32 offset:60 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v15, off, s[0:3], s32 offset:64 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v16, off, s[0:3], s32 offset:68 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v17, off, s[0:3], s32 offset:72 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v18, off, s[0:3], s32 offset:76 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v19, off, s[0:3], s32 offset:80 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v20, off, s[0:3], s32 offset:84 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v21, off, s[0:3], s32 offset:88 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v22, off, s[0:3], s32 offset:92 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v23, off, s[0:3], s32 offset:96 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v24, off, s[0:3], s32 offset:100 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v25, off, s[0:3], s32 offset:104 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v26, off, s[0:3], s32 offset:108 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v27, off, s[0:3], s32 offset:112 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v28, off, s[0:3], s32 offset:116 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v29, off, s[0:3], s32 offset:120 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v30, off, s[0:3], s32 offset:124 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v31, off, s[0:3], s32 offset:128 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v32, off, s[0:3], s32 offset:132 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readfirstlane_b32 s6, v32
; GCN-O0-NEXT: v_cmp_eq_u32_e64 s[4:5], s6, v32
; GCN-O0-NEXT: s_and_saveexec_b64 s[4:5], s[4:5]
; GCN-O0-NEXT: s_mov_b32 m0, s6
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:140 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:136 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[6:7], s[4:5]
; GCN-O0-NEXT: v_writelane_b32 v35, s6, 35
; GCN-O0-NEXT: v_writelane_b32 v35, s7, 36
; GCN-O0-NEXT: s_or_saveexec_b64 s[78:79], -1
; GCN-O0-NEXT: buffer_store_dword v35, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[78:79]
; GCN-O0-NEXT: s_xor_b64 exec, exec, s[4:5]
; GCN-O0-NEXT: s_cbranch_execnz .LBB21_1
; GCN-O0-NEXT: ; %bb.2:
; GCN-O0-NEXT: s_or_saveexec_b64 s[78:79], -1
; GCN-O0-NEXT: buffer_load_dword v35, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[78:79]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v35, 33
; GCN-O0-NEXT: v_readlane_b32 s5, v35, 34
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: ; %bb.3:
; GCN-O0-NEXT: s_or_saveexec_b64 s[78:79], -1
; GCN-O0-NEXT: buffer_load_dword v35, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[78:79]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s36, v35, 1
; GCN-O0-NEXT: v_readlane_b32 s37, v35, 2
; GCN-O0-NEXT: v_readlane_b32 s38, v35, 3
; GCN-O0-NEXT: v_readlane_b32 s39, v35, 4
; GCN-O0-NEXT: v_readlane_b32 s40, v35, 5
; GCN-O0-NEXT: v_readlane_b32 s41, v35, 6
; GCN-O0-NEXT: v_readlane_b32 s42, v35, 7
; GCN-O0-NEXT: v_readlane_b32 s43, v35, 8
; GCN-O0-NEXT: v_readlane_b32 s44, v35, 9
; GCN-O0-NEXT: v_readlane_b32 s45, v35, 10
; GCN-O0-NEXT: v_readlane_b32 s46, v35, 11
; GCN-O0-NEXT: v_readlane_b32 s47, v35, 12
; GCN-O0-NEXT: v_readlane_b32 s48, v35, 13
; GCN-O0-NEXT: v_readlane_b32 s49, v35, 14
; GCN-O0-NEXT: v_readlane_b32 s50, v35, 15
; GCN-O0-NEXT: v_readlane_b32 s51, v35, 16
; GCN-O0-NEXT: v_readlane_b32 s52, v35, 17
; GCN-O0-NEXT: v_readlane_b32 s53, v35, 18
; GCN-O0-NEXT: v_readlane_b32 s54, v35, 19
; GCN-O0-NEXT: v_readlane_b32 s55, v35, 20
; GCN-O0-NEXT: v_readlane_b32 s56, v35, 21
; GCN-O0-NEXT: v_readlane_b32 s57, v35, 22
; GCN-O0-NEXT: v_readlane_b32 s58, v35, 23
; GCN-O0-NEXT: v_readlane_b32 s59, v35, 24
; GCN-O0-NEXT: v_readlane_b32 s60, v35, 25
; GCN-O0-NEXT: v_readlane_b32 s61, v35, 26
; GCN-O0-NEXT: v_readlane_b32 s62, v35, 27
; GCN-O0-NEXT: v_readlane_b32 s63, v35, 28
; GCN-O0-NEXT: v_readlane_b32 s64, v35, 29
; GCN-O0-NEXT: v_readlane_b32 s65, v35, 30
; GCN-O0-NEXT: v_readlane_b32 s66, v35, 31
; GCN-O0-NEXT: v_readlane_b32 s67, v35, 32
; GCN-O0-NEXT: v_mov_b32_e32 v0, s36
; GCN-O0-NEXT: v_mov_b32_e32 v1, s37
; GCN-O0-NEXT: v_mov_b32_e32 v2, s38
; GCN-O0-NEXT: v_mov_b32_e32 v3, s39
; GCN-O0-NEXT: v_mov_b32_e32 v4, s40
; GCN-O0-NEXT: v_mov_b32_e32 v5, s41
; GCN-O0-NEXT: v_mov_b32_e32 v6, s42
; GCN-O0-NEXT: v_mov_b32_e32 v7, s43
; GCN-O0-NEXT: v_mov_b32_e32 v8, s44
; GCN-O0-NEXT: v_mov_b32_e32 v9, s45
; GCN-O0-NEXT: v_mov_b32_e32 v10, s46
; GCN-O0-NEXT: v_mov_b32_e32 v11, s47
; GCN-O0-NEXT: v_mov_b32_e32 v12, s48
; GCN-O0-NEXT: v_mov_b32_e32 v13, s49
; GCN-O0-NEXT: v_mov_b32_e32 v14, s50
; GCN-O0-NEXT: v_mov_b32_e32 v15, s51
; GCN-O0-NEXT: v_mov_b32_e32 v16, s52
; GCN-O0-NEXT: v_mov_b32_e32 v17, s53
; GCN-O0-NEXT: v_mov_b32_e32 v18, s54
; GCN-O0-NEXT: v_mov_b32_e32 v19, s55
; GCN-O0-NEXT: v_mov_b32_e32 v20, s56
; GCN-O0-NEXT: v_mov_b32_e32 v21, s57
; GCN-O0-NEXT: v_mov_b32_e32 v22, s58
; GCN-O0-NEXT: v_mov_b32_e32 v23, s59
; GCN-O0-NEXT: v_mov_b32_e32 v24, s60
; GCN-O0-NEXT: v_mov_b32_e32 v25, s61
; GCN-O0-NEXT: v_mov_b32_e32 v26, s62
; GCN-O0-NEXT: v_mov_b32_e32 v27, s63
; GCN-O0-NEXT: v_mov_b32_e32 v28, s64
; GCN-O0-NEXT: v_mov_b32_e32 v29, s65
; GCN-O0-NEXT: v_mov_b32_e32 v30, s66
; GCN-O0-NEXT: v_mov_b32_e32 v31, s67
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:144 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:148 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:152 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v3, off, s[0:3], s32 offset:156 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v4, off, s[0:3], s32 offset:160 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 offset:164 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v6, off, s[0:3], s32 offset:168 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v7, off, s[0:3], s32 offset:172 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v8, off, s[0:3], s32 offset:176 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v9, off, s[0:3], s32 offset:180 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v10, off, s[0:3], s32 offset:184 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v11, off, s[0:3], s32 offset:188 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v12, off, s[0:3], s32 offset:192 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v13, off, s[0:3], s32 offset:196 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v14, off, s[0:3], s32 offset:200 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v15, off, s[0:3], s32 offset:204 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v16, off, s[0:3], s32 offset:208 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v17, off, s[0:3], s32 offset:212 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v18, off, s[0:3], s32 offset:216 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v19, off, s[0:3], s32 offset:220 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v20, off, s[0:3], s32 offset:224 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v21, off, s[0:3], s32 offset:228 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v22, off, s[0:3], s32 offset:232 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v23, off, s[0:3], s32 offset:236 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v24, off, s[0:3], s32 offset:240 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v25, off, s[0:3], s32 offset:244 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v26, off, s[0:3], s32 offset:248 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v27, off, s[0:3], s32 offset:252 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v28, off, s[0:3], s32 offset:256 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v29, off, s[0:3], s32 offset:260 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v30, off, s[0:3], s32 offset:264 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v31, off, s[0:3], s32 offset:268 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[4:5], exec
; GCN-O0-NEXT: v_writelane_b32 v35, s4, 37
; GCN-O0-NEXT: v_writelane_b32 v35, s5, 38
; GCN-O0-NEXT: s_or_saveexec_b64 s[78:79], -1
; GCN-O0-NEXT: buffer_store_dword v35, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[78:79]
; GCN-O0-NEXT: ; implicit-def: $vgpr0
; GCN-O0-NEXT: ; implicit-def: $sgpr4_sgpr5
; GCN-O0-NEXT: .LBB21_4: ; =>This Inner Loop Header: Depth=1
; GCN-O0-NEXT: s_or_saveexec_b64 s[78:79], -1
; GCN-O0-NEXT: buffer_load_dword v35, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[78:79]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v35, 39
; GCN-O0-NEXT: v_readlane_b32 s5, v35, 40
; GCN-O0-NEXT: buffer_load_dword v33, off, s[0:3], s32 offset:272 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:144 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:148 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:152 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:156 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:160 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 offset:164 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v6, off, s[0:3], s32 offset:168 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 offset:172 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v8, off, s[0:3], s32 offset:176 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v9, off, s[0:3], s32 offset:180 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v10, off, s[0:3], s32 offset:184 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v11, off, s[0:3], s32 offset:188 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v12, off, s[0:3], s32 offset:192 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v13, off, s[0:3], s32 offset:196 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v14, off, s[0:3], s32 offset:200 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v15, off, s[0:3], s32 offset:204 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v16, off, s[0:3], s32 offset:208 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v17, off, s[0:3], s32 offset:212 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v18, off, s[0:3], s32 offset:216 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v19, off, s[0:3], s32 offset:220 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v20, off, s[0:3], s32 offset:224 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v21, off, s[0:3], s32 offset:228 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v22, off, s[0:3], s32 offset:232 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v23, off, s[0:3], s32 offset:236 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v24, off, s[0:3], s32 offset:240 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v25, off, s[0:3], s32 offset:244 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v26, off, s[0:3], s32 offset:248 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v27, off, s[0:3], s32 offset:252 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v28, off, s[0:3], s32 offset:256 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v29, off, s[0:3], s32 offset:260 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v30, off, s[0:3], s32 offset:264 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v31, off, s[0:3], s32 offset:268 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v32, off, s[0:3], s32 offset:132 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readfirstlane_b32 s6, v32
; GCN-O0-NEXT: v_cmp_eq_u32_e64 s[4:5], s6, v32
; GCN-O0-NEXT: s_and_saveexec_b64 s[4:5], s[4:5]
; GCN-O0-NEXT: s_mov_b32 m0, s6
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v1
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:276 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:272 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[6:7], s[4:5]
; GCN-O0-NEXT: v_writelane_b32 v35, s6, 39
; GCN-O0-NEXT: v_writelane_b32 v35, s7, 40
; GCN-O0-NEXT: s_or_saveexec_b64 s[78:79], -1
; GCN-O0-NEXT: buffer_store_dword v35, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[78:79]
; GCN-O0-NEXT: s_xor_b64 exec, exec, s[4:5]
; GCN-O0-NEXT: s_cbranch_execnz .LBB21_4
; GCN-O0-NEXT: ; %bb.5:
; GCN-O0-NEXT: s_or_saveexec_b64 s[78:79], -1
; GCN-O0-NEXT: buffer_load_dword v35, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[78:79]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v35, 37
; GCN-O0-NEXT: v_readlane_b32 s5, v35, 38
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: ; %bb.6:
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:140 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:276 ; 4-byte Folded Reload
; GCN-O0-NEXT: ; implicit-def: $sgpr4
; GCN-O0-NEXT: ; implicit-def: $sgpr5
; GCN-O0-NEXT: v_mov_b32_e32 v1, s4
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_mov_b32_e32 v2, v3
; GCN-O0-NEXT: s_mov_b32 s4, 32
; GCN-O0-NEXT: v_lshrrev_b64 v[1:2], s4, v[1:2]
; GCN-O0-NEXT: ; kill: def $vgpr1 killed $vgpr1 killed $vgpr1_vgpr2 killed $exec
; GCN-O0-NEXT: v_readlane_b32 s67, v34, 15
; GCN-O0-NEXT: v_readlane_b32 s66, v34, 14
; GCN-O0-NEXT: v_readlane_b32 s65, v34, 13
; GCN-O0-NEXT: v_readlane_b32 s64, v34, 12
; GCN-O0-NEXT: v_readlane_b32 s55, v34, 11
; GCN-O0-NEXT: v_readlane_b32 s54, v34, 10
; GCN-O0-NEXT: v_readlane_b32 s53, v34, 9
; GCN-O0-NEXT: v_readlane_b32 s52, v34, 8
; GCN-O0-NEXT: v_readlane_b32 s51, v34, 7
; GCN-O0-NEXT: v_readlane_b32 s50, v34, 6
; GCN-O0-NEXT: v_readlane_b32 s49, v34, 5
; GCN-O0-NEXT: v_readlane_b32 s48, v34, 4
; GCN-O0-NEXT: v_readlane_b32 s39, v34, 3
; GCN-O0-NEXT: v_readlane_b32 s38, v34, 2
; GCN-O0-NEXT: v_readlane_b32 s37, v34, 1
; GCN-O0-NEXT: v_readlane_b32 s36, v34, 0
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_load_dword v34, off, s[0:3], s32 offset:280 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v35, off, s[0:3], s32 offset:284 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
entry:
%ext = extractelement <16 x double> <double 1.1, double 2.1, double 3.1, double 4.1, double 5.1, double 6.1, double 7.1, double 8.1, double 9.1, double 10.1, double 11.1, double 12.1, double 13.1, double 14.1, double 15.1, double 16.1>, i32 %sel
ret double %ext
}
define i32 @extract_dyn_i32_3(<3 x i32> inreg %arg, i32 %idx) {
; GCN-LABEL: extract_dyn_i32_3:
; GCN: ; %bb.0:
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: v_mov_b32_e32 v1, s16
; GCN-NEXT: v_mov_b32_e32 v2, s17
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s18
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 2, v0
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v2, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_i32_3:
; GCN-O0: ; %bb.0:
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: ; kill: def $sgpr8_sgpr9_sgpr10 killed $sgpr4_sgpr5_sgpr6
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[4:5], exec
; GCN-O0-NEXT: ; implicit-def: $vgpr5 : SGPR spill to VGPR lane
; GCN-O0-NEXT: v_writelane_b32 v5, s4, 0
; GCN-O0-NEXT: v_writelane_b32 v5, s5, 1
; GCN-O0-NEXT: s_or_saveexec_b64 s[14:15], -1
; GCN-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[14:15]
; GCN-O0-NEXT: ; implicit-def: $vgpr0
; GCN-O0-NEXT: ; implicit-def: $sgpr4_sgpr5
; GCN-O0-NEXT: .LBB22_1: ; =>This Inner Loop Header: Depth=1
; GCN-O0-NEXT: s_or_saveexec_b64 s[14:15], -1
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[14:15]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v5, 2
; GCN-O0-NEXT: v_readlane_b32 s5, v5, 3
; GCN-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readfirstlane_b32 s6, v3
; GCN-O0-NEXT: v_cmp_eq_u32_e64 s[4:5], s6, v3
; GCN-O0-NEXT: s_and_saveexec_b64 s[4:5], s[4:5]
; GCN-O0-NEXT: s_mov_b32 m0, s6
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[6:7], s[4:5]
; GCN-O0-NEXT: v_writelane_b32 v5, s6, 2
; GCN-O0-NEXT: v_writelane_b32 v5, s7, 3
; GCN-O0-NEXT: s_or_saveexec_b64 s[14:15], -1
; GCN-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[14:15]
; GCN-O0-NEXT: s_xor_b64 exec, exec, s[4:5]
; GCN-O0-NEXT: s_cbranch_execnz .LBB22_1
; GCN-O0-NEXT: ; %bb.2:
; GCN-O0-NEXT: s_or_saveexec_b64 s[14:15], -1
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[14:15]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v5, 0
; GCN-O0-NEXT: v_readlane_b32 s5, v5, 1
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: ; %bb.3:
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
%x = extractelement <3 x i32> %arg, i32 %idx
ret i32 %x
}
define i32 @extract_dyn_inreg_i32_3(<3 x i32> inreg %arg, i32 inreg %idx) {
; GCN-LABEL: extract_dyn_inreg_i32_3:
; GCN: ; %bb.0:
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s19, 1
; GCN-NEXT: s_cselect_b32 s4, s17, s16
; GCN-NEXT: s_cmp_eq_u32 s19, 2
; GCN-NEXT: s_cselect_b32 s4, s18, s4
; GCN-NEXT: v_mov_b32_e32 v0, s4
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_inreg_i32_3:
; GCN-O0: ; %bb.0:
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: ; kill: def $sgpr8_sgpr9_sgpr10 killed $sgpr4_sgpr5_sgpr6
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: s_mov_b32 m0, s19
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
%x = extractelement <3 x i32> %arg, i32 %idx
ret i32 %x
}
define float @extract_dyn_float_3(<3 x float> inreg %arg, i32 %idx) {
; GCN-LABEL: extract_dyn_float_3:
; GCN: ; %bb.0:
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: v_mov_b32_e32 v1, s16
; GCN-NEXT: v_mov_b32_e32 v2, s17
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s18
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 2, v0
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v2, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_float_3:
; GCN-O0: ; %bb.0:
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: ; kill: def $sgpr8_sgpr9_sgpr10 killed $sgpr4_sgpr5_sgpr6
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[4:5], exec
; GCN-O0-NEXT: ; implicit-def: $vgpr5 : SGPR spill to VGPR lane
; GCN-O0-NEXT: v_writelane_b32 v5, s4, 0
; GCN-O0-NEXT: v_writelane_b32 v5, s5, 1
; GCN-O0-NEXT: s_or_saveexec_b64 s[14:15], -1
; GCN-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[14:15]
; GCN-O0-NEXT: ; implicit-def: $vgpr0
; GCN-O0-NEXT: ; implicit-def: $sgpr4_sgpr5
; GCN-O0-NEXT: .LBB24_1: ; =>This Inner Loop Header: Depth=1
; GCN-O0-NEXT: s_or_saveexec_b64 s[14:15], -1
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[14:15]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v5, 2
; GCN-O0-NEXT: v_readlane_b32 s5, v5, 3
; GCN-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readfirstlane_b32 s6, v3
; GCN-O0-NEXT: v_cmp_eq_u32_e64 s[4:5], s6, v3
; GCN-O0-NEXT: s_and_saveexec_b64 s[4:5], s[4:5]
; GCN-O0-NEXT: s_mov_b32 m0, s6
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[6:7], s[4:5]
; GCN-O0-NEXT: v_writelane_b32 v5, s6, 2
; GCN-O0-NEXT: v_writelane_b32 v5, s7, 3
; GCN-O0-NEXT: s_or_saveexec_b64 s[14:15], -1
; GCN-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[14:15]
; GCN-O0-NEXT: s_xor_b64 exec, exec, s[4:5]
; GCN-O0-NEXT: s_cbranch_execnz .LBB24_1
; GCN-O0-NEXT: ; %bb.2:
; GCN-O0-NEXT: s_or_saveexec_b64 s[14:15], -1
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[14:15]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v5, 0
; GCN-O0-NEXT: v_readlane_b32 s5, v5, 1
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: ; %bb.3:
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
%x = extractelement <3 x float> %arg, i32 %idx
ret float %x
}
define float @extract_dyn_inreg_float_3(<3 x float> inreg %arg, i32 inreg %idx) {
; GCN-LABEL: extract_dyn_inreg_float_3:
; GCN: ; %bb.0:
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s19, 1
; GCN-NEXT: v_mov_b32_e32 v0, s16
; GCN-NEXT: v_mov_b32_e32 v1, s17
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_eq_u32 s19, 2
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, s18
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_inreg_float_3:
; GCN-O0: ; %bb.0:
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: ; kill: def $sgpr8_sgpr9_sgpr10 killed $sgpr4_sgpr5_sgpr6
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: s_mov_b32 m0, s19
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
%x = extractelement <3 x float> %arg, i32 %idx
ret float %x
}
define i32 @extract_dyn_i32_5(<5 x i32> inreg %arg, i32 %idx) {
; GCN-LABEL: extract_dyn_i32_5:
; GCN: ; %bb.0:
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: v_mov_b32_e32 v1, s16
; GCN-NEXT: v_mov_b32_e32 v2, s17
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s18
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 2, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s19
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 3, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s20
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 4, v0
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v2, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_i32_5:
; GCN-O0: ; %bb.0:
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_store_dword v7, off, s[0:3], s32 offset:36 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: s_mov_b32 s7, s19
; GCN-O0-NEXT: s_mov_b32 s8, s20
; GCN-O0-NEXT: ; kill: def $sgpr12_sgpr13_sgpr14_sgpr15_sgpr16 killed $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[4:5], exec
; GCN-O0-NEXT: ; implicit-def: $vgpr7 : SGPR spill to VGPR lane
; GCN-O0-NEXT: v_writelane_b32 v7, s4, 0
; GCN-O0-NEXT: v_writelane_b32 v7, s5, 1
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_store_dword v7, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: ; implicit-def: $vgpr0
; GCN-O0-NEXT: ; implicit-def: $sgpr4_sgpr5
; GCN-O0-NEXT: .LBB26_1: ; =>This Inner Loop Header: Depth=1
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v7, 2
; GCN-O0-NEXT: v_readlane_b32 s5, v7, 3
; GCN-O0-NEXT: buffer_load_dword v6, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readfirstlane_b32 s6, v5
; GCN-O0-NEXT: v_cmp_eq_u32_e64 s[4:5], s6, v5
; GCN-O0-NEXT: s_and_saveexec_b64 s[4:5], s[4:5]
; GCN-O0-NEXT: s_mov_b32 m0, s6
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:32 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[6:7], s[4:5]
; GCN-O0-NEXT: v_writelane_b32 v7, s6, 2
; GCN-O0-NEXT: v_writelane_b32 v7, s7, 3
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_store_dword v7, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: s_xor_b64 exec, exec, s[4:5]
; GCN-O0-NEXT: s_cbranch_execnz .LBB26_1
; GCN-O0-NEXT: ; %bb.2:
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v7, 0
; GCN-O0-NEXT: v_readlane_b32 s5, v7, 1
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: ; %bb.3:
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 offset:36 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
%x = extractelement <5 x i32> %arg, i32 %idx
ret i32 %x
}
define i32 @extract_dyn_inreg_i32_5(<5 x i32> inreg %arg, i32 inreg %idx) {
; GCN-LABEL: extract_dyn_inreg_i32_5:
; GCN: ; %bb.0:
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s21, 1
; GCN-NEXT: s_cselect_b32 s4, s17, s16
; GCN-NEXT: s_cmp_eq_u32 s21, 2
; GCN-NEXT: s_cselect_b32 s4, s18, s4
; GCN-NEXT: s_cmp_eq_u32 s21, 3
; GCN-NEXT: s_cselect_b32 s4, s19, s4
; GCN-NEXT: s_cmp_eq_u32 s21, 4
; GCN-NEXT: s_cselect_b32 s4, s20, s4
; GCN-NEXT: v_mov_b32_e32 v0, s4
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_inreg_i32_5:
; GCN-O0: ; %bb.0:
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: s_mov_b32 s7, s19
; GCN-O0-NEXT: s_mov_b32 s8, s20
; GCN-O0-NEXT: ; kill: def $sgpr12_sgpr13_sgpr14_sgpr15_sgpr16 killed $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: s_mov_b32 m0, s21
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
%x = extractelement <5 x i32> %arg, i32 %idx
ret i32 %x
}
define float @extract_dyn_float_5(<5 x float> inreg %arg, i32 %idx) {
; GCN-LABEL: extract_dyn_float_5:
; GCN: ; %bb.0:
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: v_mov_b32_e32 v1, s16
; GCN-NEXT: v_mov_b32_e32 v2, s17
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s18
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 2, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s19
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 3, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s20
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 4, v0
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v2, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_float_5:
; GCN-O0: ; %bb.0:
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_store_dword v7, off, s[0:3], s32 offset:36 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: s_mov_b32 s7, s19
; GCN-O0-NEXT: s_mov_b32 s8, s20
; GCN-O0-NEXT: ; kill: def $sgpr12_sgpr13_sgpr14_sgpr15_sgpr16 killed $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[4:5], exec
; GCN-O0-NEXT: ; implicit-def: $vgpr7 : SGPR spill to VGPR lane
; GCN-O0-NEXT: v_writelane_b32 v7, s4, 0
; GCN-O0-NEXT: v_writelane_b32 v7, s5, 1
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_store_dword v7, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: ; implicit-def: $vgpr0
; GCN-O0-NEXT: ; implicit-def: $sgpr4_sgpr5
; GCN-O0-NEXT: .LBB28_1: ; =>This Inner Loop Header: Depth=1
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v7, 2
; GCN-O0-NEXT: v_readlane_b32 s5, v7, 3
; GCN-O0-NEXT: buffer_load_dword v6, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readfirstlane_b32 s6, v5
; GCN-O0-NEXT: v_cmp_eq_u32_e64 s[4:5], s6, v5
; GCN-O0-NEXT: s_and_saveexec_b64 s[4:5], s[4:5]
; GCN-O0-NEXT: s_mov_b32 m0, s6
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:32 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[6:7], s[4:5]
; GCN-O0-NEXT: v_writelane_b32 v7, s6, 2
; GCN-O0-NEXT: v_writelane_b32 v7, s7, 3
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_store_dword v7, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: s_xor_b64 exec, exec, s[4:5]
; GCN-O0-NEXT: s_cbranch_execnz .LBB28_1
; GCN-O0-NEXT: ; %bb.2:
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v7, 0
; GCN-O0-NEXT: v_readlane_b32 s5, v7, 1
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: ; %bb.3:
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 offset:36 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
%x = extractelement <5 x float> %arg, i32 %idx
ret float %x
}
define float @extract_dyn_inreg_float_5(<5 x float> inreg %arg, i32 inreg %idx) {
; GCN-LABEL: extract_dyn_inreg_float_5:
; GCN: ; %bb.0:
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s21, 1
; GCN-NEXT: v_mov_b32_e32 v0, s16
; GCN-NEXT: v_mov_b32_e32 v1, s17
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_eq_u32 s21, 2
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, s18
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_eq_u32 s21, 3
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, s19
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_eq_u32 s21, 4
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, s20
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_inreg_float_5:
; GCN-O0: ; %bb.0:
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: s_mov_b32 s7, s19
; GCN-O0-NEXT: s_mov_b32 s8, s20
; GCN-O0-NEXT: ; kill: def $sgpr12_sgpr13_sgpr14_sgpr15_sgpr16 killed $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: s_mov_b32 m0, s21
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
%x = extractelement <5 x float> %arg, i32 %idx
ret float %x
}
define i32 @extract_dyn_i32_6(<6 x i32> inreg %arg, i32 %idx) {
; GCN-LABEL: extract_dyn_i32_6:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: v_mov_b32_e32 v1, s16
; GCN-NEXT: v_mov_b32_e32 v2, s17
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s18
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 2, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s19
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 3, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s20
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 4, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s21
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 5, v0
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v2, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_i32_6:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_store_dword v8, off, s[0:3], s32 offset:40 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: s_mov_b32 s7, s19
; GCN-O0-NEXT: s_mov_b32 s8, s20
; GCN-O0-NEXT: s_mov_b32 s9, s21
; GCN-O0-NEXT: ; kill: def $sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17 killed $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: v_mov_b32_e32 v5, s9
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[4:5], exec
; GCN-O0-NEXT: ; implicit-def: $vgpr8 : SGPR spill to VGPR lane
; GCN-O0-NEXT: v_writelane_b32 v8, s4, 0
; GCN-O0-NEXT: v_writelane_b32 v8, s5, 1
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_store_dword v8, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: ; implicit-def: $vgpr0
; GCN-O0-NEXT: ; implicit-def: $sgpr4_sgpr5
; GCN-O0-NEXT: .LBB30_1: ; =>This Inner Loop Header: Depth=1
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_load_dword v8, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v8, 2
; GCN-O0-NEXT: v_readlane_b32 s5, v8, 3
; GCN-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 offset:32 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v6, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readfirstlane_b32 s6, v6
; GCN-O0-NEXT: v_cmp_eq_u32_e64 s[4:5], s6, v6
; GCN-O0-NEXT: s_and_saveexec_b64 s[4:5], s[4:5]
; GCN-O0-NEXT: s_mov_b32 m0, s6
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:36 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[6:7], s[4:5]
; GCN-O0-NEXT: v_writelane_b32 v8, s6, 2
; GCN-O0-NEXT: v_writelane_b32 v8, s7, 3
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_store_dword v8, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: s_xor_b64 exec, exec, s[4:5]
; GCN-O0-NEXT: s_cbranch_execnz .LBB30_1
; GCN-O0-NEXT: ; %bb.2:
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_load_dword v8, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v8, 0
; GCN-O0-NEXT: v_readlane_b32 s5, v8, 1
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: ; %bb.3:
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:36 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_load_dword v8, off, s[0:3], s32 offset:40 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
entry:
%x = extractelement <6 x i32> %arg, i32 %idx
ret i32 %x
}
define i32 @extract_dyn_inreg_i32_6(<6 x i32> inreg %arg, i32 inreg %idx) {
; GCN-LABEL: extract_dyn_inreg_i32_6:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s22, 1
; GCN-NEXT: s_cselect_b32 s4, s17, s16
; GCN-NEXT: s_cmp_eq_u32 s22, 2
; GCN-NEXT: s_cselect_b32 s4, s18, s4
; GCN-NEXT: s_cmp_eq_u32 s22, 3
; GCN-NEXT: s_cselect_b32 s4, s19, s4
; GCN-NEXT: s_cmp_eq_u32 s22, 4
; GCN-NEXT: s_cselect_b32 s4, s20, s4
; GCN-NEXT: s_cmp_eq_u32 s22, 5
; GCN-NEXT: s_cselect_b32 s4, s21, s4
; GCN-NEXT: v_mov_b32_e32 v0, s4
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_inreg_i32_6:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: s_mov_b32 s7, s19
; GCN-O0-NEXT: s_mov_b32 s8, s20
; GCN-O0-NEXT: s_mov_b32 s9, s21
; GCN-O0-NEXT: ; kill: def $sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17 killed $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: v_mov_b32_e32 v5, s9
; GCN-O0-NEXT: s_mov_b32 m0, s22
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
entry:
%x = extractelement <6 x i32> %arg, i32 %idx
ret i32 %x
}
define float @extract_dyn_float_6(<6 x float> inreg %arg, i32 %idx) {
; GCN-LABEL: extract_dyn_float_6:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: v_mov_b32_e32 v1, s16
; GCN-NEXT: v_mov_b32_e32 v2, s17
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s18
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 2, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s19
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 3, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s20
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 4, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s21
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 5, v0
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v2, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_float_6:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_store_dword v8, off, s[0:3], s32 offset:40 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: s_mov_b32 s7, s19
; GCN-O0-NEXT: s_mov_b32 s8, s20
; GCN-O0-NEXT: s_mov_b32 s9, s21
; GCN-O0-NEXT: ; kill: def $sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17 killed $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: v_mov_b32_e32 v5, s9
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[4:5], exec
; GCN-O0-NEXT: ; implicit-def: $vgpr8 : SGPR spill to VGPR lane
; GCN-O0-NEXT: v_writelane_b32 v8, s4, 0
; GCN-O0-NEXT: v_writelane_b32 v8, s5, 1
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_store_dword v8, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: ; implicit-def: $vgpr0
; GCN-O0-NEXT: ; implicit-def: $sgpr4_sgpr5
; GCN-O0-NEXT: .LBB32_1: ; =>This Inner Loop Header: Depth=1
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_load_dword v8, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v8, 2
; GCN-O0-NEXT: v_readlane_b32 s5, v8, 3
; GCN-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 offset:32 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v6, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readfirstlane_b32 s6, v6
; GCN-O0-NEXT: v_cmp_eq_u32_e64 s[4:5], s6, v6
; GCN-O0-NEXT: s_and_saveexec_b64 s[4:5], s[4:5]
; GCN-O0-NEXT: s_mov_b32 m0, s6
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:36 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[6:7], s[4:5]
; GCN-O0-NEXT: v_writelane_b32 v8, s6, 2
; GCN-O0-NEXT: v_writelane_b32 v8, s7, 3
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_store_dword v8, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: s_xor_b64 exec, exec, s[4:5]
; GCN-O0-NEXT: s_cbranch_execnz .LBB32_1
; GCN-O0-NEXT: ; %bb.2:
; GCN-O0-NEXT: s_or_saveexec_b64 s[22:23], -1
; GCN-O0-NEXT: buffer_load_dword v8, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[22:23]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v8, 0
; GCN-O0-NEXT: v_readlane_b32 s5, v8, 1
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: ; %bb.3:
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:36 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_load_dword v8, off, s[0:3], s32 offset:40 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
entry:
%x = extractelement <6 x float> %arg, i32 %idx
ret float %x
}
define float @extract_dyn_inreg_float_6(<6 x float> inreg %arg, i32 inreg %idx) {
; GCN-LABEL: extract_dyn_inreg_float_6:
; GCN: ; %bb.0: ; %entry
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s22, 1
; GCN-NEXT: v_mov_b32_e32 v0, s16
; GCN-NEXT: v_mov_b32_e32 v1, s17
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_eq_u32 s22, 2
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, s18
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_eq_u32 s22, 3
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, s19
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_eq_u32 s22, 4
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, s20
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_eq_u32 s22, 5
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, s21
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_inreg_float_6:
; GCN-O0: ; %bb.0: ; %entry
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: s_mov_b32 s7, s19
; GCN-O0-NEXT: s_mov_b32 s8, s20
; GCN-O0-NEXT: s_mov_b32 s9, s21
; GCN-O0-NEXT: ; kill: def $sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17 killed $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: v_mov_b32_e32 v5, s9
; GCN-O0-NEXT: s_mov_b32 m0, s22
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
entry:
%x = extractelement <6 x float> %arg, i32 %idx
ret float %x
}
define i32 @extract_dyn_i32_7(<7 x i32> inreg %arg, i32 %idx) {
; GCN-LABEL: extract_dyn_i32_7:
; GCN: ; %bb.0:
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: v_mov_b32_e32 v1, s16
; GCN-NEXT: v_mov_b32_e32 v2, s17
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s18
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 2, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s19
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 3, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s20
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 4, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s21
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 5, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s22
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 6, v0
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v2, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_i32_7:
; GCN-O0: ; %bb.0:
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_store_dword v9, off, s[0:3], s32 offset:44 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: s_mov_b32 s7, s19
; GCN-O0-NEXT: s_mov_b32 s8, s20
; GCN-O0-NEXT: s_mov_b32 s9, s21
; GCN-O0-NEXT: s_mov_b32 s10, s22
; GCN-O0-NEXT: ; kill: def $sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18 killed $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: v_mov_b32_e32 v5, s9
; GCN-O0-NEXT: v_mov_b32_e32 v6, s10
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v6, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[4:5], exec
; GCN-O0-NEXT: ; implicit-def: $vgpr9 : SGPR spill to VGPR lane
; GCN-O0-NEXT: v_writelane_b32 v9, s4, 0
; GCN-O0-NEXT: v_writelane_b32 v9, s5, 1
; GCN-O0-NEXT: s_or_saveexec_b64 s[26:27], -1
; GCN-O0-NEXT: buffer_store_dword v9, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[26:27]
; GCN-O0-NEXT: ; implicit-def: $vgpr0
; GCN-O0-NEXT: ; implicit-def: $sgpr4_sgpr5
; GCN-O0-NEXT: .LBB34_1: ; =>This Inner Loop Header: Depth=1
; GCN-O0-NEXT: s_or_saveexec_b64 s[26:27], -1
; GCN-O0-NEXT: buffer_load_dword v9, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[26:27]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v9, 2
; GCN-O0-NEXT: v_readlane_b32 s5, v9, 3
; GCN-O0-NEXT: buffer_load_dword v8, off, s[0:3], s32 offset:36 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v6, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 offset:32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readfirstlane_b32 s6, v7
; GCN-O0-NEXT: v_cmp_eq_u32_e64 s[4:5], s6, v7
; GCN-O0-NEXT: s_and_saveexec_b64 s[4:5], s[4:5]
; GCN-O0-NEXT: s_mov_b32 m0, s6
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:40 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:36 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[6:7], s[4:5]
; GCN-O0-NEXT: v_writelane_b32 v9, s6, 2
; GCN-O0-NEXT: v_writelane_b32 v9, s7, 3
; GCN-O0-NEXT: s_or_saveexec_b64 s[26:27], -1
; GCN-O0-NEXT: buffer_store_dword v9, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[26:27]
; GCN-O0-NEXT: s_xor_b64 exec, exec, s[4:5]
; GCN-O0-NEXT: s_cbranch_execnz .LBB34_1
; GCN-O0-NEXT: ; %bb.2:
; GCN-O0-NEXT: s_or_saveexec_b64 s[26:27], -1
; GCN-O0-NEXT: buffer_load_dword v9, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[26:27]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v9, 0
; GCN-O0-NEXT: v_readlane_b32 s5, v9, 1
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: ; %bb.3:
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:40 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_load_dword v9, off, s[0:3], s32 offset:44 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
%x = extractelement <7 x i32> %arg, i32 %idx
ret i32 %x
}
define i32 @extract_dyn_inreg_i32_7(<7 x i32> inreg %arg, i32 inreg %idx) {
; GCN-LABEL: extract_dyn_inreg_i32_7:
; GCN: ; %bb.0:
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s23, 1
; GCN-NEXT: s_cselect_b32 s4, s17, s16
; GCN-NEXT: s_cmp_eq_u32 s23, 2
; GCN-NEXT: s_cselect_b32 s4, s18, s4
; GCN-NEXT: s_cmp_eq_u32 s23, 3
; GCN-NEXT: s_cselect_b32 s4, s19, s4
; GCN-NEXT: s_cmp_eq_u32 s23, 4
; GCN-NEXT: s_cselect_b32 s4, s20, s4
; GCN-NEXT: s_cmp_eq_u32 s23, 5
; GCN-NEXT: s_cselect_b32 s4, s21, s4
; GCN-NEXT: s_cmp_eq_u32 s23, 6
; GCN-NEXT: s_cselect_b32 s4, s22, s4
; GCN-NEXT: v_mov_b32_e32 v0, s4
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_inreg_i32_7:
; GCN-O0: ; %bb.0:
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: s_mov_b32 s7, s19
; GCN-O0-NEXT: s_mov_b32 s8, s20
; GCN-O0-NEXT: s_mov_b32 s9, s21
; GCN-O0-NEXT: s_mov_b32 s10, s22
; GCN-O0-NEXT: ; kill: def $sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18 killed $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: v_mov_b32_e32 v5, s9
; GCN-O0-NEXT: v_mov_b32_e32 v6, s10
; GCN-O0-NEXT: s_mov_b32 m0, s23
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
%x = extractelement <7 x i32> %arg, i32 %idx
ret i32 %x
}
define float @extract_dyn_float_7(<7 x float> inreg %arg, i32 %idx) {
; GCN-LABEL: extract_dyn_float_7:
; GCN: ; %bb.0:
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: v_mov_b32_e32 v1, s16
; GCN-NEXT: v_mov_b32_e32 v2, s17
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s18
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 2, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s19
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 3, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s20
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 4, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s21
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 5, v0
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v2, vcc
; GCN-NEXT: v_mov_b32_e32 v2, s22
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 6, v0
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v2, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_float_7:
; GCN-O0: ; %bb.0:
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_store_dword v9, off, s[0:3], s32 offset:44 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: s_mov_b32 s7, s19
; GCN-O0-NEXT: s_mov_b32 s8, s20
; GCN-O0-NEXT: s_mov_b32 s9, s21
; GCN-O0-NEXT: s_mov_b32 s10, s22
; GCN-O0-NEXT: ; kill: def $sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18 killed $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: v_mov_b32_e32 v5, s9
; GCN-O0-NEXT: v_mov_b32_e32 v6, s10
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v5, off, s[0:3], s32 offset:24 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v6, off, s[0:3], s32 offset:28 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[4:5], exec
; GCN-O0-NEXT: ; implicit-def: $vgpr9 : SGPR spill to VGPR lane
; GCN-O0-NEXT: v_writelane_b32 v9, s4, 0
; GCN-O0-NEXT: v_writelane_b32 v9, s5, 1
; GCN-O0-NEXT: s_or_saveexec_b64 s[26:27], -1
; GCN-O0-NEXT: buffer_store_dword v9, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[26:27]
; GCN-O0-NEXT: ; implicit-def: $vgpr0
; GCN-O0-NEXT: ; implicit-def: $sgpr4_sgpr5
; GCN-O0-NEXT: .LBB36_1: ; =>This Inner Loop Header: Depth=1
; GCN-O0-NEXT: s_or_saveexec_b64 s[26:27], -1
; GCN-O0-NEXT: buffer_load_dword v9, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[26:27]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v9, 2
; GCN-O0-NEXT: v_readlane_b32 s5, v9, 3
; GCN-O0-NEXT: buffer_load_dword v8, off, s[0:3], s32 offset:36 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:4 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v1, off, s[0:3], s32 offset:8 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v2, off, s[0:3], s32 offset:12 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v3, off, s[0:3], s32 offset:16 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v4, off, s[0:3], s32 offset:20 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v5, off, s[0:3], s32 offset:24 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v6, off, s[0:3], s32 offset:28 ; 4-byte Folded Reload
; GCN-O0-NEXT: buffer_load_dword v7, off, s[0:3], s32 offset:32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readfirstlane_b32 s6, v7
; GCN-O0-NEXT: v_cmp_eq_u32_e64 s[4:5], s6, v7
; GCN-O0-NEXT: s_and_saveexec_b64 s[4:5], s[4:5]
; GCN-O0-NEXT: s_mov_b32 m0, s6
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:40 ; 4-byte Folded Spill
; GCN-O0-NEXT: buffer_store_dword v0, off, s[0:3], s32 offset:36 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 s[6:7], s[4:5]
; GCN-O0-NEXT: v_writelane_b32 v9, s6, 2
; GCN-O0-NEXT: v_writelane_b32 v9, s7, 3
; GCN-O0-NEXT: s_or_saveexec_b64 s[26:27], -1
; GCN-O0-NEXT: buffer_store_dword v9, off, s[0:3], s32 ; 4-byte Folded Spill
; GCN-O0-NEXT: s_mov_b64 exec, s[26:27]
; GCN-O0-NEXT: s_xor_b64 exec, exec, s[4:5]
; GCN-O0-NEXT: s_cbranch_execnz .LBB36_1
; GCN-O0-NEXT: ; %bb.2:
; GCN-O0-NEXT: s_or_saveexec_b64 s[26:27], -1
; GCN-O0-NEXT: buffer_load_dword v9, off, s[0:3], s32 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[26:27]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: v_readlane_b32 s4, v9, 0
; GCN-O0-NEXT: v_readlane_b32 s5, v9, 1
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: ; %bb.3:
; GCN-O0-NEXT: buffer_load_dword v0, off, s[0:3], s32 offset:40 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_xor_saveexec_b64 s[4:5], -1
; GCN-O0-NEXT: buffer_load_dword v9, off, s[0:3], s32 offset:44 ; 4-byte Folded Reload
; GCN-O0-NEXT: s_mov_b64 exec, s[4:5]
; GCN-O0-NEXT: s_waitcnt vmcnt(0)
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
%x = extractelement <7 x float> %arg, i32 %idx
ret float %x
}
define float @extract_dyn_inreg_float_7(<7 x float> inreg %arg, i32 inreg %idx) {
; GCN-LABEL: extract_dyn_inreg_float_7:
; GCN: ; %bb.0:
; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-NEXT: s_cmp_eq_u32 s23, 1
; GCN-NEXT: v_mov_b32_e32 v0, s16
; GCN-NEXT: v_mov_b32_e32 v1, s17
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_eq_u32 s23, 2
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, s18
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_eq_u32 s23, 3
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, s19
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_eq_u32 s23, 4
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, s20
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_eq_u32 s23, 5
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, s21
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: s_cmp_eq_u32 s23, 6
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: v_mov_b32_e32 v1, s22
; GCN-NEXT: s_cselect_b64 vcc, -1, 0
; GCN-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
; GCN-NEXT: s_setpc_b64 s[30:31]
;
; GCN-O0-LABEL: extract_dyn_inreg_float_7:
; GCN-O0: ; %bb.0:
; GCN-O0-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GCN-O0-NEXT: s_mov_b32 s4, s16
; GCN-O0-NEXT: ; kill: def $sgpr4 killed $sgpr4 def $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10
; GCN-O0-NEXT: s_mov_b32 s5, s17
; GCN-O0-NEXT: s_mov_b32 s6, s18
; GCN-O0-NEXT: s_mov_b32 s7, s19
; GCN-O0-NEXT: s_mov_b32 s8, s20
; GCN-O0-NEXT: s_mov_b32 s9, s21
; GCN-O0-NEXT: s_mov_b32 s10, s22
; GCN-O0-NEXT: ; kill: def $sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18 killed $sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10
; GCN-O0-NEXT: v_mov_b32_e32 v0, s4
; GCN-O0-NEXT: v_mov_b32_e32 v1, s5
; GCN-O0-NEXT: v_mov_b32_e32 v2, s6
; GCN-O0-NEXT: v_mov_b32_e32 v3, s7
; GCN-O0-NEXT: v_mov_b32_e32 v4, s8
; GCN-O0-NEXT: v_mov_b32_e32 v5, s9
; GCN-O0-NEXT: v_mov_b32_e32 v6, s10
; GCN-O0-NEXT: s_mov_b32 m0, s23
; GCN-O0-NEXT: v_movrels_b32_e32 v0, v0
; GCN-O0-NEXT: s_setpc_b64 s[30:31]
%x = extractelement <7 x float> %arg, i32 %idx
ret float %x
}