[llvm] r260010 - [X86][AVX2] Regenerated broadcast domain tests
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 6 14:09:26 PST 2016
Author: rksimon
Date: Sat Feb 6 16:09:25 2016
New Revision: 260010
URL: http://llvm.org/viewvc/llvm-project?rev=260010&view=rev
Log:
[X86][AVX2] Regenerated broadcast domain tests
Modified:
llvm/trunk/test/CodeGen/X86/exedepsfix-broadcast.ll
Modified: llvm/trunk/test/CodeGen/X86/exedepsfix-broadcast.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/exedepsfix-broadcast.ll?rev=260010&r1=260009&r2=260010&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/exedepsfix-broadcast.ll (original)
+++ llvm/trunk/test/CodeGen/X86/exedepsfix-broadcast.ll Sat Feb 6 16:09:25 2016
@@ -1,13 +1,16 @@
-; RUN: llc -O3 -mtriple=x86_64-apple-macosx -o - < %s -mattr=+avx2 -enable-unsafe-fp-math -mcpu=core2 | FileCheck %s
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-apple-macosx -mattr=+avx2 -enable-unsafe-fp-math | FileCheck %s
+
; Check that the ExeDepsFix pass correctly fixes the domain for broadcast instructions.
; <rdar://problem/16354675>
-; CHECK-LABEL: ExeDepsFix_broadcastss
-; CHECK: broadcastss
-; CHECK: vandps
-; CHECK: vmaxps
-; CHECK: ret
define <4 x float> @ExeDepsFix_broadcastss(<4 x float> %arg, <4 x float> %arg2) {
+; CHECK-LABEL: ExeDepsFix_broadcastss:
+; CHECK: ## BB#0:
+; CHECK-NEXT: vbroadcastss {{.*}}(%rip), %xmm2
+; CHECK-NEXT: vandps %xmm2, %xmm0, %xmm0
+; CHECK-NEXT: vmaxps %xmm1, %xmm0, %xmm0
+; CHECK-NEXT: retq
%bitcast = bitcast <4 x float> %arg to <4 x i32>
%and = and <4 x i32> %bitcast, <i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647>
%floatcast = bitcast <4 x i32> %and to <4 x float>
@@ -16,12 +19,13 @@ define <4 x float> @ExeDepsFix_broadcast
ret <4 x float> %max
}
-; CHECK-LABEL: ExeDepsFix_broadcastss256
-; CHECK: broadcastss
-; CHECK: vandps
-; CHECK: vmaxps
-; CHECK: ret
define <8 x float> @ExeDepsFix_broadcastss256(<8 x float> %arg, <8 x float> %arg2) {
+; CHECK-LABEL: ExeDepsFix_broadcastss256:
+; CHECK: ## BB#0:
+; CHECK-NEXT: vbroadcastss {{.*}}(%rip), %ymm2
+; CHECK-NEXT: vandps %ymm2, %ymm0, %ymm0
+; CHECK-NEXT: vmaxps %ymm1, %ymm0, %ymm0
+; CHECK-NEXT: retq
%bitcast = bitcast <8 x float> %arg to <8 x i32>
%and = and <8 x i32> %bitcast, <i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647>
%floatcast = bitcast <8 x i32> %and to <8 x float>
@@ -30,13 +34,14 @@ define <8 x float> @ExeDepsFix_broadcast
ret <8 x float> %max
}
-
-; CHECK-LABEL: ExeDepsFix_broadcastss_inreg
-; CHECK: broadcastss
-; CHECK: vandps
-; CHECK: vmaxps
-; CHECK: ret
define <4 x float> @ExeDepsFix_broadcastss_inreg(<4 x float> %arg, <4 x float> %arg2, i32 %broadcastvalue) {
+; CHECK-LABEL: ExeDepsFix_broadcastss_inreg:
+; CHECK: ## BB#0:
+; CHECK-NEXT: vmovd %edi, %xmm2
+; CHECK-NEXT: vbroadcastss %xmm2, %xmm2
+; CHECK-NEXT: vandps %xmm2, %xmm0, %xmm0
+; CHECK-NEXT: vmaxps %xmm1, %xmm0, %xmm0
+; CHECK-NEXT: retq
%bitcast = bitcast <4 x float> %arg to <4 x i32>
%in = insertelement <4 x i32> undef, i32 %broadcastvalue, i32 0
%mask = shufflevector <4 x i32> %in, <4 x i32> undef, <4 x i32> zeroinitializer
@@ -47,12 +52,14 @@ define <4 x float> @ExeDepsFix_broadcast
ret <4 x float> %max
}
-; CHECK-LABEL: ExeDepsFix_broadcastss256_inreg
-; CHECK: broadcastss
-; CHECK: vandps
-; CHECK: vmaxps
-; CHECK: ret
define <8 x float> @ExeDepsFix_broadcastss256_inreg(<8 x float> %arg, <8 x float> %arg2, i32 %broadcastvalue) {
+; CHECK-LABEL: ExeDepsFix_broadcastss256_inreg:
+; CHECK: ## BB#0:
+; CHECK-NEXT: vmovd %edi, %xmm2
+; CHECK-NEXT: vbroadcastss %xmm2, %ymm2
+; CHECK-NEXT: vandps %ymm2, %ymm0, %ymm0
+; CHECK-NEXT: vmaxps %ymm1, %ymm0, %ymm0
+; CHECK-NEXT: retq
%bitcast = bitcast <8 x float> %arg to <8 x i32>
%in = insertelement <8 x i32> undef, i32 %broadcastvalue, i32 0
%mask = shufflevector <8 x i32> %in, <8 x i32> undef, <8 x i32> zeroinitializer
@@ -63,12 +70,13 @@ define <8 x float> @ExeDepsFix_broadcast
ret <8 x float> %max
}
-; CHECK-LABEL: ExeDepsFix_broadcastsd
; In that case the broadcast is directly folded into vandpd.
-; CHECK: vandpd
-; CHECK: vmaxpd
-; CHECK:ret
define <2 x double> @ExeDepsFix_broadcastsd(<2 x double> %arg, <2 x double> %arg2) {
+; CHECK-LABEL: ExeDepsFix_broadcastsd:
+; CHECK: ## BB#0:
+; CHECK-NEXT: vandpd {{.*}}(%rip), %xmm0, %xmm0
+; CHECK-NEXT: vmaxpd %xmm1, %xmm0, %xmm0
+; CHECK-NEXT: retq
%bitcast = bitcast <2 x double> %arg to <2 x i64>
%and = and <2 x i64> %bitcast, <i64 2147483647, i64 2147483647>
%floatcast = bitcast <2 x i64> %and to <2 x double>
@@ -77,12 +85,13 @@ define <2 x double> @ExeDepsFix_broadcas
ret <2 x double> %max
}
-; CHECK-LABEL: ExeDepsFix_broadcastsd256
-; CHECK: broadcastsd
-; CHECK: vandpd
-; CHECK: vmaxpd
-; CHECK: ret
define <4 x double> @ExeDepsFix_broadcastsd256(<4 x double> %arg, <4 x double> %arg2) {
+; CHECK-LABEL: ExeDepsFix_broadcastsd256:
+; CHECK: ## BB#0:
+; CHECK-NEXT: vbroadcastsd {{.*}}(%rip), %ymm2
+; CHECK-NEXT: vandpd %ymm2, %ymm0, %ymm0
+; CHECK-NEXT: vmaxpd %ymm1, %ymm0, %ymm0
+; CHECK-NEXT: retq
%bitcast = bitcast <4 x double> %arg to <4 x i64>
%and = and <4 x i64> %bitcast, <i64 2147483647, i64 2147483647, i64 2147483647, i64 2147483647>
%floatcast = bitcast <4 x i64> %and to <4 x double>
@@ -91,16 +100,16 @@ define <4 x double> @ExeDepsFix_broadcas
ret <4 x double> %max
}
-
-; CHECK-LABEL: ExeDepsFix_broadcastsd_inreg
; ExeDepsFix works top down, thus it coalesces vpunpcklqdq domain with
; vpand and there is nothing more you can do to match vmaxpd.
-; CHECK: vmovq
-; CHECK: vpbroadcastq
-; CHECK: vpand
-; CHECK: vmaxpd
-; CHECK: ret
define <2 x double> @ExeDepsFix_broadcastsd_inreg(<2 x double> %arg, <2 x double> %arg2, i64 %broadcastvalue) {
+; CHECK-LABEL: ExeDepsFix_broadcastsd_inreg:
+; CHECK: ## BB#0:
+; CHECK-NEXT: vmovq %rdi, %xmm2
+; CHECK-NEXT: vpbroadcastq %xmm2, %xmm2
+; CHECK-NEXT: vpand %xmm2, %xmm0, %xmm0
+; CHECK-NEXT: vmaxpd %xmm1, %xmm0, %xmm0
+; CHECK-NEXT: retq
%bitcast = bitcast <2 x double> %arg to <2 x i64>
%in = insertelement <2 x i64> undef, i64 %broadcastvalue, i32 0
%mask = shufflevector <2 x i64> %in, <2 x i64> undef, <2 x i32> zeroinitializer
@@ -111,12 +120,14 @@ define <2 x double> @ExeDepsFix_broadcas
ret <2 x double> %max
}
-; CHECK-LABEL: ExeDepsFix_broadcastsd256_inreg
-; CHECK: broadcastsd
-; CHECK: vandpd
-; CHECK: vmaxpd
-; CHECK: ret
define <4 x double> @ExeDepsFix_broadcastsd256_inreg(<4 x double> %arg, <4 x double> %arg2, i64 %broadcastvalue) {
+; CHECK-LABEL: ExeDepsFix_broadcastsd256_inreg:
+; CHECK: ## BB#0:
+; CHECK-NEXT: vmovq %rdi, %xmm2
+; CHECK-NEXT: vbroadcastsd %xmm2, %ymm2
+; CHECK-NEXT: vandpd %ymm2, %ymm0, %ymm0
+; CHECK-NEXT: vmaxpd %ymm1, %ymm0, %ymm0
+; CHECK-NEXT: retq
%bitcast = bitcast <4 x double> %arg to <4 x i64>
%in = insertelement <4 x i64> undef, i64 %broadcastvalue, i32 0
%mask = shufflevector <4 x i64> %in, <4 x i64> undef, <4 x i32> zeroinitializer
@@ -126,4 +137,3 @@ define <4 x double> @ExeDepsFix_broadcas
%max = select <4 x i1> %max_is_x, <4 x double> %floatcast, <4 x double> %arg2
ret <4 x double> %max
}
-
More information about the llvm-commits
mailing list