Skip to content

Commit 7a688c0

Browse files
committed
[ARM] Add vector vrint tests and fix FP16 to expand.
1 parent c3cce7c commit 7a688c0

File tree

3 files changed

+2671
-94
lines changed

3 files changed

+2671
-94
lines changed

llvm/lib/Target/ARM/ARMISelLowering.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,6 @@ ARMTargetLowering::ARMTargetLowering(const TargetMachine &TM,
901901
setOperationAction(ISD::FEXP, MVT::v2f64, Expand);
902902
setOperationAction(ISD::FEXP2, MVT::v2f64, Expand);
903903
setOperationAction(ISD::FEXP10, MVT::v2f64, Expand);
904-
// FIXME: Create unittest for FCEIL, FTRUNC, FRINT, FNEARBYINT, FFLOOR.
905904
setOperationAction(ISD::FCEIL, MVT::v2f64, Expand);
906905
setOperationAction(ISD::FTRUNC, MVT::v2f64, Expand);
907906
setOperationAction(ISD::FRINT, MVT::v2f64, Expand);
@@ -951,6 +950,12 @@ ARMTargetLowering::ARMTargetLowering(const TargetMachine &TM,
951950
setOperationAction(ISD::FNEARBYINT, MVT::v2f32, Expand);
952951
setOperationAction(ISD::FFLOOR, MVT::v2f32, Expand);
953952

953+
for (ISD::NodeType Op : {ISD::FFLOOR, ISD::FNEARBYINT, ISD::FCEIL,
954+
ISD::FRINT, ISD::FTRUNC, ISD::FROUNDEVEN}) {
955+
setOperationAction(Op, MVT::v4f16, Expand);
956+
setOperationAction(Op, MVT::v8f16, Expand);
957+
}
958+
954959
// Neon does not support some operations on v1i64 and v2i64 types.
955960
setOperationAction(ISD::MUL, MVT::v1i64, Expand);
956961
// Custom handling for some quad-vector types to detect VMULL.

0 commit comments

Comments
 (0)