mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-10 14:36:12 +00:00
AArch64: only try to use scaled fcvt ops on legal vector types.
Before we ended up calling getSimpleVectorType on a <3 x float>, which asserted. llvm-svn: 263169
This commit is contained in:
parent
4aba3720bc
commit
594e5f0364
@ -7687,7 +7687,8 @@ static SDValue performFpToIntCombine(SDNode *N, SelectionDAG &DAG,
|
||||
return SDValue();
|
||||
|
||||
SDValue Op = N->getOperand(0);
|
||||
if (!Op.getValueType().isVector() || Op.getOpcode() != ISD::FMUL)
|
||||
if (!Op.getValueType().isVector() || !Op.getValueType().isSimple() ||
|
||||
Op.getOpcode() != ISD::FMUL)
|
||||
return SDValue();
|
||||
|
||||
SDValue ConstVec = Op->getOperand(1);
|
||||
|
@ -152,3 +152,11 @@ define <2 x i32> @test14(<2 x float> %f) {
|
||||
%vcvt.i = fptosi <2 x float> %mul.i to <2 x i32>
|
||||
ret <2 x i32> %vcvt.i
|
||||
}
|
||||
|
||||
; CHECK-LABEL: test_illegal_fp_to_int:
|
||||
; CHECK: fcvtzs.4s v0, v0, #2
|
||||
define <3 x i32> @test_illegal_fp_to_int(<3 x float> %in) {
|
||||
%scale = fmul <3 x float> %in, <float 4.0, float 4.0, float 4.0>
|
||||
%val = fptosi <3 x float> %scale to <3 x i32>
|
||||
ret <3 x i32> %val
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user