[SelectionDAG] Add VSELECT support to ComputeNumSignBits

llvm-svn: 316457
This commit is contained in:
Simon Pilgrim 2017-10-24 16:38:38 +00:00
parent ac2b3e3a7a
commit 1bc62f03a5
2 changed files with 3 additions and 2 deletions

View File

@ -3109,6 +3109,7 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, const APInt &DemandedElts,
break;
case ISD::SELECT:
case ISD::VSELECT:
Tmp = ComputeNumSignBits(Op.getOperand(1), Depth+1);
if (Tmp == 1) return 1; // Early out.
Tmp2 = ComputeNumSignBits(Op.getOperand(2), Depth+1);

View File

@ -1685,9 +1685,9 @@ define <2 x double> @sbto2f64(<2 x double> %a) {
; VLNODQ-NEXT: vpcmpeqd %xmm0, %xmm0, %xmm0
; VLNODQ-NEXT: vmovdqa64 %xmm0, %xmm0 {%k1} {z}
; VLNODQ-NEXT: vpextrq $1, %xmm0, %rax
; VLNODQ-NEXT: vcvtsi2sdq %rax, %xmm2, %xmm1
; VLNODQ-NEXT: vcvtsi2sdl %eax, %xmm2, %xmm1
; VLNODQ-NEXT: vmovq %xmm0, %rax
; VLNODQ-NEXT: vcvtsi2sdq %rax, %xmm2, %xmm0
; VLNODQ-NEXT: vcvtsi2sdl %eax, %xmm2, %xmm0
; VLNODQ-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
; VLNODQ-NEXT: retq
%cmpres = fcmp ogt <2 x double> %a, zeroinitializer