RFR: 8357822: C2: Multiple string optimization tests are no longer testing string concatenation optimizations
    Emanuel Peter 
    epeter at openjdk.org
       
    Wed Jun  4 07:39:19 UTC 2025
    
    
  
On Tue, 3 Jun 2025 07:17:47 GMT, Daniel Skantz <dskantz at openjdk.org> wrote:
> This PR updates a few tests to reintroduce testing of string concatenation optimizations since a few bugs have recently been identified in this area.
> 
> Selection criteria: performed a text search on the test suite and identified tests for string concatenations or string optimizations that are not currently compiled with `-XDstringConcat=inline` and are not using StringBuilders explicitly.
> 
> Testing: T1-4.
> 
> Extra testing: ran the tests manually with `-XX:+PrintOptimizeStringConcat` and verified that the tests are exercising string optimizations after the fix.
@danielogh Thanks for looking into this and finding more tests!
Looks reasonable to me. I'm not super familiar with string optimizations, so it would be good if a second reviewer knew a little more. But it looks at least like a good step in the right direction from what I can see :)
test/hotspot/jtreg/compiler/c2/Test7046096.java line 36:
> 34: /*
> 35:  * @test id=stringConcatInline
> 36:  * @bug 7046096
Suggestion:
 * @bug 7046096 8357822
I'd at the new number here. But probably optional.
-------------
Marked as reviewed by epeter (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/25610#pullrequestreview-2895609510
PR Review Comment: https://git.openjdk.org/jdk/pull/25610#discussion_r2125886046
    
    
More information about the hotspot-compiler-dev
mailing list