Skip to content

Commit c20695a

Browse files
committed
[InstCombine][X86] simplifyDemandedVectorEltsIntrinsic - add handling for PMULH/PMULHU/PMULHRS intrinsics
1 parent c2072d9 commit c20695a

File tree

4 files changed

+43
-45
lines changed

4 files changed

+43
-45
lines changed

llvm/lib/Target/X86/X86InstCombineIntrinsic.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3189,6 +3189,21 @@ std::optional<Value *> X86TTIImpl::simplifyDemandedVectorEltsIntrinsic(
31893189
break;
31903190
}
31913191

3192+
case Intrinsic::x86_sse2_pmulh_w:
3193+
case Intrinsic::x86_avx2_pmulh_w:
3194+
case Intrinsic::x86_avx512_pmulh_w_512:
3195+
case Intrinsic::x86_sse2_pmulhu_w:
3196+
case Intrinsic::x86_avx2_pmulhu_w:
3197+
case Intrinsic::x86_avx512_pmulhu_w_512:
3198+
case Intrinsic::x86_ssse3_pmul_hr_sw_128:
3199+
case Intrinsic::x86_avx2_pmul_hr_sw:
3200+
case Intrinsic::x86_avx512_pmul_hr_sw_512: {
3201+
simplifyAndSetOp(&II, 0, DemandedElts, UndefElts);
3202+
simplifyAndSetOp(&II, 1, DemandedElts, UndefElts2);
3203+
// NOTE: mulh(undef,undef) != undef.
3204+
break;
3205+
}
3206+
31923207
case Intrinsic::x86_sse2_packssdw_128:
31933208
case Intrinsic::x86_sse2_packsswb_128:
31943209
case Intrinsic::x86_sse2_packuswb_128:
@@ -3255,6 +3270,7 @@ std::optional<Value *> X86TTIImpl::simplifyDemandedVectorEltsIntrinsic(
32553270
APInt Op1UndefElts(InnerVWidth, 0);
32563271
simplifyAndSetOp(&II, 0, OpDemandedElts, Op0UndefElts);
32573272
simplifyAndSetOp(&II, 1, OpDemandedElts, Op1UndefElts);
3273+
// NOTE: madd(undef,undef) != undef.
32583274
break;
32593275
}
32603276

llvm/test/Transforms/InstCombine/X86/x86-pmulh.ll

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,9 @@ define <32 x i16> @fold_pmulh_512() {
154154

155155
define <8 x i16> @elts_pmulh_128(<8 x i16> %a0, <8 x i16> %a1) {
156156
; CHECK-LABEL: @elts_pmulh_128(
157-
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <8 x i16> [[A0:%.*]], <8 x i16> poison, <8 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2>
158-
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <8 x i16> [[A1:%.*]], <8 x i16> poison, <8 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
159-
; CHECK-NEXT: [[TMP3:%.*]] = call <8 x i16> @llvm.x86.sse2.pmulh.w(<8 x i16> [[TMP1]], <8 x i16> [[TMP2]])
160-
; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <8 x i16> [[TMP3]], <8 x i16> poison, <8 x i32> zeroinitializer
161-
; CHECK-NEXT: ret <8 x i16> [[TMP4]]
157+
; CHECK-NEXT: [[TMP1:%.*]] = call <8 x i16> @llvm.x86.sse2.pmulh.w(<8 x i16> [[A0:%.*]], <8 x i16> [[A1:%.*]])
158+
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <8 x i16> [[TMP1]], <8 x i16> poison, <8 x i32> zeroinitializer
159+
; CHECK-NEXT: ret <8 x i16> [[TMP2]]
162160
;
163161
%1 = shufflevector <8 x i16> %a0, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2>
164162
%2 = shufflevector <8 x i16> %a1, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
@@ -169,11 +167,9 @@ define <8 x i16> @elts_pmulh_128(<8 x i16> %a0, <8 x i16> %a1) {
169167

170168
define <16 x i16> @elts_pmulh_256(<16 x i16> %a0, <16 x i16> %a1) {
171169
; CHECK-LABEL: @elts_pmulh_256(
172-
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <16 x i16> [[A0:%.*]], <16 x i16> poison, <16 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
173-
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <16 x i16> [[A1:%.*]], <16 x i16> poison, <16 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
174-
; CHECK-NEXT: [[TMP3:%.*]] = call <16 x i16> @llvm.x86.avx2.pmulh.w(<16 x i16> [[TMP1]], <16 x i16> [[TMP2]])
175-
; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <16 x i16> [[TMP3]], <16 x i16> poison, <16 x i32> zeroinitializer
176-
; CHECK-NEXT: ret <16 x i16> [[TMP4]]
170+
; CHECK-NEXT: [[TMP1:%.*]] = call <16 x i16> @llvm.x86.avx2.pmulh.w(<16 x i16> [[A0:%.*]], <16 x i16> [[A1:%.*]])
171+
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <16 x i16> [[TMP1]], <16 x i16> poison, <16 x i32> zeroinitializer
172+
; CHECK-NEXT: ret <16 x i16> [[TMP2]]
177173
;
178174
%1 = shufflevector <16 x i16> %a0, <16 x i16> undef, <16 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
179175
%2 = shufflevector <16 x i16> %a1, <16 x i16> undef, <16 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
@@ -184,11 +180,9 @@ define <16 x i16> @elts_pmulh_256(<16 x i16> %a0, <16 x i16> %a1) {
184180

185181
define <32 x i16> @elts_pmulh_512(<32 x i16> %a0, <32 x i16> %a1) {
186182
; CHECK-LABEL: @elts_pmulh_512(
187-
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <32 x i16> [[A0:%.*]], <32 x i16> poison, <32 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
188-
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <32 x i16> [[A1:%.*]], <32 x i16> poison, <32 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
189-
; CHECK-NEXT: [[TMP3:%.*]] = call <32 x i16> @llvm.x86.avx512.pmulh.w.512(<32 x i16> [[TMP1]], <32 x i16> [[TMP2]])
190-
; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <32 x i16> [[TMP3]], <32 x i16> poison, <32 x i32> zeroinitializer
191-
; CHECK-NEXT: ret <32 x i16> [[TMP4]]
183+
; CHECK-NEXT: [[TMP1:%.*]] = call <32 x i16> @llvm.x86.avx512.pmulh.w.512(<32 x i16> [[A0:%.*]], <32 x i16> [[A1:%.*]])
184+
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <32 x i16> [[TMP1]], <32 x i16> poison, <32 x i32> zeroinitializer
185+
; CHECK-NEXT: ret <32 x i16> [[TMP2]]
192186
;
193187
%1 = shufflevector <32 x i16> %a0, <32 x i16> undef, <32 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
194188
%2 = shufflevector <32 x i16> %a1, <32 x i16> undef, <32 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>

llvm/test/Transforms/InstCombine/X86/x86-pmulhrs.ll

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,9 @@ define <32 x i16> @fold_pmulh_512() {
154154

155155
define <8 x i16> @elts_pmulh_128(<8 x i16> %a0, <8 x i16> %a1) {
156156
; CHECK-LABEL: @elts_pmulh_128(
157-
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <8 x i16> [[A0:%.*]], <8 x i16> poison, <8 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2>
158-
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <8 x i16> [[A1:%.*]], <8 x i16> poison, <8 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
159-
; CHECK-NEXT: [[TMP3:%.*]] = call <8 x i16> @llvm.x86.ssse3.pmul.hr.sw.128(<8 x i16> [[TMP1]], <8 x i16> [[TMP2]])
160-
; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <8 x i16> [[TMP3]], <8 x i16> poison, <8 x i32> zeroinitializer
161-
; CHECK-NEXT: ret <8 x i16> [[TMP4]]
157+
; CHECK-NEXT: [[TMP1:%.*]] = call <8 x i16> @llvm.x86.ssse3.pmul.hr.sw.128(<8 x i16> [[A0:%.*]], <8 x i16> [[A1:%.*]])
158+
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <8 x i16> [[TMP1]], <8 x i16> poison, <8 x i32> zeroinitializer
159+
; CHECK-NEXT: ret <8 x i16> [[TMP2]]
162160
;
163161
%1 = shufflevector <8 x i16> %a0, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2>
164162
%2 = shufflevector <8 x i16> %a1, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
@@ -169,11 +167,9 @@ define <8 x i16> @elts_pmulh_128(<8 x i16> %a0, <8 x i16> %a1) {
169167

170168
define <16 x i16> @elts_pmulh_256(<16 x i16> %a0, <16 x i16> %a1) {
171169
; CHECK-LABEL: @elts_pmulh_256(
172-
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <16 x i16> [[A0:%.*]], <16 x i16> poison, <16 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
173-
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <16 x i16> [[A1:%.*]], <16 x i16> poison, <16 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
174-
; CHECK-NEXT: [[TMP3:%.*]] = call <16 x i16> @llvm.x86.avx2.pmul.hr.sw(<16 x i16> [[TMP1]], <16 x i16> [[TMP2]])
175-
; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <16 x i16> [[TMP3]], <16 x i16> poison, <16 x i32> zeroinitializer
176-
; CHECK-NEXT: ret <16 x i16> [[TMP4]]
170+
; CHECK-NEXT: [[TMP1:%.*]] = call <16 x i16> @llvm.x86.avx2.pmul.hr.sw(<16 x i16> [[A0:%.*]], <16 x i16> [[A1:%.*]])
171+
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <16 x i16> [[TMP1]], <16 x i16> poison, <16 x i32> zeroinitializer
172+
; CHECK-NEXT: ret <16 x i16> [[TMP2]]
177173
;
178174
%1 = shufflevector <16 x i16> %a0, <16 x i16> undef, <16 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
179175
%2 = shufflevector <16 x i16> %a1, <16 x i16> undef, <16 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
@@ -184,11 +180,9 @@ define <16 x i16> @elts_pmulh_256(<16 x i16> %a0, <16 x i16> %a1) {
184180

185181
define <32 x i16> @elts_pmulh_512(<32 x i16> %a0, <32 x i16> %a1) {
186182
; CHECK-LABEL: @elts_pmulh_512(
187-
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <32 x i16> [[A0:%.*]], <32 x i16> poison, <32 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
188-
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <32 x i16> [[A1:%.*]], <32 x i16> poison, <32 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
189-
; CHECK-NEXT: [[TMP3:%.*]] = call <32 x i16> @llvm.x86.avx512.pmul.hr.sw.512(<32 x i16> [[TMP1]], <32 x i16> [[TMP2]])
190-
; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <32 x i16> [[TMP3]], <32 x i16> poison, <32 x i32> zeroinitializer
191-
; CHECK-NEXT: ret <32 x i16> [[TMP4]]
183+
; CHECK-NEXT: [[TMP1:%.*]] = call <32 x i16> @llvm.x86.avx512.pmul.hr.sw.512(<32 x i16> [[A0:%.*]], <32 x i16> [[A1:%.*]])
184+
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <32 x i16> [[TMP1]], <32 x i16> poison, <32 x i32> zeroinitializer
185+
; CHECK-NEXT: ret <32 x i16> [[TMP2]]
192186
;
193187
%1 = shufflevector <32 x i16> %a0, <32 x i16> undef, <32 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
194188
%2 = shufflevector <32 x i16> %a1, <32 x i16> undef, <32 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>

llvm/test/Transforms/InstCombine/X86/x86-pmulhu.ll

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,9 @@ define <32 x i16> @fold_pmulhu_512() {
154154

155155
define <8 x i16> @elts_pmulhu_128(<8 x i16> %a0, <8 x i16> %a1) {
156156
; CHECK-LABEL: @elts_pmulhu_128(
157-
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <8 x i16> [[A0:%.*]], <8 x i16> poison, <8 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2>
158-
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <8 x i16> [[A1:%.*]], <8 x i16> poison, <8 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
159-
; CHECK-NEXT: [[TMP3:%.*]] = call <8 x i16> @llvm.x86.sse2.pmulhu.w(<8 x i16> [[TMP1]], <8 x i16> [[TMP2]])
160-
; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <8 x i16> [[TMP3]], <8 x i16> poison, <8 x i32> zeroinitializer
161-
; CHECK-NEXT: ret <8 x i16> [[TMP4]]
157+
; CHECK-NEXT: [[TMP1:%.*]] = call <8 x i16> @llvm.x86.sse2.pmulhu.w(<8 x i16> [[A0:%.*]], <8 x i16> [[A1:%.*]])
158+
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <8 x i16> [[TMP1]], <8 x i16> poison, <8 x i32> zeroinitializer
159+
; CHECK-NEXT: ret <8 x i16> [[TMP2]]
162160
;
163161
%1 = shufflevector <8 x i16> %a0, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2>
164162
%2 = shufflevector <8 x i16> %a1, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
@@ -169,11 +167,9 @@ define <8 x i16> @elts_pmulhu_128(<8 x i16> %a0, <8 x i16> %a1) {
169167

170168
define <16 x i16> @elts_pmulhu_256(<16 x i16> %a0, <16 x i16> %a1) {
171169
; CHECK-LABEL: @elts_pmulhu_256(
172-
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <16 x i16> [[A0:%.*]], <16 x i16> poison, <16 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
173-
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <16 x i16> [[A1:%.*]], <16 x i16> poison, <16 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
174-
; CHECK-NEXT: [[TMP3:%.*]] = call <16 x i16> @llvm.x86.avx2.pmulhu.w(<16 x i16> [[TMP1]], <16 x i16> [[TMP2]])
175-
; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <16 x i16> [[TMP3]], <16 x i16> poison, <16 x i32> zeroinitializer
176-
; CHECK-NEXT: ret <16 x i16> [[TMP4]]
170+
; CHECK-NEXT: [[TMP1:%.*]] = call <16 x i16> @llvm.x86.avx2.pmulhu.w(<16 x i16> [[A0:%.*]], <16 x i16> [[A1:%.*]])
171+
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <16 x i16> [[TMP1]], <16 x i16> poison, <16 x i32> zeroinitializer
172+
; CHECK-NEXT: ret <16 x i16> [[TMP2]]
177173
;
178174
%1 = shufflevector <16 x i16> %a0, <16 x i16> undef, <16 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
179175
%2 = shufflevector <16 x i16> %a1, <16 x i16> undef, <16 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
@@ -184,11 +180,9 @@ define <16 x i16> @elts_pmulhu_256(<16 x i16> %a0, <16 x i16> %a1) {
184180

185181
define <32 x i16> @elts_pmulhu_512(<32 x i16> %a0, <32 x i16> %a1) {
186182
; CHECK-LABEL: @elts_pmulhu_512(
187-
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <32 x i16> [[A0:%.*]], <32 x i16> poison, <32 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
188-
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <32 x i16> [[A1:%.*]], <32 x i16> poison, <32 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
189-
; CHECK-NEXT: [[TMP3:%.*]] = call <32 x i16> @llvm.x86.avx512.pmulhu.w.512(<32 x i16> [[TMP1]], <32 x i16> [[TMP2]])
190-
; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <32 x i16> [[TMP3]], <32 x i16> poison, <32 x i32> zeroinitializer
191-
; CHECK-NEXT: ret <32 x i16> [[TMP4]]
183+
; CHECK-NEXT: [[TMP1:%.*]] = call <32 x i16> @llvm.x86.avx512.pmulhu.w.512(<32 x i16> [[A0:%.*]], <32 x i16> [[A1:%.*]])
184+
; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <32 x i16> [[TMP1]], <32 x i16> poison, <32 x i32> zeroinitializer
185+
; CHECK-NEXT: ret <32 x i16> [[TMP2]]
192186
;
193187
%1 = shufflevector <32 x i16> %a0, <32 x i16> undef, <32 x i32> <i32 0, i32 1, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
194188
%2 = shufflevector <32 x i16> %a1, <32 x i16> undef, <32 x i32> <i32 0, i32 1, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>

0 commit comments

Comments
 (0)