Skip to content

Commit 40beab1

Browse files
committed
AMDGPU: Custom lower fptrunc vectors for f32 -> f16
clang-format fixes
1 parent eac6d6e commit 40beab1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -920,8 +920,9 @@ SITargetLowering::SITargetLowering(const TargetMachine &TM,
920920
}
921921

922922
if (Subtarget->hasCvtPkF16F32Inst()) {
923-
setOperationAction(ISD::FP_ROUND, {MVT::v2f16, MVT::v4f16, MVT::v8f16,
924-
MVT::v16f16}, Custom);
923+
setOperationAction(ISD::FP_ROUND,
924+
{MVT::v2f16, MVT::v4f16, MVT::v8f16, MVT::v16f16},
925+
Custom);
925926
}
926927

927928
setTargetDAGCombine({ISD::ADD,
@@ -6913,8 +6914,8 @@ SDValue SITargetLowering::splitFP_ROUNDVectorOp(SDValue Op,
69136914
SDLoc DL(Op);
69146915
unsigned Opc = Op.getOpcode();
69156916
SDValue Flags = Op.getOperand(1);
6916-
EVT HalfDstVT = EVT::getVectorVT(*DAG.getContext(), DstVT.getScalarType(),
6917-
NumElts / 2);
6917+
EVT HalfDstVT
6918+
= EVT::getVectorVT(*DAG.getContext(), DstVT.getScalarType(), NumElts / 2);
69186919
SDValue OpLo = DAG.getNode(Opc, DL, HalfDstVT, Lo, Flags);
69196920
SDValue OpHi = DAG.getNode(Opc, DL, HalfDstVT, Hi, Flags);
69206921

0 commit comments

Comments
 (0)