[llvm] r282684 - [X86] Add VBROADCASTF128/VBROADCASTI128 to execution domain fixing tables.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 28 22:54:29 PDT 2016
Author: ctopper
Date: Thu Sep 29 00:54:28 2016
New Revision: 282684
URL: http://llvm.org/viewvc/llvm-project?rev=282684&view=rev
Log:
[X86] Add VBROADCASTF128/VBROADCASTI128 to execution domain fixing tables.
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
llvm/trunk/test/CodeGen/X86/avx2-intrinsics-fast-isel.ll
llvm/trunk/test/CodeGen/X86/subvector-broadcast.ll
llvm/trunk/test/CodeGen/X86/vector-shuffle-256-v4.ll
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=282684&r1=282683&r2=282684&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Thu Sep 29 00:54:28 2016
@@ -7535,7 +7535,8 @@ static const uint16_t ReplaceableInstrsA
{ X86::VBROADCASTSSYrr, X86::VBROADCASTSSYrr, X86::VPBROADCASTDYrr},
{ X86::VBROADCASTSSYrm, X86::VBROADCASTSSYrm, X86::VPBROADCASTDYrm},
{ X86::VBROADCASTSDYrr, X86::VBROADCASTSDYrr, X86::VPBROADCASTQYrr},
- { X86::VBROADCASTSDYrm, X86::VBROADCASTSDYrm, X86::VPBROADCASTQYrm}
+ { X86::VBROADCASTSDYrm, X86::VBROADCASTSDYrm, X86::VPBROADCASTQYrm},
+ { X86::VBROADCASTF128, X86::VBROADCASTF128, X86::VBROADCASTI128 },
};
static const uint16_t ReplaceableInstrsAVX512[][4] = {
Modified: llvm/trunk/test/CodeGen/X86/avx2-intrinsics-fast-isel.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx2-intrinsics-fast-isel.ll?rev=282684&r1=282683&r2=282684&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx2-intrinsics-fast-isel.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx2-intrinsics-fast-isel.ll Thu Sep 29 00:54:28 2016
@@ -505,12 +505,12 @@ define <4 x i64> @test_mm256_broadcastsi
; X32-LABEL: test_mm256_broadcastsi128_si256_mem:
; X32: # BB#0:
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X32-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
; X32-NEXT: retl
;
; X64-LABEL: test_mm256_broadcastsi128_si256_mem:
; X64: # BB#0:
-; X64-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X64-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
; X64-NEXT: retq
%a0 = load <2 x i64>, <2 x i64>* %p0
%res = shufflevector <2 x i64> %a0, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
Modified: llvm/trunk/test/CodeGen/X86/subvector-broadcast.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/subvector-broadcast.ll?rev=282684&r1=282683&r2=282684&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/subvector-broadcast.ll (original)
+++ llvm/trunk/test/CodeGen/X86/subvector-broadcast.ll Thu Sep 29 00:54:28 2016
@@ -152,17 +152,11 @@ define <8 x double> @test_broadcast_4f64
}
define <4 x i64> @test_broadcast_2i64_4i64(<2 x i64> *%p) nounwind {
-; X32-AVX1-LABEL: test_broadcast_2i64_4i64:
-; X32-AVX1: ## BB#0:
-; X32-AVX1-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-AVX1-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X32-AVX1-NEXT: retl
-;
-; X32-AVX2-LABEL: test_broadcast_2i64_4i64:
-; X32-AVX2: ## BB#0:
-; X32-AVX2-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X32-AVX2-NEXT: retl
+; X32-AVX-LABEL: test_broadcast_2i64_4i64:
+; X32-AVX: ## BB#0:
+; X32-AVX-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X32-AVX-NEXT: retl
;
; X32-AVX512F-LABEL: test_broadcast_2i64_4i64:
; X32-AVX512F: ## BB#0:
@@ -182,15 +176,10 @@ define <4 x i64> @test_broadcast_2i64_4i
; X32-AVX512DQ-NEXT: vbroadcasti64x2 (%eax), %ymm0
; X32-AVX512DQ-NEXT: retl
;
-; X64-AVX1-LABEL: test_broadcast_2i64_4i64:
-; X64-AVX1: ## BB#0:
-; X64-AVX1-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X64-AVX1-NEXT: retq
-;
-; X64-AVX2-LABEL: test_broadcast_2i64_4i64:
-; X64-AVX2: ## BB#0:
-; X64-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X64-AVX2-NEXT: retq
+; X64-AVX-LABEL: test_broadcast_2i64_4i64:
+; X64-AVX: ## BB#0:
+; X64-AVX-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X64-AVX-NEXT: retq
;
; X64-AVX512F-LABEL: test_broadcast_2i64_4i64:
; X64-AVX512F: ## BB#0:
@@ -222,8 +211,8 @@ define <8 x i64> @test_broadcast_2i64_8i
; X32-AVX2-LABEL: test_broadcast_2i64_8i64:
; X32-AVX2: ## BB#0:
; X32-AVX2-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X32-AVX2-NEXT: vmovdqa %ymm0, %ymm1
+; X32-AVX2-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X32-AVX2-NEXT: vmovaps %ymm0, %ymm1
; X32-AVX2-NEXT: retl
;
; X32-AVX512F-LABEL: test_broadcast_2i64_8i64:
@@ -255,8 +244,8 @@ define <8 x i64> @test_broadcast_2i64_8i
;
; X64-AVX2-LABEL: test_broadcast_2i64_8i64:
; X64-AVX2: ## BB#0:
-; X64-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X64-AVX2-NEXT: vmovdqa %ymm0, %ymm1
+; X64-AVX2-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X64-AVX2-NEXT: vmovaps %ymm0, %ymm1
; X64-AVX2-NEXT: retq
;
; X64-AVX512F-LABEL: test_broadcast_2i64_8i64:
@@ -454,17 +443,11 @@ define <16 x float> @test_broadcast_8f32
}
define <8 x i32> @test_broadcast_4i32_8i32(<4 x i32> *%p) nounwind {
-; X32-AVX1-LABEL: test_broadcast_4i32_8i32:
-; X32-AVX1: ## BB#0:
-; X32-AVX1-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-AVX1-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X32-AVX1-NEXT: retl
-;
-; X32-AVX2-LABEL: test_broadcast_4i32_8i32:
-; X32-AVX2: ## BB#0:
-; X32-AVX2-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X32-AVX2-NEXT: retl
+; X32-AVX-LABEL: test_broadcast_4i32_8i32:
+; X32-AVX: ## BB#0:
+; X32-AVX-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X32-AVX-NEXT: retl
;
; X32-AVX512-LABEL: test_broadcast_4i32_8i32:
; X32-AVX512: ## BB#0:
@@ -472,15 +455,10 @@ define <8 x i32> @test_broadcast_4i32_8i
; X32-AVX512-NEXT: vbroadcasti32x4 (%eax), %ymm0
; X32-AVX512-NEXT: retl
;
-; X64-AVX1-LABEL: test_broadcast_4i32_8i32:
-; X64-AVX1: ## BB#0:
-; X64-AVX1-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X64-AVX1-NEXT: retq
-;
-; X64-AVX2-LABEL: test_broadcast_4i32_8i32:
-; X64-AVX2: ## BB#0:
-; X64-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X64-AVX2-NEXT: retq
+; X64-AVX-LABEL: test_broadcast_4i32_8i32:
+; X64-AVX: ## BB#0:
+; X64-AVX-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X64-AVX-NEXT: retq
;
; X64-AVX512-LABEL: test_broadcast_4i32_8i32:
; X64-AVX512: ## BB#0:
@@ -502,8 +480,8 @@ define <16 x i32> @test_broadcast_4i32_1
; X32-AVX2-LABEL: test_broadcast_4i32_16i32:
; X32-AVX2: ## BB#0:
; X32-AVX2-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X32-AVX2-NEXT: vmovdqa %ymm0, %ymm1
+; X32-AVX2-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X32-AVX2-NEXT: vmovaps %ymm0, %ymm1
; X32-AVX2-NEXT: retl
;
; X32-AVX512F-LABEL: test_broadcast_4i32_16i32:
@@ -535,8 +513,8 @@ define <16 x i32> @test_broadcast_4i32_1
;
; X64-AVX2-LABEL: test_broadcast_4i32_16i32:
; X64-AVX2: ## BB#0:
-; X64-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X64-AVX2-NEXT: vmovdqa %ymm0, %ymm1
+; X64-AVX2-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X64-AVX2-NEXT: vmovaps %ymm0, %ymm1
; X64-AVX2-NEXT: retq
;
; X64-AVX512F-LABEL: test_broadcast_4i32_16i32:
@@ -619,17 +597,11 @@ define <16 x i32> @test_broadcast_8i32_1
}
define <16 x i16> @test_broadcast_8i16_16i16(<8 x i16> *%p) nounwind {
-; X32-AVX1-LABEL: test_broadcast_8i16_16i16:
-; X32-AVX1: ## BB#0:
-; X32-AVX1-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-AVX1-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X32-AVX1-NEXT: retl
-;
-; X32-AVX2-LABEL: test_broadcast_8i16_16i16:
-; X32-AVX2: ## BB#0:
-; X32-AVX2-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X32-AVX2-NEXT: retl
+; X32-AVX-LABEL: test_broadcast_8i16_16i16:
+; X32-AVX: ## BB#0:
+; X32-AVX-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X32-AVX-NEXT: retl
;
; X32-AVX512-LABEL: test_broadcast_8i16_16i16:
; X32-AVX512: ## BB#0:
@@ -637,15 +609,10 @@ define <16 x i16> @test_broadcast_8i16_1
; X32-AVX512-NEXT: vbroadcasti32x4 (%eax), %ymm0
; X32-AVX512-NEXT: retl
;
-; X64-AVX1-LABEL: test_broadcast_8i16_16i16:
-; X64-AVX1: ## BB#0:
-; X64-AVX1-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X64-AVX1-NEXT: retq
-;
-; X64-AVX2-LABEL: test_broadcast_8i16_16i16:
-; X64-AVX2: ## BB#0:
-; X64-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X64-AVX2-NEXT: retq
+; X64-AVX-LABEL: test_broadcast_8i16_16i16:
+; X64-AVX: ## BB#0:
+; X64-AVX-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X64-AVX-NEXT: retq
;
; X64-AVX512-LABEL: test_broadcast_8i16_16i16:
; X64-AVX512: ## BB#0:
@@ -667,8 +634,8 @@ define <32 x i16> @test_broadcast_8i16_3
; X32-AVX2-LABEL: test_broadcast_8i16_32i16:
; X32-AVX2: ## BB#0:
; X32-AVX2-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X32-AVX2-NEXT: vmovdqa %ymm0, %ymm1
+; X32-AVX2-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X32-AVX2-NEXT: vmovaps %ymm0, %ymm1
; X32-AVX2-NEXT: retl
;
; X32-AVX512F-LABEL: test_broadcast_8i16_32i16:
@@ -700,8 +667,8 @@ define <32 x i16> @test_broadcast_8i16_3
;
; X64-AVX2-LABEL: test_broadcast_8i16_32i16:
; X64-AVX2: ## BB#0:
-; X64-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X64-AVX2-NEXT: vmovdqa %ymm0, %ymm1
+; X64-AVX2-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X64-AVX2-NEXT: vmovaps %ymm0, %ymm1
; X64-AVX2-NEXT: retq
;
; X64-AVX512F-LABEL: test_broadcast_8i16_32i16:
@@ -784,17 +751,11 @@ define <32 x i16> @test_broadcast_16i16_
}
define <32 x i8> @test_broadcast_16i8_32i8(<16 x i8> *%p) nounwind {
-; X32-AVX1-LABEL: test_broadcast_16i8_32i8:
-; X32-AVX1: ## BB#0:
-; X32-AVX1-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-AVX1-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X32-AVX1-NEXT: retl
-;
-; X32-AVX2-LABEL: test_broadcast_16i8_32i8:
-; X32-AVX2: ## BB#0:
-; X32-AVX2-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X32-AVX2-NEXT: retl
+; X32-AVX-LABEL: test_broadcast_16i8_32i8:
+; X32-AVX: ## BB#0:
+; X32-AVX-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X32-AVX-NEXT: retl
;
; X32-AVX512-LABEL: test_broadcast_16i8_32i8:
; X32-AVX512: ## BB#0:
@@ -802,15 +763,10 @@ define <32 x i8> @test_broadcast_16i8_32
; X32-AVX512-NEXT: vbroadcasti32x4 (%eax), %ymm0
; X32-AVX512-NEXT: retl
;
-; X64-AVX1-LABEL: test_broadcast_16i8_32i8:
-; X64-AVX1: ## BB#0:
-; X64-AVX1-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X64-AVX1-NEXT: retq
-;
-; X64-AVX2-LABEL: test_broadcast_16i8_32i8:
-; X64-AVX2: ## BB#0:
-; X64-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X64-AVX2-NEXT: retq
+; X64-AVX-LABEL: test_broadcast_16i8_32i8:
+; X64-AVX: ## BB#0:
+; X64-AVX-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X64-AVX-NEXT: retq
;
; X64-AVX512-LABEL: test_broadcast_16i8_32i8:
; X64-AVX512: ## BB#0:
@@ -832,8 +788,8 @@ define <64 x i8> @test_broadcast_16i8_64
; X32-AVX2-LABEL: test_broadcast_16i8_64i8:
; X32-AVX2: ## BB#0:
; X32-AVX2-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X32-AVX2-NEXT: vmovdqa %ymm0, %ymm1
+; X32-AVX2-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X32-AVX2-NEXT: vmovaps %ymm0, %ymm1
; X32-AVX2-NEXT: retl
;
; X32-AVX512F-LABEL: test_broadcast_16i8_64i8:
@@ -865,8 +821,8 @@ define <64 x i8> @test_broadcast_16i8_64
;
; X64-AVX2-LABEL: test_broadcast_16i8_64i8:
; X64-AVX2: ## BB#0:
-; X64-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
-; X64-AVX2-NEXT: vmovdqa %ymm0, %ymm1
+; X64-AVX2-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; X64-AVX2-NEXT: vmovaps %ymm0, %ymm1
; X64-AVX2-NEXT: retq
;
; X64-AVX512F-LABEL: test_broadcast_16i8_64i8:
Modified: llvm/trunk/test/CodeGen/X86/vector-shuffle-256-v4.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vector-shuffle-256-v4.ll?rev=282684&r1=282683&r2=282684&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vector-shuffle-256-v4.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vector-shuffle-256-v4.ll Thu Sep 29 00:54:28 2016
@@ -1333,7 +1333,7 @@ define <4 x i64> @splat128_mem_v4i64_fro
;
; AVX2-LABEL: splat128_mem_v4i64_from_v2i64:
; AVX2: # BB#0:
-; AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
+; AVX2-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
; AVX2-NEXT: retq
;
; AVX512VL-LABEL: splat128_mem_v4i64_from_v2i64:
More information about the llvm-commits
mailing list