[llvm] r287903 - [X86] Modify two tests that passed undef to both sides of a vselect to instead pass unique values.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 24 13:48:50 PST 2016
Author: ctopper
Date: Thu Nov 24 15:48:50 2016
New Revision: 287903
URL: http://llvm.org/viewvc/llvm-project?rev=287903&view=rev
Log:
[X86] Modify two tests that passed undef to both sides of a vselect to instead pass unique values.
I'd like to teach DAG combine to remove vselects where both sides are identical and these tests were in the way of that.
Modified:
llvm/trunk/test/CodeGen/X86/2011-10-19-widen_vselect.ll
llvm/trunk/test/CodeGen/X86/2011-10-21-widen-cmp.ll
Modified: llvm/trunk/test/CodeGen/X86/2011-10-19-widen_vselect.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2011-10-19-widen_vselect.ll?rev=287903&r1=287902&r2=287903&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2011-10-19-widen_vselect.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2011-10-19-widen_vselect.ll Thu Nov 24 15:48:50 2016
@@ -6,9 +6,9 @@
; CHECK-LABEL: simple_widen
; CHECK-NOT: blend
; CHECK: ret
-define void @simple_widen() {
+define void @simple_widen(<2 x float> %a, <2 x float> %b) {
entry:
- %0 = select <2 x i1> undef, <2 x float> undef, <2 x float> undef
+ %0 = select <2 x i1> undef, <2 x float> %a, <2 x float> %b
store <2 x float> %0, <2 x float>* undef
ret void
}
@@ -17,10 +17,10 @@ entry:
; CHECK: blend
; CHECK: ret
-define void @complex_inreg_work() {
+define void @complex_inreg_work(<2 x float> %a, <2 x float> %b) {
entry:
%0 = fcmp oeq <2 x float> undef, undef
- %1 = select <2 x i1> %0, <2 x float> undef, <2 x float> undef
+ %1 = select <2 x i1> %0, <2 x float> %a, <2 x float> %b
store <2 x float> %1, <2 x float>* undef
ret void
}
Modified: llvm/trunk/test/CodeGen/X86/2011-10-21-widen-cmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2011-10-21-widen-cmp.ll?rev=287903&r1=287902&r2=287903&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2011-10-21-widen-cmp.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2011-10-21-widen-cmp.ll Thu Nov 24 15:48:50 2016
@@ -4,34 +4,36 @@
; Check that a <4 x float> compare is generated and that we are
; not stuck in an endless loop.
-define void @cmp_2_floats() {
+define void @cmp_2_floats(<2 x float> %a, <2 x float> %b) {
; CHECK-LABEL: cmp_2_floats:
; CHECK: # BB#0: # %entry
+; CHECK-NEXT: movaps %xmm0, %xmm2
; CHECK-NEXT: cmpordps %xmm0, %xmm0
; CHECK-NEXT: pmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
; CHECK-NEXT: psllq $32, %xmm0
; CHECK-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,3,2,3]
; CHECK-NEXT: pslld $31, %xmm0
-; CHECK-NEXT: blendvps %xmm0, %xmm0
-; CHECK-NEXT: movlps %xmm0, (%rax)
+; CHECK-NEXT: blendvps %xmm2, %xmm1
+; CHECK-NEXT: movlps %xmm1, (%rax)
; CHECK-NEXT: retq
entry:
%0 = fcmp oeq <2 x float> undef, undef
- %1 = select <2 x i1> %0, <2 x float> undef, <2 x float> undef
+ %1 = select <2 x i1> %0, <2 x float> %a, <2 x float> %b
store <2 x float> %1, <2 x float>* undef
ret void
}
-define void @cmp_2_doubles() {
+define void @cmp_2_doubles(<2 x double> %a, <2 x double> %b) {
; CHECK-LABEL: cmp_2_doubles:
; CHECK: # BB#0: # %entry
+; CHECK-NEXT: movapd %xmm0, %xmm2
; CHECK-NEXT: cmpordpd %xmm0, %xmm0
-; CHECK-NEXT: blendvpd %xmm0, %xmm0
-; CHECK-NEXT: movapd %xmm0, (%rax)
+; CHECK-NEXT: blendvpd %xmm2, %xmm1
+; CHECK-NEXT: movapd %xmm1, (%rax)
; CHECK-NEXT: retq
entry:
%0 = fcmp oeq <2 x double> undef, undef
- %1 = select <2 x i1> %0, <2 x double> undef, <2 x double> undef
+ %1 = select <2 x i1> %0, <2 x double> %a, <2 x double> %b
store <2 x double> %1, <2 x double>* undef
ret void
}
More information about the llvm-commits
mailing list