@@ -4067,14 +4067,14 @@ SDValue SITargetLowering::lowerSET_ROUNDING(SDValue Op,
4067
4067
// Index a table of 4-bit entries mapping from the C FLT_ROUNDS values to the
4068
4068
// hardware MODE.fp_round values.
4069
4069
if (auto *ConstMode = dyn_cast<ConstantSDNode>(NewMode)) {
4070
- uint32_t ClampedVal = std::min(
4071
- static_cast<uint32_t>(ConstMode->getZExtValue()),
4072
- static_cast<uint32_t>(AMDGPU::TowardZeroF32_TowardNegativeF64));
4073
- NewMode = DAG.getConstant(
4074
- AMDGPU::decodeFltRoundToHWConversionTable(ClampedVal), SL, MVT::i32);
4070
+ uint32_t ClampedVal = std::min(
4071
+ static_cast<uint32_t>(ConstMode->getZExtValue()),
4072
+ static_cast<uint32_t>(AMDGPU::TowardZeroF32_TowardNegativeF64));
4073
+ NewMode = DAG.getConstant(
4074
+ AMDGPU::decodeFltRoundToHWConversionTable(ClampedVal), SL, MVT::i32);
4075
4075
} else {
4076
4076
SDValue BitTable =
4077
- DAG.getConstant(AMDGPU::FltRoundToHWConversionTable, SL, MVT::i64);
4077
+ DAG.getConstant(AMDGPU::FltRoundToHWConversionTable, SL, MVT::i64);
4078
4078
4079
4079
// The supported standard values are 0-3. The extended values start at 8. We
4080
4080
// need to offset by 4 if the value is in the extended range.
@@ -4085,17 +4085,17 @@ SDValue SITargetLowering::lowerSET_ROUNDING(SDValue Op,
4085
4085
4086
4086
SDValue Four = DAG.getConstant(4, SL, MVT::i32);
4087
4087
SDValue IsStandardValue =
4088
- DAG.getSetCC(SL, MVT::i1, NewMode, Four, ISD::SETULT);
4088
+ DAG.getSetCC(SL, MVT::i1, NewMode, Four, ISD::SETULT);
4089
4089
SDValue OffsetEnum = DAG.getNode(ISD::SUB, SL, MVT::i32, NewMode, Four);
4090
4090
SDValue IndexVal = DAG.getNode(ISD::SELECT, SL, MVT::i32, IsStandardValue,
4091
4091
NewMode, OffsetEnum);
4092
4092
4093
4093
SDValue Two = DAG.getConstant(2, SL, MVT::i32);
4094
4094
SDValue RoundModeTimesNumBits =
4095
- DAG.getNode(ISD::SHL, SL, MVT::i32, IndexVal, Two);
4095
+ DAG.getNode(ISD::SHL, SL, MVT::i32, IndexVal, Two);
4096
4096
4097
4097
SDValue TableValue =
4098
- DAG.getNode(ISD::SRL, SL, MVT::i64, BitTable, RoundModeTimesNumBits);
4098
+ DAG.getNode(ISD::SRL, SL, MVT::i64, BitTable, RoundModeTimesNumBits);
4099
4099
SDValue TruncTable = DAG.getNode(ISD::TRUNCATE, SL, MVT::i32, TableValue);
4100
4100
4101
4101
// No need to mask out the high bits since the setreg will ignore them
@@ -4106,7 +4106,7 @@ SDValue SITargetLowering::lowerSET_ROUNDING(SDValue Op,
4106
4106
// earlier and keep more operations scalar, but that interferes with
4107
4107
// combining the source.
4108
4108
SDValue ReadFirstLaneID =
4109
- DAG.getTargetConstant(Intrinsic::amdgcn_readfirstlane, SL, MVT::i32);
4109
+ DAG.getTargetConstant(Intrinsic::amdgcn_readfirstlane, SL, MVT::i32);
4110
4110
NewMode = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, SL, MVT::i32,
4111
4111
ReadFirstLaneID, NewMode);
4112
4112
}
0 commit comments