Index: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp =================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp @@ -17951,7 +17951,7 @@ SDValue FPclass = DAG.getNode(IntrData->Opc0, dl, MVT::i1, Src1, Imm); SDValue FPclassMask = getScalarMaskingNode(FPclass, Mask, DAG.getTargetConstant(0, dl, MVT::i1), Subtarget, DAG); - return DAG.getNode(ISD::SIGN_EXTEND, dl, MVT::i8, FPclassMask); + return DAG.getNode(ISD::ZERO_EXTEND, dl, MVT::i8, FPclassMask); } case CMP_MASK: case CMP_MASK_CC: { Index: llvm/trunk/test/CodeGen/X86/avx512dq-intrinsics.ll =================================================================== --- llvm/trunk/test/CodeGen/X86/avx512dq-intrinsics.ll +++ llvm/trunk/test/CodeGen/X86/avx512dq-intrinsics.ll @@ -490,19 +490,9 @@ ; CHECK-NEXT: andl $1, %edi ; CHECK-NEXT: kmovw %edi, %k1 ; CHECK-NEXT: vfpclasssd $2, %xmm0, %k0 {%k1} -; CHECK-NEXT: kmovw %k0, %eax -; CHECK-NEXT: testb %al, %al -; CHECK-NEXT: je LBB28_2 -; CHECK-NEXT: ## BB#1: -; CHECK-NEXT: movb $-1, %al -; CHECK-NEXT: LBB28_2: -; CHECK-NEXT: vfpclasssd $4, %xmm0, %k0 ; CHECK-NEXT: kmovw %k0, %ecx -; CHECK-NEXT: testb %cl, %cl -; CHECK-NEXT: je LBB28_4 -; CHECK-NEXT: ## BB#3: -; CHECK-NEXT: movb $-1, %cl -; CHECK-NEXT: LBB28_4: +; CHECK-NEXT: vfpclasssd $4, %xmm0, %k0 +; CHECK-NEXT: kmovw %k0, %eax ; CHECK-NEXT: addb %cl, %al ; CHECK-NEXT: ## kill: %AL %AL %AX ; CHECK-NEXT: retq @@ -520,19 +510,9 @@ ; CHECK-NEXT: andl $1, %edi ; CHECK-NEXT: kmovw %edi, %k1 ; CHECK-NEXT: vfpclassss $4, %xmm0, %k0 {%k1} -; CHECK-NEXT: kmovw %k0, %eax -; CHECK-NEXT: testb %al, %al -; CHECK-NEXT: je LBB29_2 -; CHECK-NEXT: ## BB#1: -; CHECK-NEXT: movb $-1, %al -; CHECK-NEXT: LBB29_2: -; CHECK-NEXT: vfpclassss $4, %xmm0, %k0 ; CHECK-NEXT: kmovw %k0, %ecx -; CHECK-NEXT: testb %cl, %cl -; CHECK-NEXT: je LBB29_4 -; CHECK-NEXT: ## BB#3: -; CHECK-NEXT: movb $-1, %cl -; CHECK-NEXT: LBB29_4: +; CHECK-NEXT: vfpclassss $4, %xmm0, %k0 +; CHECK-NEXT: kmovw %k0, %eax ; CHECK-NEXT: addb %cl, %al ; CHECK-NEXT: ## kill: %AL %AL %AX ; CHECK-NEXT: retq