RFR (M) 8222074: Enhance auto vectorization for x86
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Tue Apr 9 22:30:07 UTC 2019
Sandhya,
The testing is still running, but I see some new failures.
In particular:
======================================================================
compiler/c2/5049410/Test5049410.java
# assert(false) failed: bad AD file
# Internal Error (.../src/hotspot/share/opto/matcher.cpp:1587)
# assert(false) failed: bad AD file
----------System.err:(70/3923)----------
stdout: [o599 RShiftVB === _ o595 o59 [[o601 ]] #vectors[4]:{byte}
--N: o599 RShiftVB === _ o595 o59 [[o601 ]] #vectors[4]:{byte}
--N: o595 LoadVector === o223 o470 o464 |o29 [[o608 o606 o604 o602
o600 o598 o596 o599 ]] @byte[int:>=0]:NotNull:exact+any *, idx=5;
mismatched #vectors[4]:{byte}
VECS 0 VECS
LEGVECS 0 LEGVECS
--N: o59 ConI === o0 [[o611 o599 o251 o285 o292 o293 o252 o244 ]]
#int:1
IMMI 10 IMMI
IMMI1 0 IMMI1
IMMI2 0 IMMI2
IMMI8 5 IMMI8
IMMU8 5 IMMU8
IMMI16 10 IMMI16
IMMU31 0 IMMU31
RREGI 100 loadConI
RAX_REGI 100 loadConI
RBX_REGI 100 loadConI
RCX_REGI 100 loadConI
RDX_REGI 100 loadConI
RDI_REGI 100 loadConI
NO_RCX_REGI 100 loadConI
NO_RAX_RDX_REGI 100 loadConI
STACKSLOTI 200 storeSSI
======================================================================
java/lang/Math/HypotTests.java
----------System.err:(1574/80451)----------
Failure for Math.hypot:
For inputs -3.0000400027E10 (-0x1.bf0a71a6cp34) and -4.00002E10
(-0x1.2a0653a8p35)
expected 5.0000399999E10 (0x1.748831cfep35)
got 5.000040001660008E10 (0x1.748831d21333ep35);
difference greater than ulp tolerance 1.0
Failure for Math.hypot:
For inputs -4.00002E10 (-0x1.2a0653a8p35) and -3.0000400027E10
(-0x1.bf0a71a6cp34)
expected 5.0000399999E10 (0x1.748831cfep35)
got 5.000040001660008E10 (0x1.748831d21333ep35);
difference greater than ulp tolerance 1.0
Failure for StrictMath.hypot:
For inputs -3.0000400027E10 (-0x1.bf0a71a6cp34) and -4.00002E10
(-0x1.2a0653a8p35)
expected 5.0000399999E10 (0x1.748831cfep35)
got 5.000040001660008E10 (0x1.748831d21333ep35);
difference greater than ulp tolerance 1.0
======================================================================
java/math/BigDecimal/DivideMcTests.java
----------System.err:(215/24574)----------
Unexpected result from 3.61167296280301E+38 / 224198292018431; expected
1.6109279559123938E+24 got 1.6109279534086685E+24
Unexpected result from 3.61167296280301E+38 / 9.87673128759528E+18;
expected 3.6567492398412267E+19 got 3.6567492393890272E+19
Unexpected result from 3.61167296280301E+38 / 27062777463.0281; expected
1.3345536938095539E+28 got 1.3345536926616795E+28
Unexpected result from 3.61167296280301E+38 / 9.83114227763768E+22;
expected 3673706331174018.0 got 3673706328176239.7
...
======================================================================
java/lang/Double/ParseDouble.java
----------System.err:(15/891)----------
java.lang.RuntimeException: Double.parseDouble failed. String:0x.100p1
Result:0.125
at ParseDouble.fail(ParseDouble.java:39)
at ParseDouble.check(ParseDouble.java:116)
at ParseDouble.testParsing(ParseDouble.java:564)
at ParseDouble.main(ParseDouble.java:767)
======================================================================
java/lang/Float/ParseFloat.java
----------System.err:(15/906)----------
java.lang.RuntimeException: Float.parseFloat failed.
String:0.249999992549419402915276829 Result:0.24999999
at ParseFloat.fail(ParseFloat.java:38)
at ParseFloat.check(ParseFloat.java:111)
at ParseFloat.testPowers(ParseFloat.java:314)
at ParseFloat.main(ParseFloat.java:328)
======================================================================
java/lang/Math/DivModTests.java
----------System.out:(1/89)----------
FAIL: Long.floorMod(-9223372036854775807, 3) = 2 is different than
BigDecimal result: 0
----------System.err:(12/729)----------
java.lang.RuntimeException: 1 errors found in DivMod methods.
at DivModTests.main(DivModTests.java:49)
======================================================================
java/math/BigDecimal/DivideTests.java
----------System.err:(23/1552)----------
16 / 3125 threw an exception.
java.lang.ArithmeticException: Non-terminating decimal expansion; no
exact representable decimal result.
at java.base/java.math.BigDecimal.divide(BigDecimal.java:1722)
at DivideTests.powersOf2and5(DivideTests.java:157)
at DivideTests.main(DivideTests.java:415)
======================================================================
java/math/BigDecimal/RangeTests.java
----------System.out:(8/942)----------
Sum:79228162514264337593543950335 + 4611686018427387903 ==
79228162518876023607676370944; expected 79228162518876023611971338238
Sum:4611686018427387903 + 79228162514264337593543950335 ==
79228162518876023607676370944; expected 79228162518876023611971338238
Sum:-79228162514264337593543950335 + 4611686018427387903 ==
-79228162509652651579411529726; expected -79228162509652651575116562432
Sum:4611686018427387903 + -79228162514264337593543950335 ==
-79228162509652651579411529726; expected -79228162509652651575116562432
Sum:-9223372036854775808 + 4611686018427387903 == -4611686022722355199;
expected -4611686018427387905
Sum:4611686018427387903 + -9223372036854775808 == -4611686022722355199;
expected -4611686018427387905
Sum:9223372036854775808 + -4611686018427387903 == 4611686018427387903;
expected 4611686018427387905
Sum:-4611686018427387903 + 9223372036854775808 == 4611686018427387903;
expected 4611686018427387905
----------System.err:(12/729)----------
java.lang.RuntimeException: Incurred 8 failures while testing.
at RangeTests.main(RangeTests.java:238)
======================================================================
java/math/BigDecimal/StringConstructor.java
----------System.out:(1/48)----------
Seed from RandomFactory = -6241457317850693905L
----------System.err:(14/795)----------
bd string: scale: 1 -653335158894.7
bd doppel: scale: 1 -653335159489.9
java.lang.RuntimeException: String constructor failure.
======================================================================
java/util/Timer/DelayOverflow.java
----------System.err:(55/3697)----------
8893 not equal to 1
java.lang.Exception: Stack trace
at java.base/java.lang.Thread.dumpStack(Thread.java:1384)
at DelayOverflow.fail(DelayOverflow.java:100)
at DelayOverflow.fail(DelayOverflow.java:101)
at DelayOverflow.equal(DelayOverflow.java:106)
at DelayOverflow.test(DelayOverflow.java:87)
at DelayOverflow.instanceMain(DelayOverflow.java:113)
...
Best regards,
Vladimir Ivanov
On 08/04/2019 13:37, Vladimir Ivanov wrote:
> I tried to submit it for testing and spotted a build failure w/ clang:
>
> .../src/hotspot/cpu/x86/x86.ad:1515:26: error: '&&' within '||'
> [-Werror,-Wlogical-op-parentheses]
> (vlen == 64) && (VM_Version::supports_avx512bw() == false))
> ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> .../src/hotspot/cpu/x86/x86.ad:1515:26: note: place parentheses around
> the '&&' expression to silence this warning
> (vlen == 64) && (VM_Version::supports_avx512bw() == false))
> ^
> ( )
>
> I'll let you know how the testing is going.
>
> Best regards,
> Vladimir Ivanov
>
> On 05/04/2019 18:18, Viswanathan, Sandhya wrote:
>> Please find below a link to the webrev which enhances super-word auto
>> vectorization for x86.
>>
>> The following additional operations are supported:
>>
>> 1)Absolute for all data types
>>
>> 2)Shifts for byte data types
>>
>> 3)Shift right arithmetic for long data type
>>
>> 4)Byte multiply
>>
>> 5)Negate for float/double
>>
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8222074
>>
>> Webrev: http://cr.openjdk.java.net/~sviswanathan/8222074/webrev.00/
>>
>> The compiler jtreg tests pass with UseAVX=0,1,2,3 and KNL.
>>
>> Your review and comments are welcome.
>>
>> Best Regards,
>>
>> Sandhya
>>
More information about the hotspot-compiler-dev
mailing list