Skip to content

Commit f174145

Browse files
author
Stefan Stipanovic
committed
[AMDGPU][GlobalIsel] Introduce isRegisterClassType to check for legal types, instead of checking bit width.
Make v13s32, v14s32, v15s32 and v7s64 illegal for bitcast first.
1 parent 6d24291 commit f174145

File tree

3 files changed

+240
-187
lines changed

3 files changed

+240
-187
lines changed

llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp

Lines changed: 114 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ static bool isRegisterVectorType(LLT Ty) {
239239
EltSize == 128 || EltSize == 256;
240240
}
241241

242+
// TODO: replace all uses of isRegisterType with isRegisterClassType
242243
static bool isRegisterType(LLT Ty) {
243244
if (!isRegisterSize(Ty.getSizeInBits()))
244245
return false;
@@ -276,6 +277,105 @@ static LegalityPredicate elementTypeIsLegal(unsigned TypeIdx) {
276277
};
277278
}
278279

280+
static const LLT S1 = LLT::scalar(1);
281+
static const LLT S8 = LLT::scalar(8);
282+
static const LLT S16 = LLT::scalar(16);
283+
static const LLT S32 = LLT::scalar(32);
284+
static const LLT S64 = LLT::scalar(64);
285+
static const LLT S96 = LLT::scalar(96);
286+
static const LLT S128 = LLT::scalar(128);
287+
static const LLT S160 = LLT::scalar(160);
288+
static const LLT S224 = LLT::scalar(224);
289+
static const LLT S256 = LLT::scalar(256);
290+
static const LLT S512 = LLT::scalar(512);
291+
static const LLT MaxScalar = LLT::scalar(MaxRegisterSize);
292+
293+
static const LLT V2S8 = LLT::fixed_vector(2, 8);
294+
static const LLT V2S16 = LLT::fixed_vector(2, 16);
295+
static const LLT V4S16 = LLT::fixed_vector(4, 16);
296+
static const LLT V6S16 = LLT::fixed_vector(6, 16);
297+
static const LLT V8S16 = LLT::fixed_vector(8, 16);
298+
static const LLT V10S16 = LLT::fixed_vector(10, 16);
299+
static const LLT V12S16 = LLT::fixed_vector(12, 16);
300+
static const LLT V16S16 = LLT::fixed_vector(16, 16);
301+
302+
static const LLT V2S32 = LLT::fixed_vector(2, 32);
303+
static const LLT V3S32 = LLT::fixed_vector(3, 32);
304+
static const LLT V4S32 = LLT::fixed_vector(4, 32);
305+
static const LLT V5S32 = LLT::fixed_vector(5, 32);
306+
static const LLT V6S32 = LLT::fixed_vector(6, 32);
307+
static const LLT V7S32 = LLT::fixed_vector(7, 32);
308+
static const LLT V8S32 = LLT::fixed_vector(8, 32);
309+
static const LLT V9S32 = LLT::fixed_vector(9, 32);
310+
static const LLT V10S32 = LLT::fixed_vector(10, 32);
311+
static const LLT V11S32 = LLT::fixed_vector(11, 32);
312+
static const LLT V12S32 = LLT::fixed_vector(12, 32);
313+
static const LLT V16S32 = LLT::fixed_vector(16, 32);
314+
static const LLT V32S32 = LLT::fixed_vector(32, 32);
315+
316+
static const LLT V2S64 = LLT::fixed_vector(2, 64);
317+
static const LLT V3S64 = LLT::fixed_vector(3, 64);
318+
static const LLT V4S64 = LLT::fixed_vector(4, 64);
319+
static const LLT V5S64 = LLT::fixed_vector(5, 64);
320+
static const LLT V6S64 = LLT::fixed_vector(6, 64);
321+
static const LLT V7S64 = LLT::fixed_vector(7, 64);
322+
static const LLT V8S64 = LLT::fixed_vector(8, 64);
323+
static const LLT V16S64 = LLT::fixed_vector(16, 64);
324+
325+
static const LLT V2S128 = LLT::fixed_vector(2, 128);
326+
static const LLT V4S128 = LLT::fixed_vector(4, 128);
327+
328+
static std::initializer_list<LLT> AllScalarTypes = {S32, S64, S96, S128,
329+
S160, S224, S256, S512};
330+
331+
static std::initializer_list<LLT> AllS16Vectors{
332+
V2S16, V4S16, V6S16, V8S16, V10S16, V12S16, V16S16, V2S128, V4S128};
333+
334+
static std::initializer_list<LLT> AllS32Vectors = {
335+
V2S32, V3S32, V4S32, V5S32, V6S32, V7S32, V8S32,
336+
V9S32, V10S32, V11S32, V12S32, V16S32, V32S32};
337+
338+
static std::initializer_list<LLT> AllS64Vectors = {V2S64, V3S64, V4S64, V5S64,
339+
V6S64, V7S64, V8S64, V16S64};
340+
341+
static bool typeInSet(LLT Ty, std::initializer_list<LLT> TypesInit) {
342+
SmallVector<LLT, 4> Types = TypesInit;
343+
return llvm::is_contained(Types, Ty);
344+
}
345+
346+
static LLT GetAddrSpacePtr(unsigned AS, const GCNTargetMachine &TM) {
347+
return LLT::pointer(AS, TM.getPointerSizeInBits(AS));
348+
}
349+
350+
// Checks whether a type is in the list of legal register types.
351+
static bool isRegisterClassType(LLT Ty, const GCNTargetMachine &TM) {
352+
const LLT GlobalPtr = GetAddrSpacePtr(AMDGPUAS::GLOBAL_ADDRESS, TM);
353+
const LLT LocalPtr = GetAddrSpacePtr(AMDGPUAS::LOCAL_ADDRESS, TM);
354+
const LLT FlatPtr = GetAddrSpacePtr(AMDGPUAS::FLAT_ADDRESS, TM);
355+
356+
// TODO: list all possible ptr vectors
357+
const LLT V2FlatPtr = LLT::fixed_vector(2, FlatPtr);
358+
const LLT V3LocalPtr = LLT::fixed_vector(3, LocalPtr);
359+
const LLT V5LocalPtr = LLT::fixed_vector(5, LocalPtr);
360+
const LLT V16LocalPtr = LLT::fixed_vector(16, LocalPtr);
361+
const LLT V2GlobalPtr = LLT::fixed_vector(2, GlobalPtr);
362+
const LLT V4GlobalPtr = LLT::fixed_vector(4, GlobalPtr);
363+
364+
std::initializer_list<LLT> AllPtrTypes{V2FlatPtr, V3LocalPtr, V5LocalPtr,
365+
V16LocalPtr, V2GlobalPtr, V4GlobalPtr};
366+
367+
return typeInSet(Ty, AllS32Vectors) || typeInSet(Ty, AllS64Vectors) ||
368+
typeInSet(Ty, AllScalarTypes) || typeInSet(Ty, AllS16Vectors) ||
369+
typeInSet(Ty, AllPtrTypes) || Ty.isPointer();
370+
}
371+
372+
static LegalityPredicate isRegisterClassType(unsigned TypeIdx,
373+
const GCNTargetMachine &TM) {
374+
return [TypeIdx, &TM](const LegalityQuery &Query) {
375+
return isRegisterClassType(Query.Types[TypeIdx], TM);
376+
};
377+
}
378+
279379
// If we have a truncating store or an extending load with a data size larger
280380
// than 32-bits, we need to reduce to a 32-bit type.
281381
static LegalityPredicate isWideScalarExtLoadTruncStore(unsigned TypeIdx) {
@@ -574,67 +674,18 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
574674
: ST(ST_) {
575675
using namespace TargetOpcode;
576676

577-
auto GetAddrSpacePtr = [&TM](unsigned AS) {
578-
return LLT::pointer(AS, TM.getPointerSizeInBits(AS));
579-
};
580-
581-
const LLT S1 = LLT::scalar(1);
582-
const LLT S8 = LLT::scalar(8);
583-
const LLT S16 = LLT::scalar(16);
584-
const LLT S32 = LLT::scalar(32);
585-
const LLT S64 = LLT::scalar(64);
586-
const LLT S128 = LLT::scalar(128);
587-
const LLT S256 = LLT::scalar(256);
588-
const LLT S512 = LLT::scalar(512);
589-
const LLT MaxScalar = LLT::scalar(MaxRegisterSize);
590-
591-
const LLT V2S8 = LLT::fixed_vector(2, 8);
592-
const LLT V2S16 = LLT::fixed_vector(2, 16);
593-
const LLT V4S16 = LLT::fixed_vector(4, 16);
594-
595-
const LLT V2S32 = LLT::fixed_vector(2, 32);
596-
const LLT V3S32 = LLT::fixed_vector(3, 32);
597-
const LLT V4S32 = LLT::fixed_vector(4, 32);
598-
const LLT V5S32 = LLT::fixed_vector(5, 32);
599-
const LLT V6S32 = LLT::fixed_vector(6, 32);
600-
const LLT V7S32 = LLT::fixed_vector(7, 32);
601-
const LLT V8S32 = LLT::fixed_vector(8, 32);
602-
const LLT V9S32 = LLT::fixed_vector(9, 32);
603-
const LLT V10S32 = LLT::fixed_vector(10, 32);
604-
const LLT V11S32 = LLT::fixed_vector(11, 32);
605-
const LLT V12S32 = LLT::fixed_vector(12, 32);
606-
const LLT V13S32 = LLT::fixed_vector(13, 32);
607-
const LLT V14S32 = LLT::fixed_vector(14, 32);
608-
const LLT V15S32 = LLT::fixed_vector(15, 32);
609-
const LLT V16S32 = LLT::fixed_vector(16, 32);
610-
const LLT V32S32 = LLT::fixed_vector(32, 32);
611-
612-
const LLT V2S64 = LLT::fixed_vector(2, 64);
613-
const LLT V3S64 = LLT::fixed_vector(3, 64);
614-
const LLT V4S64 = LLT::fixed_vector(4, 64);
615-
const LLT V5S64 = LLT::fixed_vector(5, 64);
616-
const LLT V6S64 = LLT::fixed_vector(6, 64);
617-
const LLT V7S64 = LLT::fixed_vector(7, 64);
618-
const LLT V8S64 = LLT::fixed_vector(8, 64);
619-
const LLT V16S64 = LLT::fixed_vector(16, 64);
620-
621-
std::initializer_list<LLT> AllS32Vectors =
622-
{V2S32, V3S32, V4S32, V5S32, V6S32, V7S32, V8S32,
623-
V9S32, V10S32, V11S32, V12S32, V13S32, V14S32, V15S32, V16S32, V32S32};
624-
std::initializer_list<LLT> AllS64Vectors =
625-
{V2S64, V3S64, V4S64, V5S64, V6S64, V7S64, V8S64, V16S64};
626-
627-
const LLT GlobalPtr = GetAddrSpacePtr(AMDGPUAS::GLOBAL_ADDRESS);
628-
const LLT ConstantPtr = GetAddrSpacePtr(AMDGPUAS::CONSTANT_ADDRESS);
629-
const LLT Constant32Ptr = GetAddrSpacePtr(AMDGPUAS::CONSTANT_ADDRESS_32BIT);
630-
const LLT LocalPtr = GetAddrSpacePtr(AMDGPUAS::LOCAL_ADDRESS);
631-
const LLT RegionPtr = GetAddrSpacePtr(AMDGPUAS::REGION_ADDRESS);
632-
const LLT FlatPtr = GetAddrSpacePtr(AMDGPUAS::FLAT_ADDRESS);
633-
const LLT PrivatePtr = GetAddrSpacePtr(AMDGPUAS::PRIVATE_ADDRESS);
634-
const LLT BufferFatPtr = GetAddrSpacePtr(AMDGPUAS::BUFFER_FAT_POINTER);
635-
const LLT RsrcPtr = GetAddrSpacePtr(AMDGPUAS::BUFFER_RESOURCE);
677+
const LLT GlobalPtr = GetAddrSpacePtr(AMDGPUAS::GLOBAL_ADDRESS, TM);
678+
const LLT ConstantPtr = GetAddrSpacePtr(AMDGPUAS::CONSTANT_ADDRESS, TM);
679+
const LLT Constant32Ptr =
680+
GetAddrSpacePtr(AMDGPUAS::CONSTANT_ADDRESS_32BIT, TM);
681+
const LLT LocalPtr = GetAddrSpacePtr(AMDGPUAS::LOCAL_ADDRESS, TM);
682+
const LLT RegionPtr = GetAddrSpacePtr(AMDGPUAS::REGION_ADDRESS, TM);
683+
const LLT FlatPtr = GetAddrSpacePtr(AMDGPUAS::FLAT_ADDRESS, TM);
684+
const LLT PrivatePtr = GetAddrSpacePtr(AMDGPUAS::PRIVATE_ADDRESS, TM);
685+
const LLT BufferFatPtr = GetAddrSpacePtr(AMDGPUAS::BUFFER_FAT_POINTER, TM);
686+
const LLT RsrcPtr = GetAddrSpacePtr(AMDGPUAS::BUFFER_RESOURCE, TM);
636687
const LLT BufferStridedPtr =
637-
GetAddrSpacePtr(AMDGPUAS::BUFFER_STRIDED_POINTER);
688+
GetAddrSpacePtr(AMDGPUAS::BUFFER_STRIDED_POINTER, TM);
638689

639690
const LLT CodePtr = FlatPtr;
640691

@@ -836,10 +887,9 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
836887
.scalarize(0);
837888

838889
getActionDefinitionsBuilder(G_BITCAST)
839-
// Don't worry about the size constraint.
840-
.legalIf(all(isRegisterType(0), isRegisterType(1)))
841-
.lower();
842-
890+
// Don't worry about the size constraint.
891+
.legalIf(all(isRegisterClassType(0, TM), isRegisterClassType(1, TM)))
892+
.lower();
843893

844894
getActionDefinitionsBuilder(G_CONSTANT)
845895
.legalFor({S1, S32, S64, S16, GlobalPtr,

llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2626,6 +2626,132 @@ entry:
26262626
ret double %ext
26272627
}
26282628

2629+
define amdgpu_ps double @dyn_extract_v7f64_s_v_bitcast(<14 x float> inreg %userData, i32 %sel) {
2630+
; GCN-LABEL: dyn_extract_v7f64_s_v_bitcast:
2631+
; GCN: ; %bb.0: ; %entry
2632+
; GCN-NEXT: v_mov_b32_e32 v1, s2
2633+
; GCN-NEXT: v_mov_b32_e32 v2, s3
2634+
; GCN-NEXT: v_mov_b32_e32 v3, s4
2635+
; GCN-NEXT: v_mov_b32_e32 v4, s5
2636+
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0
2637+
; GCN-NEXT: v_mov_b32_e32 v5, s6
2638+
; GCN-NEXT: v_mov_b32_e32 v6, s7
2639+
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v3, vcc
2640+
; GCN-NEXT: v_cndmask_b32_e32 v2, v2, v4, vcc
2641+
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 2, v0
2642+
; GCN-NEXT: v_mov_b32_e32 v7, s8
2643+
; GCN-NEXT: v_mov_b32_e32 v8, s9
2644+
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v5, vcc
2645+
; GCN-NEXT: v_cndmask_b32_e32 v2, v2, v6, vcc
2646+
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 3, v0
2647+
; GCN-NEXT: v_mov_b32_e32 v9, s10
2648+
; GCN-NEXT: v_mov_b32_e32 v10, s11
2649+
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v7, vcc
2650+
; GCN-NEXT: v_cndmask_b32_e32 v2, v2, v8, vcc
2651+
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 4, v0
2652+
; GCN-NEXT: v_mov_b32_e32 v11, s12
2653+
; GCN-NEXT: v_mov_b32_e32 v12, s13
2654+
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v9, vcc
2655+
; GCN-NEXT: v_cndmask_b32_e32 v2, v2, v10, vcc
2656+
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 5, v0
2657+
; GCN-NEXT: v_mov_b32_e32 v13, s14
2658+
; GCN-NEXT: v_mov_b32_e32 v14, s15
2659+
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v11, vcc
2660+
; GCN-NEXT: v_cndmask_b32_e32 v2, v2, v12, vcc
2661+
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 6, v0
2662+
; GCN-NEXT: v_cndmask_b32_e32 v1, v1, v13, vcc
2663+
; GCN-NEXT: v_cndmask_b32_e32 v2, v2, v14, vcc
2664+
; GCN-NEXT: v_cmp_eq_u32_e32 vcc, 7, v0
2665+
; GCN-NEXT: ; kill: def $vgpr15 killed $sgpr2 killed $exec
2666+
; GCN-NEXT: ; kill: def $vgpr16 killed $sgpr3 killed $exec
2667+
; GCN-NEXT: v_cndmask_b32_e32 v0, v1, v15, vcc
2668+
; GCN-NEXT: v_cndmask_b32_e32 v1, v2, v16, vcc
2669+
; GCN-NEXT: v_readfirstlane_b32 s0, v0
2670+
; GCN-NEXT: v_readfirstlane_b32 s1, v1
2671+
; GCN-NEXT: ; return to shader part epilog
2672+
;
2673+
; GFX10-LABEL: dyn_extract_v7f64_s_v_bitcast:
2674+
; GFX10: ; %bb.0: ; %entry
2675+
; GFX10-NEXT: v_mov_b32_e32 v1, s4
2676+
; GFX10-NEXT: v_mov_b32_e32 v2, s5
2677+
; GFX10-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
2678+
; GFX10-NEXT: s_mov_b32 s0, s14
2679+
; GFX10-NEXT: v_cndmask_b32_e32 v1, s2, v1, vcc_lo
2680+
; GFX10-NEXT: v_cndmask_b32_e32 v2, s3, v2, vcc_lo
2681+
; GFX10-NEXT: v_cmp_eq_u32_e32 vcc_lo, 2, v0
2682+
; GFX10-NEXT: v_cndmask_b32_e64 v1, v1, s6, vcc_lo
2683+
; GFX10-NEXT: v_cndmask_b32_e64 v2, v2, s7, vcc_lo
2684+
; GFX10-NEXT: v_cmp_eq_u32_e32 vcc_lo, 3, v0
2685+
; GFX10-NEXT: v_cndmask_b32_e64 v1, v1, s8, vcc_lo
2686+
; GFX10-NEXT: v_cndmask_b32_e64 v2, v2, s9, vcc_lo
2687+
; GFX10-NEXT: v_cmp_eq_u32_e32 vcc_lo, 4, v0
2688+
; GFX10-NEXT: v_cndmask_b32_e64 v1, v1, s10, vcc_lo
2689+
; GFX10-NEXT: v_cndmask_b32_e64 v2, v2, s11, vcc_lo
2690+
; GFX10-NEXT: v_cmp_eq_u32_e32 vcc_lo, 5, v0
2691+
; GFX10-NEXT: v_cndmask_b32_e64 v1, v1, s12, vcc_lo
2692+
; GFX10-NEXT: v_cndmask_b32_e64 v2, v2, s13, vcc_lo
2693+
; GFX10-NEXT: v_cmp_eq_u32_e32 vcc_lo, 6, v0
2694+
; GFX10-NEXT: v_cndmask_b32_e64 v1, v1, s0, vcc_lo
2695+
; GFX10-NEXT: v_cndmask_b32_e64 v2, v2, s15, vcc_lo
2696+
; GFX10-NEXT: v_cmp_eq_u32_e32 vcc_lo, 7, v0
2697+
; GFX10-NEXT: v_cndmask_b32_e64 v0, v1, s2, vcc_lo
2698+
; GFX10-NEXT: v_cndmask_b32_e64 v1, v2, s3, vcc_lo
2699+
; GFX10-NEXT: v_readfirstlane_b32 s0, v0
2700+
; GFX10-NEXT: v_readfirstlane_b32 s1, v1
2701+
; GFX10-NEXT: ; return to shader part epilog
2702+
;
2703+
; GFX11-LABEL: dyn_extract_v7f64_s_v_bitcast:
2704+
; GFX11: ; %bb.0: ; %entry
2705+
; GFX11-NEXT: v_dual_mov_b32 v1, s4 :: v_dual_mov_b32 v2, s5
2706+
; GFX11-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0
2707+
; GFX11-NEXT: s_mov_b32 s0, s14
2708+
; GFX11-NEXT: v_cndmask_b32_e32 v1, s2, v1, vcc_lo
2709+
; GFX11-NEXT: v_cndmask_b32_e32 v2, s3, v2, vcc_lo
2710+
; GFX11-NEXT: v_cmp_eq_u32_e32 vcc_lo, 2, v0
2711+
; GFX11-NEXT: v_cndmask_b32_e64 v1, v1, s6, vcc_lo
2712+
; GFX11-NEXT: v_cndmask_b32_e64 v2, v2, s7, vcc_lo
2713+
; GFX11-NEXT: v_cmp_eq_u32_e32 vcc_lo, 3, v0
2714+
; GFX11-NEXT: v_cndmask_b32_e64 v1, v1, s8, vcc_lo
2715+
; GFX11-NEXT: v_cndmask_b32_e64 v2, v2, s9, vcc_lo
2716+
; GFX11-NEXT: v_cmp_eq_u32_e32 vcc_lo, 4, v0
2717+
; GFX11-NEXT: v_cndmask_b32_e64 v1, v1, s10, vcc_lo
2718+
; GFX11-NEXT: v_cndmask_b32_e64 v2, v2, s11, vcc_lo
2719+
; GFX11-NEXT: v_cmp_eq_u32_e32 vcc_lo, 5, v0
2720+
; GFX11-NEXT: v_cndmask_b32_e64 v1, v1, s12, vcc_lo
2721+
; GFX11-NEXT: v_cndmask_b32_e64 v2, v2, s13, vcc_lo
2722+
; GFX11-NEXT: v_cmp_eq_u32_e32 vcc_lo, 6, v0
2723+
; GFX11-NEXT: v_cndmask_b32_e64 v1, v1, s0, vcc_lo
2724+
; GFX11-NEXT: v_cndmask_b32_e64 v2, v2, s15, vcc_lo
2725+
; GFX11-NEXT: v_cmp_eq_u32_e32 vcc_lo, 7, v0
2726+
; GFX11-NEXT: v_cndmask_b32_e64 v0, v1, s2, vcc_lo
2727+
; GFX11-NEXT: v_cndmask_b32_e64 v1, v2, s3, vcc_lo
2728+
; GFX11-NEXT: v_readfirstlane_b32 s0, v0
2729+
; GFX11-NEXT: v_readfirstlane_b32 s1, v1
2730+
; GFX11-NEXT: ; return to shader part epilog
2731+
entry:
2732+
%bc = bitcast <14 x float> %userData to <7 x double>
2733+
%ext = extractelement <7 x double> %bc, i32 %sel
2734+
ret double %ext
2735+
}
2736+
2737+
define amdgpu_ps i64 @dyn_extract_v7i64_s_v_bitcast(<14 x i32> inreg %userData, i32 %sel) {
2738+
; GCN-LABEL: dyn_extract_v7i64_s_v_bitcast:
2739+
; GCN: ; %bb.0: ; %entry
2740+
; GCN-NEXT: s_mov_b32 s0, s10
2741+
; GCN-NEXT: s_mov_b32 s1, s11
2742+
; GCN-NEXT: ; return to shader part epilog
2743+
;
2744+
; GFX10PLUS-LABEL: dyn_extract_v7i64_s_v_bitcast:
2745+
; GFX10PLUS: ; %bb.0: ; %entry
2746+
; GFX10PLUS-NEXT: s_mov_b32 s0, s10
2747+
; GFX10PLUS-NEXT: s_mov_b32 s1, s11
2748+
; GFX10PLUS-NEXT: ; return to shader part epilog
2749+
entry:
2750+
%.bc = bitcast <14 x i32> %userData to <7 x i64>
2751+
%ext = extractelement <7 x i64> %.bc, i32 4
2752+
ret i64 %ext
2753+
}
2754+
26292755
define amdgpu_ps double @dyn_extract_v7f64_s_v(<7 x double> inreg %vec, i32 %sel) {
26302756
; GCN-LABEL: dyn_extract_v7f64_s_v:
26312757
; GCN: ; %bb.0: ; %entry

0 commit comments

Comments
 (0)