@@ -47,23 +47,20 @@ define amdgpu_ps i8 @s_sext_inreg_i8(i8 inreg %value) {
4747;
4848; GFX8-LABEL: s_sext_inreg_i8:
4949; GFX8: ; %bb.0:
50- ; GFX8-NEXT: s_and_b32 s0, s0, 0xff
5150; GFX8-NEXT: s_lshl_b32 s0, s0, 3
5251; GFX8-NEXT: s_sext_i32_i8 s0, s0
5352; GFX8-NEXT: s_ashr_i32 s0, s0, 3
5453; GFX8-NEXT: ; return to shader part epilog
5554;
5655; GFX9-LABEL: s_sext_inreg_i8:
5756; GFX9: ; %bb.0:
58- ; GFX9-NEXT: s_and_b32 s0, s0, 0xff
5957; GFX9-NEXT: s_lshl_b32 s0, s0, 3
6058; GFX9-NEXT: s_sext_i32_i8 s0, s0
6159; GFX9-NEXT: s_ashr_i32 s0, s0, 3
6260; GFX9-NEXT: ; return to shader part epilog
6361;
6462; GFX10PLUS-LABEL: s_sext_inreg_i8:
6563; GFX10PLUS: ; %bb.0:
66- ; GFX10PLUS-NEXT: s_and_b32 s0, s0, 0xff
6764; GFX10PLUS-NEXT: s_lshl_b32 s0, s0, 3
6865; GFX10PLUS-NEXT: s_sext_i32_i8 s0, s0
6966; GFX10PLUS-NEXT: s_ashr_i32 s0, s0, 3
@@ -81,23 +78,20 @@ define amdgpu_ps i8 @s_sext_inreg_i8_6(i8 inreg %value) {
8178;
8279; GFX8-LABEL: s_sext_inreg_i8_6:
8380; GFX8: ; %bb.0:
84- ; GFX8-NEXT: s_and_b32 s0, s0, 0xff
8581; GFX8-NEXT: s_lshl_b32 s0, s0, 6
8682; GFX8-NEXT: s_sext_i32_i8 s0, s0
8783; GFX8-NEXT: s_ashr_i32 s0, s0, 6
8884; GFX8-NEXT: ; return to shader part epilog
8985;
9086; GFX9-LABEL: s_sext_inreg_i8_6:
9187; GFX9: ; %bb.0:
92- ; GFX9-NEXT: s_and_b32 s0, s0, 0xff
9388; GFX9-NEXT: s_lshl_b32 s0, s0, 6
9489; GFX9-NEXT: s_sext_i32_i8 s0, s0
9590; GFX9-NEXT: s_ashr_i32 s0, s0, 6
9691; GFX9-NEXT: ; return to shader part epilog
9792;
9893; GFX10PLUS-LABEL: s_sext_inreg_i8_6:
9994; GFX10PLUS: ; %bb.0:
100- ; GFX10PLUS-NEXT: s_and_b32 s0, s0, 0xff
10195; GFX10PLUS-NEXT: s_lshl_b32 s0, s0, 6
10296; GFX10PLUS-NEXT: s_sext_i32_i8 s0, s0
10397; GFX10PLUS-NEXT: s_ashr_i32 s0, s0, 6
@@ -584,23 +578,20 @@ define amdgpu_ps i16 @s_sext_inreg_i16_9(i16 inreg %value) {
584578;
585579; GFX8-LABEL: s_sext_inreg_i16_9:
586580; GFX8: ; %bb.0:
587- ; GFX8-NEXT: s_and_b32 s0, s0, 0xffff
588581; GFX8-NEXT: s_lshl_b32 s0, s0, 9
589582; GFX8-NEXT: s_sext_i32_i16 s0, s0
590583; GFX8-NEXT: s_ashr_i32 s0, s0, 9
591584; GFX8-NEXT: ; return to shader part epilog
592585;
593586; GFX9-LABEL: s_sext_inreg_i16_9:
594587; GFX9: ; %bb.0:
595- ; GFX9-NEXT: s_and_b32 s0, s0, 0xffff
596588; GFX9-NEXT: s_lshl_b32 s0, s0, 9
597589; GFX9-NEXT: s_sext_i32_i16 s0, s0
598590; GFX9-NEXT: s_ashr_i32 s0, s0, 9
599591; GFX9-NEXT: ; return to shader part epilog
600592;
601593; GFX10PLUS-LABEL: s_sext_inreg_i16_9:
602594; GFX10PLUS: ; %bb.0:
603- ; GFX10PLUS-NEXT: s_and_b32 s0, s0, 0xffff
604595; GFX10PLUS-NEXT: s_lshl_b32 s0, s0, 9
605596; GFX10PLUS-NEXT: s_sext_i32_i16 s0, s0
606597; GFX10PLUS-NEXT: s_ashr_i32 s0, s0, 9
@@ -618,23 +609,20 @@ define amdgpu_ps i16 @s_sext_inreg_i16_15(i16 inreg %value) {
618609;
619610; GFX8-LABEL: s_sext_inreg_i16_15:
620611; GFX8: ; %bb.0:
621- ; GFX8-NEXT: s_and_b32 s0, s0, 0xffff
622612; GFX8-NEXT: s_lshl_b32 s0, s0, 15
623613; GFX8-NEXT: s_sext_i32_i16 s0, s0
624614; GFX8-NEXT: s_ashr_i32 s0, s0, 15
625615; GFX8-NEXT: ; return to shader part epilog
626616;
627617; GFX9-LABEL: s_sext_inreg_i16_15:
628618; GFX9: ; %bb.0:
629- ; GFX9-NEXT: s_and_b32 s0, s0, 0xffff
630619; GFX9-NEXT: s_lshl_b32 s0, s0, 15
631620; GFX9-NEXT: s_sext_i32_i16 s0, s0
632621; GFX9-NEXT: s_ashr_i32 s0, s0, 15
633622; GFX9-NEXT: ; return to shader part epilog
634623;
635624; GFX10PLUS-LABEL: s_sext_inreg_i16_15:
636625; GFX10PLUS: ; %bb.0:
637- ; GFX10PLUS-NEXT: s_and_b32 s0, s0, 0xffff
638626; GFX10PLUS-NEXT: s_lshl_b32 s0, s0, 15
639627; GFX10PLUS-NEXT: s_sext_i32_i16 s0, s0
640628; GFX10PLUS-NEXT: s_ashr_i32 s0, s0, 15
@@ -732,7 +720,6 @@ define amdgpu_ps i32 @s_sext_inreg_v2i16_11(<2 x i16> inreg %value) {
732720; GFX8-LABEL: s_sext_inreg_v2i16_11:
733721; GFX8: ; %bb.0:
734722; GFX8-NEXT: s_lshr_b32 s1, s0, 16
735- ; GFX8-NEXT: s_and_b32 s0, s0, 0xffff
736723; GFX8-NEXT: s_lshl_b32 s0, s0, 11
737724; GFX8-NEXT: s_lshl_b32 s1, s1, 11
738725; GFX8-NEXT: s_sext_i32_i16 s0, s0
@@ -867,9 +854,7 @@ define amdgpu_ps <2 x i32> @s_sext_inreg_v4i16_14(<4 x i16> inreg %value) {
867854; GFX8-LABEL: s_sext_inreg_v4i16_14:
868855; GFX8: ; %bb.0:
869856; GFX8-NEXT: s_lshr_b32 s2, s0, 16
870- ; GFX8-NEXT: s_and_b32 s0, s0, 0xffff
871857; GFX8-NEXT: s_lshr_b32 s3, s1, 16
872- ; GFX8-NEXT: s_and_b32 s1, s1, 0xffff
873858; GFX8-NEXT: s_lshl_b32 s0, s0, 14
874859; GFX8-NEXT: s_lshl_b32 s2, s2, 14
875860; GFX8-NEXT: s_lshl_b32 s1, s1, 14
@@ -1083,19 +1068,15 @@ define amdgpu_ps <4 x i32> @s_sext_inreg_v8i16_5(<8 x i16> inreg %value) {
10831068; GFX8-LABEL: s_sext_inreg_v8i16_5:
10841069; GFX8: ; %bb.0:
10851070; GFX8-NEXT: s_lshr_b32 s4, s0, 16
1086- ; GFX8-NEXT: s_and_b32 s0, s0, 0xffff
10871071; GFX8-NEXT: s_lshr_b32 s5, s1, 16
1088- ; GFX8-NEXT: s_and_b32 s1, s1, 0xffff
10891072; GFX8-NEXT: s_lshl_b32 s0, s0, 5
10901073; GFX8-NEXT: s_lshl_b32 s4, s4, 5
10911074; GFX8-NEXT: s_lshr_b32 s6, s2, 16
1092- ; GFX8-NEXT: s_and_b32 s2, s2, 0xffff
10931075; GFX8-NEXT: s_lshl_b32 s1, s1, 5
10941076; GFX8-NEXT: s_lshl_b32 s5, s5, 5
10951077; GFX8-NEXT: s_sext_i32_i16 s0, s0
10961078; GFX8-NEXT: s_sext_i32_i16 s4, s4
10971079; GFX8-NEXT: s_lshr_b32 s7, s3, 16
1098- ; GFX8-NEXT: s_and_b32 s3, s3, 0xffff
10991080; GFX8-NEXT: s_lshl_b32 s2, s2, 5
11001081; GFX8-NEXT: s_lshl_b32 s6, s6, 5
11011082; GFX8-NEXT: s_sext_i32_i16 s1, s1
0 commit comments