< prev index next >

src/hotspot/share/opto/mulnode.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2017, 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. --- 1,7 ---- /* ! * Copyright (c) 1997, 2018, 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.
*** 29,38 **** --- 29,42 ---- #include "opto/convertnode.hpp" #include "opto/memnode.hpp" #include "opto/mulnode.hpp" #include "opto/phaseX.hpp" #include "opto/subnode.hpp" + #include "utilities/macros.hpp" + #if INCLUDE_SHENANDOAHGC + #include "gc/shenandoah/c2/shenandoahBarrierSetC2.hpp" + #endif // Portions of code courtesy of Clifford Click //=============================================================================
*** 472,481 **** --- 476,494 ---- if( !t2 || !t2->is_con() ) return MulNode::Ideal(phase, can_reshape); const int mask = t2->get_con(); Node *load = in(1); uint lop = load->Opcode(); + #if INCLUDE_SHENANDOAHGC + if (UseShenandoahGC && ShenandoahBarrierC2Support::is_gc_state_load(load)) { + // Do not touch the load+mask, we would match the whole sequence exactly. + // Converting the load to LoadUB/LoadUS would mismatch and waste a register + // on the barrier fastpath. + return NULL; + } + #endif + // Masking bits off of a Character? Hi bits are already zero. if( lop == Op_LoadUS && (mask & 0xFFFF0000) ) // Can we make a smaller mask? return new AndINode(load,phase->intcon(mask&0xFFFF));
< prev index next >