@@ -3070,14 +3070,14 @@ SDValue AMDGPUTargetLowering::lowerFEXP(SDValue Op, SelectionDAG &DAG) const {
30703070 SDNodeFlags Flags = Op->getFlags ();
30713071 const bool IsExp10 = Op.getOpcode () == ISD::FEXP10;
30723072
3073- if (VT.getScalarType () == MVT::f16 ) {
3074- // v_exp_f16 (fmul x, log2e)
3075-
3076- if (allowApproxFunc (DAG, Flags)) { // TODO: Does this really require fast?
3077- return IsExp10 ? lowerFEXP10Unsafe (X, SL, DAG, Flags)
3078- : lowerFEXPUnsafe (X, SL, DAG, Flags);
3079- }
3073+ // TODO: Interpret allowApproxFunc as ignoring DAZ. This is currently copying
3074+ // library behavior. Also, is known-not-daz source sufficient?
3075+ if (allowApproxFunc (DAG, Flags)) { // TODO: Does this really require fast?
3076+ return IsExp10 ? lowerFEXP10Unsafe (X, SL, DAG, Flags)
3077+ : lowerFEXPUnsafe (X, SL, DAG, Flags);
3078+ }
30803079
3080+ if (VT.getScalarType () == MVT::f16 ) {
30813081 if (VT.isVector ())
30823082 return SDValue ();
30833083
@@ -3096,13 +3096,6 @@ SDValue AMDGPUTargetLowering::lowerFEXP(SDValue Op, SelectionDAG &DAG) const {
30963096
30973097 assert (VT == MVT::f32 );
30983098
3099- // TODO: Interpret allowApproxFunc as ignoring DAZ. This is currently copying
3100- // library behavior. Also, is known-not-daz source sufficient?
3101- if (allowApproxFunc (DAG, Flags)) {
3102- return IsExp10 ? lowerFEXP10Unsafe (X, SL, DAG, Flags)
3103- : lowerFEXPUnsafe (X, SL, DAG, Flags);
3104- }
3105-
31063099 // Algorithm:
31073100 //
31083101 // e^x = 2^(x/ln(2)) = 2^(x*(64/ln(2))/64)
0 commit comments