mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 03:23:01 +02:00
[X86] Don't crash on CVTPS2PH with wide vector inputs.
This commit is contained in:
parent
60eeed7af0
commit
b4071a353d
@ -29878,6 +29878,9 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N,
|
||||
Results.push_back(Chain);
|
||||
return;
|
||||
}
|
||||
case X86ISD::CVTPS2PH:
|
||||
Results.push_back(LowerCVTPS2PH(SDValue(N, 0), DAG));
|
||||
return;
|
||||
case ISD::CTPOP: {
|
||||
assert(N->getValueType(0) == MVT::i64 && "Unexpected VT!");
|
||||
// Use a v2i64 if possible.
|
||||
|
@ -1422,3 +1422,33 @@ define void @store_cvt_8f64_to_8i16(<8 x double> %a0, <8 x i16>* %a1) nounwind {
|
||||
store <8 x i16> %2, <8 x i16>* %a1
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @store_cvt_32f32_to_32f16(<32 x float> %a0, <32 x half>* %a1) nounwind {
|
||||
; AVX1-LABEL: store_cvt_32f32_to_32f16:
|
||||
; AVX1: # %bb.0:
|
||||
; AVX1-NEXT: vcvtps2ph $4, %ymm3, 48(%rdi)
|
||||
; AVX1-NEXT: vcvtps2ph $4, %ymm2, 32(%rdi)
|
||||
; AVX1-NEXT: vcvtps2ph $4, %ymm1, 16(%rdi)
|
||||
; AVX1-NEXT: vcvtps2ph $4, %ymm0, (%rdi)
|
||||
; AVX1-NEXT: vzeroupper
|
||||
; AVX1-NEXT: retq
|
||||
;
|
||||
; AVX2-LABEL: store_cvt_32f32_to_32f16:
|
||||
; AVX2: # %bb.0:
|
||||
; AVX2-NEXT: vcvtps2ph $4, %ymm3, 48(%rdi)
|
||||
; AVX2-NEXT: vcvtps2ph $4, %ymm2, 32(%rdi)
|
||||
; AVX2-NEXT: vcvtps2ph $4, %ymm1, 16(%rdi)
|
||||
; AVX2-NEXT: vcvtps2ph $4, %ymm0, (%rdi)
|
||||
; AVX2-NEXT: vzeroupper
|
||||
; AVX2-NEXT: retq
|
||||
;
|
||||
; AVX512-LABEL: store_cvt_32f32_to_32f16:
|
||||
; AVX512: # %bb.0:
|
||||
; AVX512-NEXT: vcvtps2ph $4, %zmm1, 32(%rdi)
|
||||
; AVX512-NEXT: vcvtps2ph $4, %zmm0, (%rdi)
|
||||
; AVX512-NEXT: vzeroupper
|
||||
; AVX512-NEXT: retq
|
||||
%1 = fptrunc <32 x float> %a0 to <32 x half>
|
||||
store <32 x half> %1, <32 x half>* %a1
|
||||
ret void
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user