[llvm] r359454 - [X86][SSE] Add scalar horizontal add/sub tests for non-0/1 element extractions
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 29 07:26:27 PDT 2019
Author: rksimon
Date: Mon Apr 29 07:26:27 2019
New Revision: 359454
URL: http://llvm.org/viewvc/llvm-project?rev=359454&view=rev
Log:
[X86][SSE] Add scalar horizontal add/sub tests for non-0/1 element extractions
Modified:
llvm/trunk/test/CodeGen/X86/haddsub.ll
llvm/trunk/test/CodeGen/X86/phaddsub-extract.ll
Modified: llvm/trunk/test/CodeGen/X86/haddsub.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/haddsub.ll?rev=359454&r1=359453&r2=359454&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/haddsub.ll (original)
+++ llvm/trunk/test/CodeGen/X86/haddsub.ll Mon Apr 29 07:26:27 2019
@@ -589,25 +589,25 @@ define <2 x float> @haddps_v2f32(<4 x fl
; 128-bit vectors, float/double, fadd/fsub
-define float @extract_extract_v4f32_fadd_f32(<4 x float> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v4f32_fadd_f32:
+define float @extract_extract01_v4f32_fadd_f32(<4 x float> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v4f32_fadd_f32:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-SLOW-NEXT: addss %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v4f32_fadd_f32:
+; SSE3-FAST-LABEL: extract_extract01_v4f32_fadd_f32:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: haddps %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v4f32_fadd_f32:
+; AVX-SLOW-LABEL: extract_extract01_v4f32_fadd_f32:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-SLOW-NEXT: vaddss %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v4f32_fadd_f32:
+; AVX-FAST-LABEL: extract_extract01_v4f32_fadd_f32:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhaddps %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: retq
@@ -617,25 +617,46 @@ define float @extract_extract_v4f32_fadd
ret float %x01
}
-define float @extract_extract_v4f32_fadd_f32_commute(<4 x float> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v4f32_fadd_f32_commute:
+define float @extract_extract23_v4f32_fadd_f32(<4 x float> %x) {
+; SSE3-LABEL: extract_extract23_v4f32_fadd_f32:
+; SSE3: # %bb.0:
+; SSE3-NEXT: movaps %xmm0, %xmm1
+; SSE3-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
+; SSE3-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: addss %xmm1, %xmm0
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v4f32_fadd_f32:
+; AVX: # %bb.0:
+; AVX-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
+; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; AVX-NEXT: vaddss %xmm0, %xmm1, %xmm0
+; AVX-NEXT: retq
+ %x0 = extractelement <4 x float> %x, i32 2
+ %x1 = extractelement <4 x float> %x, i32 3
+ %x01 = fadd float %x0, %x1
+ ret float %x01
+}
+
+define float @extract_extract01_v4f32_fadd_f32_commute(<4 x float> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v4f32_fadd_f32_commute:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-SLOW-NEXT: addss %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v4f32_fadd_f32_commute:
+; SSE3-FAST-LABEL: extract_extract01_v4f32_fadd_f32_commute:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: haddps %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v4f32_fadd_f32_commute:
+; AVX-SLOW-LABEL: extract_extract01_v4f32_fadd_f32_commute:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-SLOW-NEXT: vaddss %xmm0, %xmm1, %xmm0
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v4f32_fadd_f32_commute:
+; AVX-FAST-LABEL: extract_extract01_v4f32_fadd_f32_commute:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhaddps %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: retq
@@ -645,8 +666,29 @@ define float @extract_extract_v4f32_fadd
ret float %x01
}
-define double @extract_extract_v2f64_fadd_f64(<2 x double> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v2f64_fadd_f64:
+define float @extract_extract23_v4f32_fadd_f32_commute(<4 x float> %x) {
+; SSE3-LABEL: extract_extract23_v4f32_fadd_f32_commute:
+; SSE3: # %bb.0:
+; SSE3-NEXT: movaps %xmm0, %xmm1
+; SSE3-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
+; SSE3-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: addss %xmm1, %xmm0
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v4f32_fadd_f32_commute:
+; AVX: # %bb.0:
+; AVX-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
+; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; AVX-NEXT: vaddss %xmm1, %xmm0, %xmm0
+; AVX-NEXT: retq
+ %x0 = extractelement <4 x float> %x, i32 2
+ %x1 = extractelement <4 x float> %x, i32 3
+ %x01 = fadd float %x1, %x0
+ ret float %x01
+}
+
+define double @extract_extract01_v2f64_fadd_f64(<2 x double> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v2f64_fadd_f64:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movapd %xmm0, %xmm1
; SSE3-SLOW-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
@@ -654,18 +696,18 @@ define double @extract_extract_v2f64_fad
; SSE3-SLOW-NEXT: movapd %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v2f64_fadd_f64:
+; SSE3-FAST-LABEL: extract_extract01_v2f64_fadd_f64:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: haddpd %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v2f64_fadd_f64:
+; AVX-SLOW-LABEL: extract_extract01_v2f64_fadd_f64:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
; AVX-SLOW-NEXT: vaddsd %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v2f64_fadd_f64:
+; AVX-FAST-LABEL: extract_extract01_v2f64_fadd_f64:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhaddpd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: retq
@@ -675,8 +717,8 @@ define double @extract_extract_v2f64_fad
ret double %x01
}
-define double @extract_extract_v2f64_fadd_f64_commute(<2 x double> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v2f64_fadd_f64_commute:
+define double @extract_extract01_v2f64_fadd_f64_commute(<2 x double> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v2f64_fadd_f64_commute:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movapd %xmm0, %xmm1
; SSE3-SLOW-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
@@ -684,18 +726,18 @@ define double @extract_extract_v2f64_fad
; SSE3-SLOW-NEXT: movapd %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v2f64_fadd_f64_commute:
+; SSE3-FAST-LABEL: extract_extract01_v2f64_fadd_f64_commute:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: haddpd %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v2f64_fadd_f64_commute:
+; AVX-SLOW-LABEL: extract_extract01_v2f64_fadd_f64_commute:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
; AVX-SLOW-NEXT: vaddsd %xmm0, %xmm1, %xmm0
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v2f64_fadd_f64_commute:
+; AVX-FAST-LABEL: extract_extract01_v2f64_fadd_f64_commute:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhaddpd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: retq
@@ -705,25 +747,25 @@ define double @extract_extract_v2f64_fad
ret double %x01
}
-define float @extract_extract_v4f32_fsub_f32(<4 x float> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v4f32_fsub_f32:
+define float @extract_extract01_v4f32_fsub_f32(<4 x float> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v4f32_fsub_f32:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-SLOW-NEXT: subss %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v4f32_fsub_f32:
+; SSE3-FAST-LABEL: extract_extract01_v4f32_fsub_f32:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: hsubps %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v4f32_fsub_f32:
+; AVX-SLOW-LABEL: extract_extract01_v4f32_fsub_f32:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-SLOW-NEXT: vsubss %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v4f32_fsub_f32:
+; AVX-FAST-LABEL: extract_extract01_v4f32_fsub_f32:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhsubps %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: retq
@@ -733,15 +775,37 @@ define float @extract_extract_v4f32_fsub
ret float %x01
}
-define float @extract_extract_v4f32_fsub_f32_commute(<4 x float> %x) {
-; SSE3-LABEL: extract_extract_v4f32_fsub_f32_commute:
+define float @extract_extract23_v4f32_fsub_f32(<4 x float> %x) {
+; SSE3-LABEL: extract_extract23_v4f32_fsub_f32:
+; SSE3: # %bb.0:
+; SSE3-NEXT: movaps %xmm0, %xmm1
+; SSE3-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
+; SSE3-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: subss %xmm0, %xmm1
+; SSE3-NEXT: movaps %xmm1, %xmm0
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v4f32_fsub_f32:
+; AVX: # %bb.0:
+; AVX-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
+; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; AVX-NEXT: vsubss %xmm0, %xmm1, %xmm0
+; AVX-NEXT: retq
+ %x0 = extractelement <4 x float> %x, i32 2
+ %x1 = extractelement <4 x float> %x, i32 3
+ %x01 = fsub float %x0, %x1
+ ret float %x01
+}
+
+define float @extract_extract01_v4f32_fsub_f32_commute(<4 x float> %x) {
+; SSE3-LABEL: extract_extract01_v4f32_fsub_f32_commute:
; SSE3: # %bb.0:
; SSE3-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-NEXT: subss %xmm0, %xmm1
; SSE3-NEXT: movaps %xmm1, %xmm0
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v4f32_fsub_f32_commute:
+; AVX-LABEL: extract_extract01_v4f32_fsub_f32_commute:
; AVX: # %bb.0:
; AVX-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-NEXT: vsubss %xmm0, %xmm1, %xmm0
@@ -752,26 +816,47 @@ define float @extract_extract_v4f32_fsub
ret float %x01
}
-define double @extract_extract_v2f64_fsub_f64(<2 x double> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v2f64_fsub_f64:
+define float @extract_extract23_v4f32_fsub_f32_commute(<4 x float> %x) {
+; SSE3-LABEL: extract_extract23_v4f32_fsub_f32_commute:
+; SSE3: # %bb.0:
+; SSE3-NEXT: movaps %xmm0, %xmm1
+; SSE3-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
+; SSE3-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: subss %xmm1, %xmm0
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v4f32_fsub_f32_commute:
+; AVX: # %bb.0:
+; AVX-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
+; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; AVX-NEXT: vsubss %xmm1, %xmm0, %xmm0
+; AVX-NEXT: retq
+ %x0 = extractelement <4 x float> %x, i32 2
+ %x1 = extractelement <4 x float> %x, i32 3
+ %x01 = fsub float %x1, %x0
+ ret float %x01
+}
+
+define double @extract_extract01_v2f64_fsub_f64(<2 x double> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v2f64_fsub_f64:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movapd %xmm0, %xmm1
; SSE3-SLOW-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
; SSE3-SLOW-NEXT: subsd %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v2f64_fsub_f64:
+; SSE3-FAST-LABEL: extract_extract01_v2f64_fsub_f64:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: hsubpd %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v2f64_fsub_f64:
+; AVX-SLOW-LABEL: extract_extract01_v2f64_fsub_f64:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
; AVX-SLOW-NEXT: vsubsd %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v2f64_fsub_f64:
+; AVX-FAST-LABEL: extract_extract01_v2f64_fsub_f64:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhsubpd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: retq
@@ -781,8 +866,8 @@ define double @extract_extract_v2f64_fsu
ret double %x01
}
-define double @extract_extract_v2f64_fsub_f64_commute(<2 x double> %x) {
-; SSE3-LABEL: extract_extract_v2f64_fsub_f64_commute:
+define double @extract_extract01_v2f64_fsub_f64_commute(<2 x double> %x) {
+; SSE3-LABEL: extract_extract01_v2f64_fsub_f64_commute:
; SSE3: # %bb.0:
; SSE3-NEXT: movapd %xmm0, %xmm1
; SSE3-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
@@ -790,7 +875,7 @@ define double @extract_extract_v2f64_fsu
; SSE3-NEXT: movapd %xmm1, %xmm0
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v2f64_fsub_f64_commute:
+; AVX-LABEL: extract_extract01_v2f64_fsub_f64_commute:
; AVX: # %bb.0:
; AVX-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
; AVX-NEXT: vsubsd %xmm0, %xmm1, %xmm0
@@ -803,26 +888,26 @@ define double @extract_extract_v2f64_fsu
; 256-bit vectors, float/double, fadd/fsub
-define float @extract_extract_v8f32_fadd_f32(<8 x float> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v8f32_fadd_f32:
+define float @extract_extract01_v8f32_fadd_f32(<8 x float> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v8f32_fadd_f32:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-SLOW-NEXT: addss %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v8f32_fadd_f32:
+; SSE3-FAST-LABEL: extract_extract01_v8f32_fadd_f32:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: haddps %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v8f32_fadd_f32:
+; AVX-SLOW-LABEL: extract_extract01_v8f32_fadd_f32:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-SLOW-NEXT: vaddss %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v8f32_fadd_f32:
+; AVX-FAST-LABEL: extract_extract01_v8f32_fadd_f32:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhaddps %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vzeroupper
@@ -833,26 +918,48 @@ define float @extract_extract_v8f32_fadd
ret float %x01
}
-define float @extract_extract_v8f32_fadd_f32_commute(<8 x float> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v8f32_fadd_f32_commute:
+define float @extract_extract23_v8f32_fadd_f32(<8 x float> %x) {
+; SSE3-LABEL: extract_extract23_v8f32_fadd_f32:
+; SSE3: # %bb.0:
+; SSE3-NEXT: movaps %xmm0, %xmm1
+; SSE3-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
+; SSE3-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: addss %xmm1, %xmm0
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v8f32_fadd_f32:
+; AVX: # %bb.0:
+; AVX-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
+; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; AVX-NEXT: vaddss %xmm0, %xmm1, %xmm0
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+ %x0 = extractelement <8 x float> %x, i32 2
+ %x1 = extractelement <8 x float> %x, i32 3
+ %x01 = fadd float %x0, %x1
+ ret float %x01
+}
+
+define float @extract_extract01_v8f32_fadd_f32_commute(<8 x float> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v8f32_fadd_f32_commute:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-SLOW-NEXT: addss %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v8f32_fadd_f32_commute:
+; SSE3-FAST-LABEL: extract_extract01_v8f32_fadd_f32_commute:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: haddps %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v8f32_fadd_f32_commute:
+; AVX-SLOW-LABEL: extract_extract01_v8f32_fadd_f32_commute:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-SLOW-NEXT: vaddss %xmm0, %xmm1, %xmm0
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v8f32_fadd_f32_commute:
+; AVX-FAST-LABEL: extract_extract01_v8f32_fadd_f32_commute:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhaddps %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vzeroupper
@@ -863,8 +970,30 @@ define float @extract_extract_v8f32_fadd
ret float %x01
}
-define double @extract_extract_v4f64_fadd_f64(<4 x double> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v4f64_fadd_f64:
+define float @extract_extract23_v8f32_fadd_f32_commute(<8 x float> %x) {
+; SSE3-LABEL: extract_extract23_v8f32_fadd_f32_commute:
+; SSE3: # %bb.0:
+; SSE3-NEXT: movaps %xmm0, %xmm1
+; SSE3-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
+; SSE3-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: addss %xmm1, %xmm0
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v8f32_fadd_f32_commute:
+; AVX: # %bb.0:
+; AVX-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
+; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; AVX-NEXT: vaddss %xmm1, %xmm0, %xmm0
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+ %x0 = extractelement <8 x float> %x, i32 2
+ %x1 = extractelement <8 x float> %x, i32 3
+ %x01 = fadd float %x1, %x0
+ ret float %x01
+}
+
+define double @extract_extract01_v4f64_fadd_f64(<4 x double> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v4f64_fadd_f64:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movapd %xmm0, %xmm1
; SSE3-SLOW-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
@@ -872,19 +1001,19 @@ define double @extract_extract_v4f64_fad
; SSE3-SLOW-NEXT: movapd %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v4f64_fadd_f64:
+; SSE3-FAST-LABEL: extract_extract01_v4f64_fadd_f64:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: haddpd %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v4f64_fadd_f64:
+; AVX-SLOW-LABEL: extract_extract01_v4f64_fadd_f64:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
; AVX-SLOW-NEXT: vaddsd %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v4f64_fadd_f64:
+; AVX-FAST-LABEL: extract_extract01_v4f64_fadd_f64:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhaddpd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vzeroupper
@@ -895,8 +1024,8 @@ define double @extract_extract_v4f64_fad
ret double %x01
}
-define double @extract_extract_v4f64_fadd_f64_commute(<4 x double> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v4f64_fadd_f64_commute:
+define double @extract_extract01_v4f64_fadd_f64_commute(<4 x double> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v4f64_fadd_f64_commute:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movapd %xmm0, %xmm1
; SSE3-SLOW-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
@@ -904,19 +1033,19 @@ define double @extract_extract_v4f64_fad
; SSE3-SLOW-NEXT: movapd %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v4f64_fadd_f64_commute:
+; SSE3-FAST-LABEL: extract_extract01_v4f64_fadd_f64_commute:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: haddpd %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v4f64_fadd_f64_commute:
+; AVX-SLOW-LABEL: extract_extract01_v4f64_fadd_f64_commute:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
; AVX-SLOW-NEXT: vaddsd %xmm0, %xmm1, %xmm0
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v4f64_fadd_f64_commute:
+; AVX-FAST-LABEL: extract_extract01_v4f64_fadd_f64_commute:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhaddpd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vzeroupper
@@ -927,26 +1056,26 @@ define double @extract_extract_v4f64_fad
ret double %x01
}
-define float @extract_extract_v8f32_fsub_f32(<8 x float> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v8f32_fsub_f32:
+define float @extract_extract01_v8f32_fsub_f32(<8 x float> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v8f32_fsub_f32:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-SLOW-NEXT: subss %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v8f32_fsub_f32:
+; SSE3-FAST-LABEL: extract_extract01_v8f32_fsub_f32:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: hsubps %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v8f32_fsub_f32:
+; AVX-SLOW-LABEL: extract_extract01_v8f32_fsub_f32:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-SLOW-NEXT: vsubss %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v8f32_fsub_f32:
+; AVX-FAST-LABEL: extract_extract01_v8f32_fsub_f32:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhsubps %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vzeroupper
@@ -957,17 +1086,40 @@ define float @extract_extract_v8f32_fsub
ret float %x01
}
+define float @extract_extract23_v8f32_fsub_f32(<8 x float> %x) {
+; SSE3-LABEL: extract_extract23_v8f32_fsub_f32:
+; SSE3: # %bb.0:
+; SSE3-NEXT: movaps %xmm0, %xmm1
+; SSE3-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
+; SSE3-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: subss %xmm0, %xmm1
+; SSE3-NEXT: movaps %xmm1, %xmm0
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v8f32_fsub_f32:
+; AVX: # %bb.0:
+; AVX-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
+; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; AVX-NEXT: vsubss %xmm0, %xmm1, %xmm0
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+ %x0 = extractelement <8 x float> %x, i32 2
+ %x1 = extractelement <8 x float> %x, i32 3
+ %x01 = fsub float %x0, %x1
+ ret float %x01
+}
+
; Negative test...or get hoppy and negate?
-define float @extract_extract_v8f32_fsub_f32_commute(<8 x float> %x) {
-; SSE3-LABEL: extract_extract_v8f32_fsub_f32_commute:
+define float @extract_extract01_v8f32_fsub_f32_commute(<8 x float> %x) {
+; SSE3-LABEL: extract_extract01_v8f32_fsub_f32_commute:
; SSE3: # %bb.0:
; SSE3-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-NEXT: subss %xmm0, %xmm1
; SSE3-NEXT: movaps %xmm1, %xmm0
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v8f32_fsub_f32_commute:
+; AVX-LABEL: extract_extract01_v8f32_fsub_f32_commute:
; AVX: # %bb.0:
; AVX-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-NEXT: vsubss %xmm0, %xmm1, %xmm0
@@ -979,27 +1131,27 @@ define float @extract_extract_v8f32_fsub
ret float %x01
}
-define double @extract_extract_v4f64_fsub_f64(<4 x double> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v4f64_fsub_f64:
+define double @extract_extract01_v4f64_fsub_f64(<4 x double> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v4f64_fsub_f64:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movapd %xmm0, %xmm1
; SSE3-SLOW-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
; SSE3-SLOW-NEXT: subsd %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v4f64_fsub_f64:
+; SSE3-FAST-LABEL: extract_extract01_v4f64_fsub_f64:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: hsubpd %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v4f64_fsub_f64:
+; AVX-SLOW-LABEL: extract_extract01_v4f64_fsub_f64:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
; AVX-SLOW-NEXT: vsubsd %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v4f64_fsub_f64:
+; AVX-FAST-LABEL: extract_extract01_v4f64_fsub_f64:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhsubpd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vzeroupper
@@ -1012,8 +1164,8 @@ define double @extract_extract_v4f64_fsu
; Negative test...or get hoppy and negate?
-define double @extract_extract_v4f64_fsub_f64_commute(<4 x double> %x) {
-; SSE3-LABEL: extract_extract_v4f64_fsub_f64_commute:
+define double @extract_extract01_v4f64_fsub_f64_commute(<4 x double> %x) {
+; SSE3-LABEL: extract_extract01_v4f64_fsub_f64_commute:
; SSE3: # %bb.0:
; SSE3-NEXT: movapd %xmm0, %xmm1
; SSE3-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
@@ -1021,7 +1173,7 @@ define double @extract_extract_v4f64_fsu
; SSE3-NEXT: movapd %xmm1, %xmm0
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v4f64_fsub_f64_commute:
+; AVX-LABEL: extract_extract01_v4f64_fsub_f64_commute:
; AVX: # %bb.0:
; AVX-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
; AVX-NEXT: vsubsd %xmm0, %xmm1, %xmm0
@@ -1035,26 +1187,26 @@ define double @extract_extract_v4f64_fsu
; 512-bit vectors, float/double, fadd/fsub
-define float @extract_extract_v16f32_fadd_f32(<16 x float> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v16f32_fadd_f32:
+define float @extract_extract01_v16f32_fadd_f32(<16 x float> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v16f32_fadd_f32:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-SLOW-NEXT: addss %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v16f32_fadd_f32:
+; SSE3-FAST-LABEL: extract_extract01_v16f32_fadd_f32:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: haddps %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v16f32_fadd_f32:
+; AVX-SLOW-LABEL: extract_extract01_v16f32_fadd_f32:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-SLOW-NEXT: vaddss %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v16f32_fadd_f32:
+; AVX-FAST-LABEL: extract_extract01_v16f32_fadd_f32:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhaddps %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vzeroupper
@@ -1065,26 +1217,26 @@ define float @extract_extract_v16f32_fad
ret float %x01
}
-define float @extract_extract_v16f32_fadd_f32_commute(<16 x float> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v16f32_fadd_f32_commute:
+define float @extract_extract01_v16f32_fadd_f32_commute(<16 x float> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v16f32_fadd_f32_commute:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-SLOW-NEXT: addss %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v16f32_fadd_f32_commute:
+; SSE3-FAST-LABEL: extract_extract01_v16f32_fadd_f32_commute:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: haddps %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v16f32_fadd_f32_commute:
+; AVX-SLOW-LABEL: extract_extract01_v16f32_fadd_f32_commute:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-SLOW-NEXT: vaddss %xmm0, %xmm1, %xmm0
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v16f32_fadd_f32_commute:
+; AVX-FAST-LABEL: extract_extract01_v16f32_fadd_f32_commute:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhaddps %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vzeroupper
@@ -1095,8 +1247,8 @@ define float @extract_extract_v16f32_fad
ret float %x01
}
-define double @extract_extract_v8f64_fadd_f64(<8 x double> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v8f64_fadd_f64:
+define double @extract_extract01_v8f64_fadd_f64(<8 x double> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v8f64_fadd_f64:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movapd %xmm0, %xmm1
; SSE3-SLOW-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
@@ -1104,19 +1256,19 @@ define double @extract_extract_v8f64_fad
; SSE3-SLOW-NEXT: movapd %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v8f64_fadd_f64:
+; SSE3-FAST-LABEL: extract_extract01_v8f64_fadd_f64:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: haddpd %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v8f64_fadd_f64:
+; AVX-SLOW-LABEL: extract_extract01_v8f64_fadd_f64:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
; AVX-SLOW-NEXT: vaddsd %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v8f64_fadd_f64:
+; AVX-FAST-LABEL: extract_extract01_v8f64_fadd_f64:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhaddpd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vzeroupper
@@ -1127,8 +1279,8 @@ define double @extract_extract_v8f64_fad
ret double %x01
}
-define double @extract_extract_v8f64_fadd_f64_commute(<8 x double> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v8f64_fadd_f64_commute:
+define double @extract_extract01_v8f64_fadd_f64_commute(<8 x double> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v8f64_fadd_f64_commute:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movapd %xmm0, %xmm1
; SSE3-SLOW-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
@@ -1136,19 +1288,19 @@ define double @extract_extract_v8f64_fad
; SSE3-SLOW-NEXT: movapd %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v8f64_fadd_f64_commute:
+; SSE3-FAST-LABEL: extract_extract01_v8f64_fadd_f64_commute:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: haddpd %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v8f64_fadd_f64_commute:
+; AVX-SLOW-LABEL: extract_extract01_v8f64_fadd_f64_commute:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
; AVX-SLOW-NEXT: vaddsd %xmm0, %xmm1, %xmm0
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v8f64_fadd_f64_commute:
+; AVX-FAST-LABEL: extract_extract01_v8f64_fadd_f64_commute:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhaddpd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vzeroupper
@@ -1159,26 +1311,26 @@ define double @extract_extract_v8f64_fad
ret double %x01
}
-define float @extract_extract_v16f32_fsub_f32(<16 x float> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v16f32_fsub_f32:
+define float @extract_extract01_v16f32_fsub_f32(<16 x float> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v16f32_fsub_f32:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-SLOW-NEXT: subss %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v16f32_fsub_f32:
+; SSE3-FAST-LABEL: extract_extract01_v16f32_fsub_f32:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: hsubps %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v16f32_fsub_f32:
+; AVX-SLOW-LABEL: extract_extract01_v16f32_fsub_f32:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-SLOW-NEXT: vsubss %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v16f32_fsub_f32:
+; AVX-FAST-LABEL: extract_extract01_v16f32_fsub_f32:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhsubps %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vzeroupper
@@ -1189,15 +1341,15 @@ define float @extract_extract_v16f32_fsu
ret float %x01
}
-define float @extract_extract_v16f32_fsub_f32_commute(<16 x float> %x) {
-; SSE3-LABEL: extract_extract_v16f32_fsub_f32_commute:
+define float @extract_extract01_v16f32_fsub_f32_commute(<16 x float> %x) {
+; SSE3-LABEL: extract_extract01_v16f32_fsub_f32_commute:
; SSE3: # %bb.0:
; SSE3-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-NEXT: subss %xmm0, %xmm1
; SSE3-NEXT: movaps %xmm1, %xmm0
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v16f32_fsub_f32_commute:
+; AVX-LABEL: extract_extract01_v16f32_fsub_f32_commute:
; AVX: # %bb.0:
; AVX-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-NEXT: vsubss %xmm0, %xmm1, %xmm0
@@ -1209,27 +1361,27 @@ define float @extract_extract_v16f32_fsu
ret float %x01
}
-define double @extract_extract_v8f64_fsub_f64(<8 x double> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v8f64_fsub_f64:
+define double @extract_extract01_v8f64_fsub_f64(<8 x double> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v8f64_fsub_f64:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movapd %xmm0, %xmm1
; SSE3-SLOW-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
; SSE3-SLOW-NEXT: subsd %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v8f64_fsub_f64:
+; SSE3-FAST-LABEL: extract_extract01_v8f64_fsub_f64:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: hsubpd %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v8f64_fsub_f64:
+; AVX-SLOW-LABEL: extract_extract01_v8f64_fsub_f64:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
; AVX-SLOW-NEXT: vsubsd %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v8f64_fsub_f64:
+; AVX-FAST-LABEL: extract_extract01_v8f64_fsub_f64:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vhsubpd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vzeroupper
@@ -1240,8 +1392,8 @@ define double @extract_extract_v8f64_fsu
ret double %x01
}
-define double @extract_extract_v8f64_fsub_f64_commute(<8 x double> %x) {
-; SSE3-LABEL: extract_extract_v8f64_fsub_f64_commute:
+define double @extract_extract01_v8f64_fsub_f64_commute(<8 x double> %x) {
+; SSE3-LABEL: extract_extract01_v8f64_fsub_f64_commute:
; SSE3: # %bb.0:
; SSE3-NEXT: movapd %xmm0, %xmm1
; SSE3-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
@@ -1249,7 +1401,7 @@ define double @extract_extract_v8f64_fsu
; SSE3-NEXT: movapd %xmm1, %xmm0
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v8f64_fsub_f64_commute:
+; AVX-LABEL: extract_extract01_v8f64_fsub_f64_commute:
; AVX: # %bb.0:
; AVX-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
; AVX-NEXT: vsubsd %xmm0, %xmm1, %xmm0
@@ -1263,28 +1415,28 @@ define double @extract_extract_v8f64_fsu
; Check output when 1 or both extracts have extra uses.
-define float @extract_extract_v4f32_fadd_f32_uses1(<4 x float> %x, float* %p) {
-; SSE3-SLOW-LABEL: extract_extract_v4f32_fadd_f32_uses1:
+define float @extract_extract01_v4f32_fadd_f32_uses1(<4 x float> %x, float* %p) {
+; SSE3-SLOW-LABEL: extract_extract01_v4f32_fadd_f32_uses1:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movss %xmm0, (%rdi)
; SSE3-SLOW-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-SLOW-NEXT: addss %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v4f32_fadd_f32_uses1:
+; SSE3-FAST-LABEL: extract_extract01_v4f32_fadd_f32_uses1:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: movss %xmm0, (%rdi)
; SSE3-FAST-NEXT: haddps %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v4f32_fadd_f32_uses1:
+; AVX-SLOW-LABEL: extract_extract01_v4f32_fadd_f32_uses1:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovss %xmm0, (%rdi)
; AVX-SLOW-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-SLOW-NEXT: vaddss %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v4f32_fadd_f32_uses1:
+; AVX-FAST-LABEL: extract_extract01_v4f32_fadd_f32_uses1:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vmovss %xmm0, (%rdi)
; AVX-FAST-NEXT: vhaddps %xmm0, %xmm0, %xmm0
@@ -1296,29 +1448,29 @@ define float @extract_extract_v4f32_fadd
ret float %x01
}
-define float @extract_extract_v4f32_fadd_f32_uses2(<4 x float> %x, float* %p) {
-; SSE3-SLOW-LABEL: extract_extract_v4f32_fadd_f32_uses2:
+define float @extract_extract01_v4f32_fadd_f32_uses2(<4 x float> %x, float* %p) {
+; SSE3-SLOW-LABEL: extract_extract01_v4f32_fadd_f32_uses2:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-SLOW-NEXT: movss %xmm1, (%rdi)
; SSE3-SLOW-NEXT: addss %xmm1, %xmm0
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v4f32_fadd_f32_uses2:
+; SSE3-FAST-LABEL: extract_extract01_v4f32_fadd_f32_uses2:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; SSE3-FAST-NEXT: movss %xmm1, (%rdi)
; SSE3-FAST-NEXT: haddps %xmm0, %xmm0
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v4f32_fadd_f32_uses2:
+; AVX-SLOW-LABEL: extract_extract01_v4f32_fadd_f32_uses2:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
; AVX-SLOW-NEXT: vmovss %xmm1, (%rdi)
; AVX-SLOW-NEXT: vaddss %xmm1, %xmm0, %xmm0
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v4f32_fadd_f32_uses2:
+; AVX-FAST-LABEL: extract_extract01_v4f32_fadd_f32_uses2:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vextractps $1, %xmm0, (%rdi)
; AVX-FAST-NEXT: vhaddps %xmm0, %xmm0, %xmm0
@@ -1330,8 +1482,8 @@ define float @extract_extract_v4f32_fadd
ret float %x01
}
-define float @extract_extract_v4f32_fadd_f32_uses3(<4 x float> %x, float* %p1, float* %p2) {
-; SSE3-LABEL: extract_extract_v4f32_fadd_f32_uses3:
+define float @extract_extract01_v4f32_fadd_f32_uses3(<4 x float> %x, float* %p1, float* %p2) {
+; SSE3-LABEL: extract_extract01_v4f32_fadd_f32_uses3:
; SSE3: # %bb.0:
; SSE3-NEXT: movss %xmm0, (%rdi)
; SSE3-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
@@ -1339,7 +1491,7 @@ define float @extract_extract_v4f32_fadd
; SSE3-NEXT: addss %xmm1, %xmm0
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v4f32_fadd_f32_uses3:
+; AVX-LABEL: extract_extract01_v4f32_fadd_f32_uses3:
; AVX: # %bb.0:
; AVX-NEXT: vmovss %xmm0, (%rdi)
; AVX-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
Modified: llvm/trunk/test/CodeGen/X86/phaddsub-extract.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/phaddsub-extract.ll?rev=359454&r1=359453&r2=359454&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/phaddsub-extract.ll (original)
+++ llvm/trunk/test/CodeGen/X86/phaddsub-extract.ll Mon Apr 29 07:26:27 2019
@@ -10,8 +10,8 @@
; 128-bit vectors, 16/32-bit, add/sub
-define i32 @extract_extract_v4i32_add_i32(<4 x i32> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v4i32_add_i32:
+define i32 @extract_extract01_v4i32_add_i32(<4 x i32> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v4i32_add_i32:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
@@ -19,20 +19,20 @@ define i32 @extract_extract_v4i32_add_i3
; SSE3-SLOW-NEXT: addl %ecx, %eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v4i32_add_i32:
+; SSE3-FAST-LABEL: extract_extract01_v4i32_add_i32:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phaddd %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v4i32_add_i32:
+; AVX-SLOW-LABEL: extract_extract01_v4i32_add_i32:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vpextrd $1, %xmm0, %eax
; AVX-SLOW-NEXT: addl %ecx, %eax
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v4i32_add_i32:
+; AVX-FAST-LABEL: extract_extract01_v4i32_add_i32:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphaddd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -43,8 +43,30 @@ define i32 @extract_extract_v4i32_add_i3
ret i32 %x01
}
-define i32 @extract_extract_v4i32_add_i32_commute(<4 x i32> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v4i32_add_i32_commute:
+define i32 @extract_extract23_v4i32_add_i32(<4 x i32> %x) {
+; SSE3-LABEL: extract_extract23_v4i32_add_i32:
+; SSE3: # %bb.0:
+; SSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,0,1]
+; SSE3-NEXT: movd %xmm1, %ecx
+; SSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: movd %xmm0, %eax
+; SSE3-NEXT: addl %ecx, %eax
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v4i32_add_i32:
+; AVX: # %bb.0:
+; AVX-NEXT: vextractps $2, %xmm0, %ecx
+; AVX-NEXT: vextractps $3, %xmm0, %eax
+; AVX-NEXT: addl %ecx, %eax
+; AVX-NEXT: retq
+ %x0 = extractelement <4 x i32> %x, i32 2
+ %x1 = extractelement <4 x i32> %x, i32 3
+ %x01 = add i32 %x0, %x1
+ ret i32 %x01
+}
+
+define i32 @extract_extract01_v4i32_add_i32_commute(<4 x i32> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v4i32_add_i32_commute:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
@@ -52,20 +74,20 @@ define i32 @extract_extract_v4i32_add_i3
; SSE3-SLOW-NEXT: addl %ecx, %eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v4i32_add_i32_commute:
+; SSE3-FAST-LABEL: extract_extract01_v4i32_add_i32_commute:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phaddd %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v4i32_add_i32_commute:
+; AVX-SLOW-LABEL: extract_extract01_v4i32_add_i32_commute:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vpextrd $1, %xmm0, %eax
; AVX-SLOW-NEXT: addl %ecx, %eax
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v4i32_add_i32_commute:
+; AVX-FAST-LABEL: extract_extract01_v4i32_add_i32_commute:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphaddd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -76,8 +98,30 @@ define i32 @extract_extract_v4i32_add_i3
ret i32 %x01
}
-define i16 @extract_extract_v8i16_add_i16(<8 x i16> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v8i16_add_i16:
+define i32 @extract_extract23_v4i32_add_i32_commute(<4 x i32> %x) {
+; SSE3-LABEL: extract_extract23_v4i32_add_i32_commute:
+; SSE3: # %bb.0:
+; SSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,0,1]
+; SSE3-NEXT: movd %xmm1, %ecx
+; SSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: movd %xmm0, %eax
+; SSE3-NEXT: addl %ecx, %eax
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v4i32_add_i32_commute:
+; AVX: # %bb.0:
+; AVX-NEXT: vextractps $2, %xmm0, %ecx
+; AVX-NEXT: vextractps $3, %xmm0, %eax
+; AVX-NEXT: addl %ecx, %eax
+; AVX-NEXT: retq
+ %x0 = extractelement <4 x i32> %x, i32 2
+ %x1 = extractelement <4 x i32> %x, i32 3
+ %x01 = add i32 %x1, %x0
+ ret i32 %x01
+}
+
+define i16 @extract_extract01_v8i16_add_i16(<8 x i16> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v8i16_add_i16:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: pextrw $1, %xmm0, %eax
@@ -85,14 +129,14 @@ define i16 @extract_extract_v8i16_add_i1
; SSE3-SLOW-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v8i16_add_i16:
+; SSE3-FAST-LABEL: extract_extract01_v8i16_add_i16:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phaddw %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v8i16_add_i16:
+; AVX-SLOW-LABEL: extract_extract01_v8i16_add_i16:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vpextrw $1, %xmm0, %eax
@@ -100,7 +144,7 @@ define i16 @extract_extract_v8i16_add_i1
; AVX-SLOW-NEXT: # kill: def $ax killed $ax killed $eax
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v8i16_add_i16:
+; AVX-FAST-LABEL: extract_extract01_v8i16_add_i16:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphaddw %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -112,8 +156,30 @@ define i16 @extract_extract_v8i16_add_i1
ret i16 %x01
}
-define i16 @extract_extract_v8i16_add_i16_commute(<8 x i16> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v8i16_add_i16_commute:
+define i16 @extract_extract45_v8i16_add_i16(<8 x i16> %x) {
+; SSE3-LABEL: extract_extract45_v8i16_add_i16:
+; SSE3: # %bb.0:
+; SSE3-NEXT: pextrw $4, %xmm0, %ecx
+; SSE3-NEXT: pextrw $5, %xmm0, %eax
+; SSE3-NEXT: addl %ecx, %eax
+; SSE3-NEXT: # kill: def $ax killed $ax killed $eax
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract45_v8i16_add_i16:
+; AVX: # %bb.0:
+; AVX-NEXT: vpextrw $4, %xmm0, %ecx
+; AVX-NEXT: vpextrw $5, %xmm0, %eax
+; AVX-NEXT: addl %ecx, %eax
+; AVX-NEXT: # kill: def $ax killed $ax killed $eax
+; AVX-NEXT: retq
+ %x0 = extractelement <8 x i16> %x, i32 4
+ %x1 = extractelement <8 x i16> %x, i32 5
+ %x01 = add i16 %x0, %x1
+ ret i16 %x01
+}
+
+define i16 @extract_extract01_v8i16_add_i16_commute(<8 x i16> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v8i16_add_i16_commute:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: pextrw $1, %xmm0, %eax
@@ -121,14 +187,14 @@ define i16 @extract_extract_v8i16_add_i1
; SSE3-SLOW-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v8i16_add_i16_commute:
+; SSE3-FAST-LABEL: extract_extract01_v8i16_add_i16_commute:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phaddw %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v8i16_add_i16_commute:
+; AVX-SLOW-LABEL: extract_extract01_v8i16_add_i16_commute:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vpextrw $1, %xmm0, %eax
@@ -136,7 +202,7 @@ define i16 @extract_extract_v8i16_add_i1
; AVX-SLOW-NEXT: # kill: def $ax killed $ax killed $eax
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v8i16_add_i16_commute:
+; AVX-FAST-LABEL: extract_extract01_v8i16_add_i16_commute:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphaddw %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -148,8 +214,30 @@ define i16 @extract_extract_v8i16_add_i1
ret i16 %x01
}
-define i32 @extract_extract_v4i32_sub_i32(<4 x i32> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v4i32_sub_i32:
+define i16 @extract_extract45_v8i16_add_i16_commute(<8 x i16> %x) {
+; SSE3-LABEL: extract_extract45_v8i16_add_i16_commute:
+; SSE3: # %bb.0:
+; SSE3-NEXT: pextrw $4, %xmm0, %ecx
+; SSE3-NEXT: pextrw $5, %xmm0, %eax
+; SSE3-NEXT: addl %ecx, %eax
+; SSE3-NEXT: # kill: def $ax killed $ax killed $eax
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract45_v8i16_add_i16_commute:
+; AVX: # %bb.0:
+; AVX-NEXT: vpextrw $4, %xmm0, %ecx
+; AVX-NEXT: vpextrw $5, %xmm0, %eax
+; AVX-NEXT: addl %ecx, %eax
+; AVX-NEXT: # kill: def $ax killed $ax killed $eax
+; AVX-NEXT: retq
+ %x0 = extractelement <8 x i16> %x, i32 4
+ %x1 = extractelement <8 x i16> %x, i32 5
+ %x01 = add i16 %x1, %x0
+ ret i16 %x01
+}
+
+define i32 @extract_extract01_v4i32_sub_i32(<4 x i32> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v4i32_sub_i32:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %eax
; SSE3-SLOW-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
@@ -157,20 +245,20 @@ define i32 @extract_extract_v4i32_sub_i3
; SSE3-SLOW-NEXT: subl %ecx, %eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v4i32_sub_i32:
+; SSE3-FAST-LABEL: extract_extract01_v4i32_sub_i32:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phsubd %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v4i32_sub_i32:
+; AVX-SLOW-LABEL: extract_extract01_v4i32_sub_i32:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %eax
; AVX-SLOW-NEXT: vpextrd $1, %xmm0, %ecx
; AVX-SLOW-NEXT: subl %ecx, %eax
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v4i32_sub_i32:
+; AVX-FAST-LABEL: extract_extract01_v4i32_sub_i32:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphsubd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -181,8 +269,30 @@ define i32 @extract_extract_v4i32_sub_i3
ret i32 %x01
}
-define i32 @extract_extract_v4i32_sub_i32_commute(<4 x i32> %x) {
-; SSE3-LABEL: extract_extract_v4i32_sub_i32_commute:
+define i32 @extract_extract23_v4i32_sub_i32(<4 x i32> %x) {
+; SSE3-LABEL: extract_extract23_v4i32_sub_i32:
+; SSE3: # %bb.0:
+; SSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,0,1]
+; SSE3-NEXT: movd %xmm1, %eax
+; SSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: movd %xmm0, %ecx
+; SSE3-NEXT: subl %ecx, %eax
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v4i32_sub_i32:
+; AVX: # %bb.0:
+; AVX-NEXT: vextractps $2, %xmm0, %eax
+; AVX-NEXT: vextractps $3, %xmm0, %ecx
+; AVX-NEXT: subl %ecx, %eax
+; AVX-NEXT: retq
+ %x0 = extractelement <4 x i32> %x, i32 2
+ %x1 = extractelement <4 x i32> %x, i32 3
+ %x01 = sub i32 %x0, %x1
+ ret i32 %x01
+}
+
+define i32 @extract_extract01_v4i32_sub_i32_commute(<4 x i32> %x) {
+; SSE3-LABEL: extract_extract01_v4i32_sub_i32_commute:
; SSE3: # %bb.0:
; SSE3-NEXT: movd %xmm0, %ecx
; SSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
@@ -190,7 +300,7 @@ define i32 @extract_extract_v4i32_sub_i3
; SSE3-NEXT: subl %ecx, %eax
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v4i32_sub_i32_commute:
+; AVX-LABEL: extract_extract01_v4i32_sub_i32_commute:
; AVX: # %bb.0:
; AVX-NEXT: vmovd %xmm0, %ecx
; AVX-NEXT: vpextrd $1, %xmm0, %eax
@@ -202,8 +312,30 @@ define i32 @extract_extract_v4i32_sub_i3
ret i32 %x01
}
-define i16 @extract_extract_v8i16_sub_i16(<8 x i16> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v8i16_sub_i16:
+define i32 @extract_extract23_v4i32_sub_i32_commute(<4 x i32> %x) {
+; SSE3-LABEL: extract_extract23_v4i32_sub_i32_commute:
+; SSE3: # %bb.0:
+; SSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,0,1]
+; SSE3-NEXT: movd %xmm1, %ecx
+; SSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: movd %xmm0, %eax
+; SSE3-NEXT: subl %ecx, %eax
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v4i32_sub_i32_commute:
+; AVX: # %bb.0:
+; AVX-NEXT: vextractps $2, %xmm0, %ecx
+; AVX-NEXT: vextractps $3, %xmm0, %eax
+; AVX-NEXT: subl %ecx, %eax
+; AVX-NEXT: retq
+ %x0 = extractelement <4 x i32> %x, i32 2
+ %x1 = extractelement <4 x i32> %x, i32 3
+ %x01 = sub i32 %x1, %x0
+ ret i32 %x01
+}
+
+define i16 @extract_extract01_v8i16_sub_i16(<8 x i16> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v8i16_sub_i16:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %eax
; SSE3-SLOW-NEXT: pextrw $1, %xmm0, %ecx
@@ -211,14 +343,14 @@ define i16 @extract_extract_v8i16_sub_i1
; SSE3-SLOW-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v8i16_sub_i16:
+; SSE3-FAST-LABEL: extract_extract01_v8i16_sub_i16:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phsubw %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v8i16_sub_i16:
+; AVX-SLOW-LABEL: extract_extract01_v8i16_sub_i16:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %eax
; AVX-SLOW-NEXT: vpextrw $1, %xmm0, %ecx
@@ -226,7 +358,7 @@ define i16 @extract_extract_v8i16_sub_i1
; AVX-SLOW-NEXT: # kill: def $ax killed $ax killed $eax
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v8i16_sub_i16:
+; AVX-FAST-LABEL: extract_extract01_v8i16_sub_i16:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphsubw %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -238,8 +370,30 @@ define i16 @extract_extract_v8i16_sub_i1
ret i16 %x01
}
-define i16 @extract_extract_v8i16_sub_i16_commute(<8 x i16> %x) {
-; SSE3-LABEL: extract_extract_v8i16_sub_i16_commute:
+define i16 @extract_extract23_v8i16_sub_i16(<8 x i16> %x) {
+; SSE3-LABEL: extract_extract23_v8i16_sub_i16:
+; SSE3: # %bb.0:
+; SSE3-NEXT: pextrw $2, %xmm0, %eax
+; SSE3-NEXT: pextrw $3, %xmm0, %ecx
+; SSE3-NEXT: subl %ecx, %eax
+; SSE3-NEXT: # kill: def $ax killed $ax killed $eax
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v8i16_sub_i16:
+; AVX: # %bb.0:
+; AVX-NEXT: vpextrw $2, %xmm0, %eax
+; AVX-NEXT: vpextrw $3, %xmm0, %ecx
+; AVX-NEXT: subl %ecx, %eax
+; AVX-NEXT: # kill: def $ax killed $ax killed $eax
+; AVX-NEXT: retq
+ %x0 = extractelement <8 x i16> %x, i32 2
+ %x1 = extractelement <8 x i16> %x, i32 3
+ %x01 = sub i16 %x0, %x1
+ ret i16 %x01
+}
+
+define i16 @extract_extract01_v8i16_sub_i16_commute(<8 x i16> %x) {
+; SSE3-LABEL: extract_extract01_v8i16_sub_i16_commute:
; SSE3: # %bb.0:
; SSE3-NEXT: movd %xmm0, %ecx
; SSE3-NEXT: pextrw $1, %xmm0, %eax
@@ -247,7 +401,7 @@ define i16 @extract_extract_v8i16_sub_i1
; SSE3-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v8i16_sub_i16_commute:
+; AVX-LABEL: extract_extract01_v8i16_sub_i16_commute:
; AVX: # %bb.0:
; AVX-NEXT: vmovd %xmm0, %ecx
; AVX-NEXT: vpextrw $1, %xmm0, %eax
@@ -260,10 +414,32 @@ define i16 @extract_extract_v8i16_sub_i1
ret i16 %x01
}
+define i16 @extract_extract23_v8i16_sub_i16_commute(<8 x i16> %x) {
+; SSE3-LABEL: extract_extract23_v8i16_sub_i16_commute:
+; SSE3: # %bb.0:
+; SSE3-NEXT: pextrw $2, %xmm0, %ecx
+; SSE3-NEXT: pextrw $3, %xmm0, %eax
+; SSE3-NEXT: subl %ecx, %eax
+; SSE3-NEXT: # kill: def $ax killed $ax killed $eax
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v8i16_sub_i16_commute:
+; AVX: # %bb.0:
+; AVX-NEXT: vpextrw $2, %xmm0, %ecx
+; AVX-NEXT: vpextrw $3, %xmm0, %eax
+; AVX-NEXT: subl %ecx, %eax
+; AVX-NEXT: # kill: def $ax killed $ax killed $eax
+; AVX-NEXT: retq
+ %x0 = extractelement <8 x i16> %x, i32 2
+ %x1 = extractelement <8 x i16> %x, i32 3
+ %x01 = sub i16 %x1, %x0
+ ret i16 %x01
+}
+
; 256-bit vectors, i32/i16, add/sub
-define i32 @extract_extract_v8i32_add_i32(<8 x i32> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v8i32_add_i32:
+define i32 @extract_extract01_v8i32_add_i32(<8 x i32> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v8i32_add_i32:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
@@ -271,13 +447,13 @@ define i32 @extract_extract_v8i32_add_i3
; SSE3-SLOW-NEXT: addl %ecx, %eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v8i32_add_i32:
+; SSE3-FAST-LABEL: extract_extract01_v8i32_add_i32:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phaddd %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v8i32_add_i32:
+; AVX-SLOW-LABEL: extract_extract01_v8i32_add_i32:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vpextrd $1, %xmm0, %eax
@@ -285,7 +461,7 @@ define i32 @extract_extract_v8i32_add_i3
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v8i32_add_i32:
+; AVX-FAST-LABEL: extract_extract01_v8i32_add_i32:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphaddd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -297,8 +473,31 @@ define i32 @extract_extract_v8i32_add_i3
ret i32 %x01
}
-define i32 @extract_extract_v8i32_add_i32_commute(<8 x i32> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v8i32_add_i32_commute:
+define i32 @extract_extract23_v8i32_add_i32(<8 x i32> %x) {
+; SSE3-LABEL: extract_extract23_v8i32_add_i32:
+; SSE3: # %bb.0:
+; SSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,0,1]
+; SSE3-NEXT: movd %xmm1, %ecx
+; SSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: movd %xmm0, %eax
+; SSE3-NEXT: addl %ecx, %eax
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v8i32_add_i32:
+; AVX: # %bb.0:
+; AVX-NEXT: vextractps $2, %xmm0, %ecx
+; AVX-NEXT: vextractps $3, %xmm0, %eax
+; AVX-NEXT: addl %ecx, %eax
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+ %x0 = extractelement <8 x i32> %x, i32 2
+ %x1 = extractelement <8 x i32> %x, i32 3
+ %x01 = add i32 %x0, %x1
+ ret i32 %x01
+}
+
+define i32 @extract_extract01_v8i32_add_i32_commute(<8 x i32> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v8i32_add_i32_commute:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
@@ -306,13 +505,13 @@ define i32 @extract_extract_v8i32_add_i3
; SSE3-SLOW-NEXT: addl %ecx, %eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v8i32_add_i32_commute:
+; SSE3-FAST-LABEL: extract_extract01_v8i32_add_i32_commute:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phaddd %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v8i32_add_i32_commute:
+; AVX-SLOW-LABEL: extract_extract01_v8i32_add_i32_commute:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vpextrd $1, %xmm0, %eax
@@ -320,7 +519,7 @@ define i32 @extract_extract_v8i32_add_i3
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v8i32_add_i32_commute:
+; AVX-FAST-LABEL: extract_extract01_v8i32_add_i32_commute:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphaddd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -332,8 +531,31 @@ define i32 @extract_extract_v8i32_add_i3
ret i32 %x01
}
-define i16 @extract_extract_v16i16_add_i16(<16 x i16> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v16i16_add_i16:
+define i32 @extract_extract23_v8i32_add_i32_commute(<8 x i32> %x) {
+; SSE3-LABEL: extract_extract23_v8i32_add_i32_commute:
+; SSE3: # %bb.0:
+; SSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,0,1]
+; SSE3-NEXT: movd %xmm1, %ecx
+; SSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: movd %xmm0, %eax
+; SSE3-NEXT: addl %ecx, %eax
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v8i32_add_i32_commute:
+; AVX: # %bb.0:
+; AVX-NEXT: vextractps $2, %xmm0, %ecx
+; AVX-NEXT: vextractps $3, %xmm0, %eax
+; AVX-NEXT: addl %ecx, %eax
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+ %x0 = extractelement <8 x i32> %x, i32 2
+ %x1 = extractelement <8 x i32> %x, i32 3
+ %x01 = add i32 %x1, %x0
+ ret i32 %x01
+}
+
+define i16 @extract_extract01_v16i16_add_i16(<16 x i16> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v16i16_add_i16:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: pextrw $1, %xmm0, %eax
@@ -341,14 +563,14 @@ define i16 @extract_extract_v16i16_add_i
; SSE3-SLOW-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v16i16_add_i16:
+; SSE3-FAST-LABEL: extract_extract01_v16i16_add_i16:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phaddw %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v16i16_add_i16:
+; AVX-SLOW-LABEL: extract_extract01_v16i16_add_i16:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vpextrw $1, %xmm0, %eax
@@ -357,7 +579,7 @@ define i16 @extract_extract_v16i16_add_i
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v16i16_add_i16:
+; AVX-FAST-LABEL: extract_extract01_v16i16_add_i16:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphaddw %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -370,8 +592,31 @@ define i16 @extract_extract_v16i16_add_i
ret i16 %x01
}
-define i16 @extract_extract_v16i16_add_i16_commute(<16 x i16> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v16i16_add_i16_commute:
+define i16 @extract_extract23_v16i16_add_i16(<16 x i16> %x) {
+; SSE3-LABEL: extract_extract23_v16i16_add_i16:
+; SSE3: # %bb.0:
+; SSE3-NEXT: pextrw $2, %xmm0, %ecx
+; SSE3-NEXT: pextrw $3, %xmm0, %eax
+; SSE3-NEXT: addl %ecx, %eax
+; SSE3-NEXT: # kill: def $ax killed $ax killed $eax
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v16i16_add_i16:
+; AVX: # %bb.0:
+; AVX-NEXT: vpextrw $2, %xmm0, %ecx
+; AVX-NEXT: vpextrw $3, %xmm0, %eax
+; AVX-NEXT: addl %ecx, %eax
+; AVX-NEXT: # kill: def $ax killed $ax killed $eax
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+ %x0 = extractelement <16 x i16> %x, i32 2
+ %x1 = extractelement <16 x i16> %x, i32 3
+ %x01 = add i16 %x0, %x1
+ ret i16 %x01
+}
+
+define i16 @extract_extract01_v16i16_add_i16_commute(<16 x i16> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v16i16_add_i16_commute:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: pextrw $1, %xmm0, %eax
@@ -379,14 +624,14 @@ define i16 @extract_extract_v16i16_add_i
; SSE3-SLOW-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v16i16_add_i16_commute:
+; SSE3-FAST-LABEL: extract_extract01_v16i16_add_i16_commute:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phaddw %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v16i16_add_i16_commute:
+; AVX-SLOW-LABEL: extract_extract01_v16i16_add_i16_commute:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vpextrw $1, %xmm0, %eax
@@ -395,7 +640,7 @@ define i16 @extract_extract_v16i16_add_i
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v16i16_add_i16_commute:
+; AVX-FAST-LABEL: extract_extract01_v16i16_add_i16_commute:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphaddw %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -408,8 +653,31 @@ define i16 @extract_extract_v16i16_add_i
ret i16 %x01
}
-define i32 @extract_extract_v8i32_sub_i32(<8 x i32> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v8i32_sub_i32:
+define i16 @extract_extract45_v16i16_add_i16_commute(<16 x i16> %x) {
+; SSE3-LABEL: extract_extract45_v16i16_add_i16_commute:
+; SSE3: # %bb.0:
+; SSE3-NEXT: pextrw $4, %xmm0, %ecx
+; SSE3-NEXT: pextrw $5, %xmm0, %eax
+; SSE3-NEXT: addl %ecx, %eax
+; SSE3-NEXT: # kill: def $ax killed $ax killed $eax
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract45_v16i16_add_i16_commute:
+; AVX: # %bb.0:
+; AVX-NEXT: vpextrw $4, %xmm0, %ecx
+; AVX-NEXT: vpextrw $5, %xmm0, %eax
+; AVX-NEXT: addl %ecx, %eax
+; AVX-NEXT: # kill: def $ax killed $ax killed $eax
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+ %x0 = extractelement <16 x i16> %x, i32 4
+ %x1 = extractelement <16 x i16> %x, i32 5
+ %x01 = add i16 %x1, %x0
+ ret i16 %x01
+}
+
+define i32 @extract_extract01_v8i32_sub_i32(<8 x i32> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v8i32_sub_i32:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %eax
; SSE3-SLOW-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
@@ -417,13 +685,13 @@ define i32 @extract_extract_v8i32_sub_i3
; SSE3-SLOW-NEXT: subl %ecx, %eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v8i32_sub_i32:
+; SSE3-FAST-LABEL: extract_extract01_v8i32_sub_i32:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phsubd %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v8i32_sub_i32:
+; AVX-SLOW-LABEL: extract_extract01_v8i32_sub_i32:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %eax
; AVX-SLOW-NEXT: vpextrd $1, %xmm0, %ecx
@@ -431,7 +699,7 @@ define i32 @extract_extract_v8i32_sub_i3
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v8i32_sub_i32:
+; AVX-FAST-LABEL: extract_extract01_v8i32_sub_i32:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphsubd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -443,10 +711,33 @@ define i32 @extract_extract_v8i32_sub_i3
ret i32 %x01
}
+define i32 @extract_extract23_v8i32_sub_i32(<8 x i32> %x) {
+; SSE3-LABEL: extract_extract23_v8i32_sub_i32:
+; SSE3: # %bb.0:
+; SSE3-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,0,1]
+; SSE3-NEXT: movd %xmm1, %eax
+; SSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
+; SSE3-NEXT: movd %xmm0, %ecx
+; SSE3-NEXT: subl %ecx, %eax
+; SSE3-NEXT: retq
+;
+; AVX-LABEL: extract_extract23_v8i32_sub_i32:
+; AVX: # %bb.0:
+; AVX-NEXT: vextractps $2, %xmm0, %eax
+; AVX-NEXT: vextractps $3, %xmm0, %ecx
+; AVX-NEXT: subl %ecx, %eax
+; AVX-NEXT: vzeroupper
+; AVX-NEXT: retq
+ %x0 = extractelement <8 x i32> %x, i32 2
+ %x1 = extractelement <8 x i32> %x, i32 3
+ %x01 = sub i32 %x0, %x1
+ ret i32 %x01
+}
+
; Negative test...or get hoppy and negate?
-define i32 @extract_extract_v8i32_sub_i32_commute(<8 x i32> %x) {
-; SSE3-LABEL: extract_extract_v8i32_sub_i32_commute:
+define i32 @extract_extract01_v8i32_sub_i32_commute(<8 x i32> %x) {
+; SSE3-LABEL: extract_extract01_v8i32_sub_i32_commute:
; SSE3: # %bb.0:
; SSE3-NEXT: movd %xmm0, %ecx
; SSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
@@ -454,7 +745,7 @@ define i32 @extract_extract_v8i32_sub_i3
; SSE3-NEXT: subl %ecx, %eax
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v8i32_sub_i32_commute:
+; AVX-LABEL: extract_extract01_v8i32_sub_i32_commute:
; AVX: # %bb.0:
; AVX-NEXT: vmovd %xmm0, %ecx
; AVX-NEXT: vpextrd $1, %xmm0, %eax
@@ -467,8 +758,8 @@ define i32 @extract_extract_v8i32_sub_i3
ret i32 %x01
}
-define i16 @extract_extract_v16i16_sub_i16(<16 x i16> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v16i16_sub_i16:
+define i16 @extract_extract01_v16i16_sub_i16(<16 x i16> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v16i16_sub_i16:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %eax
; SSE3-SLOW-NEXT: pextrw $1, %xmm0, %ecx
@@ -476,14 +767,14 @@ define i16 @extract_extract_v16i16_sub_i
; SSE3-SLOW-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v16i16_sub_i16:
+; SSE3-FAST-LABEL: extract_extract01_v16i16_sub_i16:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phsubw %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v16i16_sub_i16:
+; AVX-SLOW-LABEL: extract_extract01_v16i16_sub_i16:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %eax
; AVX-SLOW-NEXT: vpextrw $1, %xmm0, %ecx
@@ -492,7 +783,7 @@ define i16 @extract_extract_v16i16_sub_i
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v16i16_sub_i16:
+; AVX-FAST-LABEL: extract_extract01_v16i16_sub_i16:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphsubw %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -507,8 +798,8 @@ define i16 @extract_extract_v16i16_sub_i
; Negative test...or get hoppy and negate?
-define i16 @extract_extract_v16i16_sub_i16_commute(<16 x i16> %x) {
-; SSE3-LABEL: extract_extract_v16i16_sub_i16_commute:
+define i16 @extract_extract01_v16i16_sub_i16_commute(<16 x i16> %x) {
+; SSE3-LABEL: extract_extract01_v16i16_sub_i16_commute:
; SSE3: # %bb.0:
; SSE3-NEXT: movd %xmm0, %ecx
; SSE3-NEXT: pextrw $1, %xmm0, %eax
@@ -516,7 +807,7 @@ define i16 @extract_extract_v16i16_sub_i
; SSE3-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v16i16_sub_i16_commute:
+; AVX-LABEL: extract_extract01_v16i16_sub_i16_commute:
; AVX: # %bb.0:
; AVX-NEXT: vmovd %xmm0, %ecx
; AVX-NEXT: vpextrw $1, %xmm0, %eax
@@ -532,8 +823,8 @@ define i16 @extract_extract_v16i16_sub_i
; 512-bit vectors, i32/i16, add/sub
-define i32 @extract_extract_v16i32_add_i32(<16 x i32> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v16i32_add_i32:
+define i32 @extract_extract01_v16i32_add_i32(<16 x i32> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v16i32_add_i32:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
@@ -541,13 +832,13 @@ define i32 @extract_extract_v16i32_add_i
; SSE3-SLOW-NEXT: addl %ecx, %eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v16i32_add_i32:
+; SSE3-FAST-LABEL: extract_extract01_v16i32_add_i32:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phaddd %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v16i32_add_i32:
+; AVX-SLOW-LABEL: extract_extract01_v16i32_add_i32:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vpextrd $1, %xmm0, %eax
@@ -555,7 +846,7 @@ define i32 @extract_extract_v16i32_add_i
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v16i32_add_i32:
+; AVX-FAST-LABEL: extract_extract01_v16i32_add_i32:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphaddd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -567,8 +858,8 @@ define i32 @extract_extract_v16i32_add_i
ret i32 %x01
}
-define i32 @extract_extract_v16i32_add_i32_commute(<16 x i32> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v16i32_add_i32_commute:
+define i32 @extract_extract01_v16i32_add_i32_commute(<16 x i32> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v16i32_add_i32_commute:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
@@ -576,13 +867,13 @@ define i32 @extract_extract_v16i32_add_i
; SSE3-SLOW-NEXT: addl %ecx, %eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v16i32_add_i32_commute:
+; SSE3-FAST-LABEL: extract_extract01_v16i32_add_i32_commute:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phaddd %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v16i32_add_i32_commute:
+; AVX-SLOW-LABEL: extract_extract01_v16i32_add_i32_commute:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vpextrd $1, %xmm0, %eax
@@ -590,7 +881,7 @@ define i32 @extract_extract_v16i32_add_i
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v16i32_add_i32_commute:
+; AVX-FAST-LABEL: extract_extract01_v16i32_add_i32_commute:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphaddd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -602,8 +893,8 @@ define i32 @extract_extract_v16i32_add_i
ret i32 %x01
}
-define i16 @extract_extract_v32i16_add_i16(<32 x i16> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v32i16_add_i16:
+define i16 @extract_extract01_v32i16_add_i16(<32 x i16> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v32i16_add_i16:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: pextrw $1, %xmm0, %eax
@@ -611,14 +902,14 @@ define i16 @extract_extract_v32i16_add_i
; SSE3-SLOW-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v32i16_add_i16:
+; SSE3-FAST-LABEL: extract_extract01_v32i16_add_i16:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phaddw %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v32i16_add_i16:
+; AVX-SLOW-LABEL: extract_extract01_v32i16_add_i16:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vpextrw $1, %xmm0, %eax
@@ -627,7 +918,7 @@ define i16 @extract_extract_v32i16_add_i
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v32i16_add_i16:
+; AVX-FAST-LABEL: extract_extract01_v32i16_add_i16:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphaddw %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -640,8 +931,8 @@ define i16 @extract_extract_v32i16_add_i
ret i16 %x01
}
-define i16 @extract_extract_v32i16_add_i16_commute(<32 x i16> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v32i16_add_i16_commute:
+define i16 @extract_extract01_v32i16_add_i16_commute(<32 x i16> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v32i16_add_i16_commute:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: pextrw $1, %xmm0, %eax
@@ -649,14 +940,14 @@ define i16 @extract_extract_v32i16_add_i
; SSE3-SLOW-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v32i16_add_i16_commute:
+; SSE3-FAST-LABEL: extract_extract01_v32i16_add_i16_commute:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phaddw %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v32i16_add_i16_commute:
+; AVX-SLOW-LABEL: extract_extract01_v32i16_add_i16_commute:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vpextrw $1, %xmm0, %eax
@@ -665,7 +956,7 @@ define i16 @extract_extract_v32i16_add_i
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v32i16_add_i16_commute:
+; AVX-FAST-LABEL: extract_extract01_v32i16_add_i16_commute:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphaddw %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -678,8 +969,8 @@ define i16 @extract_extract_v32i16_add_i
ret i16 %x01
}
-define i32 @extract_extract_v16i32_sub_i32(<16 x i32> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v16i32_sub_i32:
+define i32 @extract_extract01_v16i32_sub_i32(<16 x i32> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v16i32_sub_i32:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %eax
; SSE3-SLOW-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
@@ -687,13 +978,13 @@ define i32 @extract_extract_v16i32_sub_i
; SSE3-SLOW-NEXT: subl %ecx, %eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v16i32_sub_i32:
+; SSE3-FAST-LABEL: extract_extract01_v16i32_sub_i32:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phsubd %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v16i32_sub_i32:
+; AVX-SLOW-LABEL: extract_extract01_v16i32_sub_i32:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %eax
; AVX-SLOW-NEXT: vpextrd $1, %xmm0, %ecx
@@ -701,7 +992,7 @@ define i32 @extract_extract_v16i32_sub_i
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v16i32_sub_i32:
+; AVX-FAST-LABEL: extract_extract01_v16i32_sub_i32:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphsubd %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -713,8 +1004,8 @@ define i32 @extract_extract_v16i32_sub_i
ret i32 %x01
}
-define i32 @extract_extract_v16i32_sub_i32_commute(<16 x i32> %x) {
-; SSE3-LABEL: extract_extract_v16i32_sub_i32_commute:
+define i32 @extract_extract01_v16i32_sub_i32_commute(<16 x i32> %x) {
+; SSE3-LABEL: extract_extract01_v16i32_sub_i32_commute:
; SSE3: # %bb.0:
; SSE3-NEXT: movd %xmm0, %ecx
; SSE3-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
@@ -722,7 +1013,7 @@ define i32 @extract_extract_v16i32_sub_i
; SSE3-NEXT: subl %ecx, %eax
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v16i32_sub_i32_commute:
+; AVX-LABEL: extract_extract01_v16i32_sub_i32_commute:
; AVX: # %bb.0:
; AVX-NEXT: vmovd %xmm0, %ecx
; AVX-NEXT: vpextrd $1, %xmm0, %eax
@@ -735,8 +1026,8 @@ define i32 @extract_extract_v16i32_sub_i
ret i32 %x01
}
-define i16 @extract_extract_v32i16_sub_i16(<32 x i16> %x) {
-; SSE3-SLOW-LABEL: extract_extract_v32i16_sub_i16:
+define i16 @extract_extract01_v32i16_sub_i16(<32 x i16> %x) {
+; SSE3-SLOW-LABEL: extract_extract01_v32i16_sub_i16:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %eax
; SSE3-SLOW-NEXT: pextrw $1, %xmm0, %ecx
@@ -744,14 +1035,14 @@ define i16 @extract_extract_v32i16_sub_i
; SSE3-SLOW-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v32i16_sub_i16:
+; SSE3-FAST-LABEL: extract_extract01_v32i16_sub_i16:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: phsubw %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v32i16_sub_i16:
+; AVX-SLOW-LABEL: extract_extract01_v32i16_sub_i16:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %eax
; AVX-SLOW-NEXT: vpextrw $1, %xmm0, %ecx
@@ -760,7 +1051,7 @@ define i16 @extract_extract_v32i16_sub_i
; AVX-SLOW-NEXT: vzeroupper
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v32i16_sub_i16:
+; AVX-FAST-LABEL: extract_extract01_v32i16_sub_i16:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vphsubw %xmm0, %xmm0, %xmm0
; AVX-FAST-NEXT: vmovd %xmm0, %eax
@@ -773,8 +1064,8 @@ define i16 @extract_extract_v32i16_sub_i
ret i16 %x01
}
-define i16 @extract_extract_v32i16_sub_i16_commute(<32 x i16> %x) {
-; SSE3-LABEL: extract_extract_v32i16_sub_i16_commute:
+define i16 @extract_extract01_v32i16_sub_i16_commute(<32 x i16> %x) {
+; SSE3-LABEL: extract_extract01_v32i16_sub_i16_commute:
; SSE3: # %bb.0:
; SSE3-NEXT: movd %xmm0, %ecx
; SSE3-NEXT: pextrw $1, %xmm0, %eax
@@ -782,7 +1073,7 @@ define i16 @extract_extract_v32i16_sub_i
; SSE3-NEXT: # kill: def $ax killed $ax killed $eax
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v32i16_sub_i16_commute:
+; AVX-LABEL: extract_extract01_v32i16_sub_i16_commute:
; AVX: # %bb.0:
; AVX-NEXT: vmovd %xmm0, %ecx
; AVX-NEXT: vpextrw $1, %xmm0, %eax
@@ -798,8 +1089,8 @@ define i16 @extract_extract_v32i16_sub_i
; Check output when 1 or both extracts have extra uses.
-define i32 @extract_extract_v4i32_add_i32_uses1(<4 x i32> %x, i32* %p) {
-; SSE3-SLOW-LABEL: extract_extract_v4i32_add_i32_uses1:
+define i32 @extract_extract01_v4i32_add_i32_uses1(<4 x i32> %x, i32* %p) {
+; SSE3-SLOW-LABEL: extract_extract01_v4i32_add_i32_uses1:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: movd %xmm0, (%rdi)
@@ -808,14 +1099,14 @@ define i32 @extract_extract_v4i32_add_i3
; SSE3-SLOW-NEXT: addl %ecx, %eax
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v4i32_add_i32_uses1:
+; SSE3-FAST-LABEL: extract_extract01_v4i32_add_i32_uses1:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: movd %xmm0, (%rdi)
; SSE3-FAST-NEXT: phaddd %xmm0, %xmm0
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v4i32_add_i32_uses1:
+; AVX-SLOW-LABEL: extract_extract01_v4i32_add_i32_uses1:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vmovd %xmm0, (%rdi)
@@ -823,7 +1114,7 @@ define i32 @extract_extract_v4i32_add_i3
; AVX-SLOW-NEXT: addl %ecx, %eax
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v4i32_add_i32_uses1:
+; AVX-FAST-LABEL: extract_extract01_v4i32_add_i32_uses1:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vmovd %xmm0, (%rdi)
; AVX-FAST-NEXT: vphaddd %xmm0, %xmm0, %xmm0
@@ -836,8 +1127,8 @@ define i32 @extract_extract_v4i32_add_i3
ret i32 %x01
}
-define i32 @extract_extract_v4i32_add_i32_uses2(<4 x i32> %x, i32* %p) {
-; SSE3-SLOW-LABEL: extract_extract_v4i32_add_i32_uses2:
+define i32 @extract_extract01_v4i32_add_i32_uses2(<4 x i32> %x, i32* %p) {
+; SSE3-SLOW-LABEL: extract_extract01_v4i32_add_i32_uses2:
; SSE3-SLOW: # %bb.0:
; SSE3-SLOW-NEXT: movd %xmm0, %ecx
; SSE3-SLOW-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
@@ -846,7 +1137,7 @@ define i32 @extract_extract_v4i32_add_i3
; SSE3-SLOW-NEXT: movd %xmm0, (%rdi)
; SSE3-SLOW-NEXT: retq
;
-; SSE3-FAST-LABEL: extract_extract_v4i32_add_i32_uses2:
+; SSE3-FAST-LABEL: extract_extract01_v4i32_add_i32_uses2:
; SSE3-FAST: # %bb.0:
; SSE3-FAST-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,1,2,3]
; SSE3-FAST-NEXT: movd %xmm1, (%rdi)
@@ -854,7 +1145,7 @@ define i32 @extract_extract_v4i32_add_i3
; SSE3-FAST-NEXT: movd %xmm0, %eax
; SSE3-FAST-NEXT: retq
;
-; AVX-SLOW-LABEL: extract_extract_v4i32_add_i32_uses2:
+; AVX-SLOW-LABEL: extract_extract01_v4i32_add_i32_uses2:
; AVX-SLOW: # %bb.0:
; AVX-SLOW-NEXT: vmovd %xmm0, %ecx
; AVX-SLOW-NEXT: vpextrd $1, %xmm0, %eax
@@ -862,7 +1153,7 @@ define i32 @extract_extract_v4i32_add_i3
; AVX-SLOW-NEXT: vpextrd $1, %xmm0, (%rdi)
; AVX-SLOW-NEXT: retq
;
-; AVX-FAST-LABEL: extract_extract_v4i32_add_i32_uses2:
+; AVX-FAST-LABEL: extract_extract01_v4i32_add_i32_uses2:
; AVX-FAST: # %bb.0:
; AVX-FAST-NEXT: vpextrd $1, %xmm0, (%rdi)
; AVX-FAST-NEXT: vphaddd %xmm0, %xmm0, %xmm0
@@ -875,8 +1166,8 @@ define i32 @extract_extract_v4i32_add_i3
ret i32 %x01
}
-define i32 @extract_extract_v4i32_add_i32_uses3(<4 x i32> %x, i32* %p1, i32* %p2) {
-; SSE3-LABEL: extract_extract_v4i32_add_i32_uses3:
+define i32 @extract_extract01_v4i32_add_i32_uses3(<4 x i32> %x, i32* %p1, i32* %p2) {
+; SSE3-LABEL: extract_extract01_v4i32_add_i32_uses3:
; SSE3: # %bb.0:
; SSE3-NEXT: movd %xmm0, %ecx
; SSE3-NEXT: movd %xmm0, (%rdi)
@@ -886,7 +1177,7 @@ define i32 @extract_extract_v4i32_add_i3
; SSE3-NEXT: movd %xmm0, (%rsi)
; SSE3-NEXT: retq
;
-; AVX-LABEL: extract_extract_v4i32_add_i32_uses3:
+; AVX-LABEL: extract_extract01_v4i32_add_i32_uses3:
; AVX: # %bb.0:
; AVX-NEXT: vmovd %xmm0, %ecx
; AVX-NEXT: vmovd %xmm0, (%rdi)
More information about the llvm-commits
mailing list