[llvm] r278626 - [AVX512] Fix VFPCLASSSD/VFPCLASSSS intrinsic lowering. The i1 result should be zero extended according to SPEC.
Igor Breger via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 14 06:58:57 PDT 2016
Author: ibreger
Date: Sun Aug 14 08:58:57 2016
New Revision: 278626
URL: http://llvm.org/viewvc/llvm-project?rev=278626&view=rev
Log:
[AVX512] Fix VFPCLASSSD/VFPCLASSSS intrinsic lowering. The i1 result should be zero extended according to SPEC.
Differential Revision: http://reviews.llvm.org/D23489
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/CodeGen/X86/avx512dq-intrinsics.ll
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=278626&r1=278625&r2=278626&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Aug 14 08:58:57 2016
@@ -17951,7 +17951,7 @@ static SDValue LowerINTRINSIC_WO_CHAIN(S
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: {
Modified: llvm/trunk/test/CodeGen/X86/avx512dq-intrinsics.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512dq-intrinsics.ll?rev=278626&r1=278625&r2=278626&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx512dq-intrinsics.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx512dq-intrinsics.ll Sun Aug 14 08:58:57 2016
@@ -490,19 +490,9 @@ define i8 @test_int_x86_avx512_mask_fpcl
; 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<def> %AL<kill> %AX<kill>
; CHECK-NEXT: retq
@@ -520,19 +510,9 @@ define i8 @test_int_x86_avx512_mask_fpcl
; 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<def> %AL<kill> %AX<kill>
; CHECK-NEXT: retq
More information about the llvm-commits
mailing list