Skip to content

Commit 8c3ca55

Browse files
committed
Fast Path Math.min/max_F/D
Re-enable the fast-pathing of Math.min/max for floating points with the behaviours around +/-0.0 and NaN correctly handled. Signed-off-by: Luke Li <[email protected]>
1 parent e395c4f commit 8c3ca55

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

runtime/compiler/p/codegen/J9CodeGenerator.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ J9::Power::CodeGenerator::initialize()
147147
cg->setIsDualTLH();
148148
}
149149

150+
static bool disableInlineMath_MaxMin_FD = feGetEnv("TR_disableInlineMaxMin") != NULL;
151+
if (!disableInlineMath_MaxMin_FD && comp->target().cpu.isAtLeast(OMR_PROCESSOR_PPC_P7))
152+
{
153+
cg->setSupportsInlineMath_MaxMin_FD();
154+
}
155+
150156
/*
151157
* "Statically" initialize the FE-specific tree evaluator functions.
152158
* This code only needs to execute once per JIT lifetime.

runtime/compiler/p/codegen/J9TreeEvaluator.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12173,7 +12173,6 @@ J9::Power::CodeGenerator::inlineDirectCall(TR::Node *node, TR::Register *&result
1217312173
return true;
1217412174
}
1217512175
break;
12176-
1217712176
case TR::java_lang_Math_fma_D:
1217812177
case TR::java_lang_StrictMath_fma_D:
1217912178
resultReg = inlineFPTrg1Src3(node, TR::InstOpCode::fmadd, cg);

0 commit comments

Comments
 (0)