RFR: 8279225: C1 longs comparison operation destroys argument registers [v2]

Sergey Nazarkin snazarki at openjdk.java.net
Mon Dec 27 11:47:47 UTC 2021


> Several regression tests are failed on arm32 CPU if tiered compilation is enabled.
> 
> The list includes
> java/math/BigDecimal/DivideMcTests
> java/util/Arrays/Sorting.java
> java/util/Arrays/SortingNearlySortedPrimitive.java
> java/util/concurrent/tck/JSR166TestCase
> java/util/stream/SliceOpTest.java
> etc
> 
> It appears C1 comp_op for long operands destroys arguments registers:
> void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, LIR_Op2* op) {
> ....
>       Register ylo = opr2->as_register_lo();
>       Register yhi = opr2->as_register_hi();
>       if (condition == lir_cond_equal || condition == lir_cond_notEqual) {
>         __ teq(xhi, yhi);
>         __ teq(xlo, ylo, eq);
>       } else {
>         __ subs(xlo, xlo, ylo); // <<< incorrect
>         __ sbcs(xhi, xhi, yhi); // <<< incorrect
>       }
> ...
> } 
> 
> Tested with hotspot_tier2, jdk_tier3 on linux_arm

Sergey Nazarkin has updated the pull request incrementally with one additional commit since the last revision:

  Align C1 long cmp with match rules in arm.ad

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/6934/files
  - new: https://git.openjdk.java.net/jdk/pull/6934/files/53916e49..3ee6f5c9

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6934&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6934&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6934.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6934/head:pull/6934

PR: https://git.openjdk.java.net/jdk/pull/6934


More information about the hotspot-compiler-dev mailing list