[9] RFR(S): 8136469: OptimizeStringConcat fails on pre-sized StringBuilder shapes

Tobias Hartmann tobias.hartmann at oracle.com
Fri Sep 18 11:00:08 UTC 2015

Hi Aleksey, 

thanks for having a look.

On 18.09.2015 12:38, Aleksey Shipilev wrote:
> Hi,
> On 09/18/2015 12:57 PM, Tobias Hartmann wrote:
>> https://bugs.openjdk.java.net/browse/JDK-8136469
>> http://cr.openjdk.java.net/~thartmann/8136469/webrev.00/
> Fix itself looks good to me, but why don't we add a proper
> PrintOptimizeStringConcat debug block instead of the assert?

I had that at first but then thought that with the additional check for a dead test, the isa_Bool() should not fail.

> I think OptoStringConcat should fail gracefully on graph mismatch
> anyway, not crash the fastdebug build. Is it possible to have anything
> else besides Bool or Con as an input for If?

IfNode::Ideal() suggests that we could also have TOP but I don't think this should be possible right after parsing.

To be save, we can also go with this fix:


More information about the hotspot-compiler-dev mailing list