< prev index next >
src/hotspot/share/opto/loopTransform.cpp
Print this page
rev 53930 : 8217561: X86: Add floating-point Math.min/max intrinsics (reduction pattern)
Summary: Implementation taking care of +/-0.0 and NaN which uses a specific pattern for reductions
Reviewed-by: aph, kvn, neliasso, sviswanathan, adinn
Contributed-by: Jatin Bhateja <jatin.bhateja@intel.com>
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -2037,11 +2037,12 @@
if (def_node != NULL) {
Node* n_ctrl = get_ctrl(def_node);
if (n_ctrl != NULL && loop->is_member(get_loop(n_ctrl))) {
// Now test it to see if it fits the standard pattern for a reduction operator.
int opc = def_node->Opcode();
- if (opc != ReductionNode::opcode(opc, def_node->bottom_type()->basic_type())) {
+ if (opc != ReductionNode::opcode(opc, def_node->bottom_type()->basic_type())
+ || opc == Op_MinD || opc == Op_MinF || opc == Op_MaxD || opc == Op_MaxF) {
if (!def_node->is_reduction()) { // Not marked yet
// To be a reduction, the arithmetic node must have the phi as input and provide a def to it
bool ok = false;
for (unsigned j = 1; j < def_node->req(); j++) {
Node* in = def_node->in(j);
< prev index next >