Comments (4)
@hzongaro fyi
from openj9.
Opt index 148 appears to be General Loop Unroller, in this case. @BradleyWood, may I ask you to take a look at this problem?
from openj9.
GLU decided to unroll the do-while loop by a factor of 4 without residual. During unrolling, the body (block_3) got cloned 3 times, dropping if (3 > e) return
and rewrote the control flow such that block_3 is the last of the unrolled sequence to execute.
n3n BBStart <block_3> (freq 10000) [0x7f32a92af980] bci=[-1,24,9] rc=0 vc=855 vn=- li=- udi=- nc=0
n26n lstorei Test.a J[#428 notAccessed Shadow +8] [flags 0x604 0x0 ] [0x7f32a92b00b0] bci=[-1,33,9] rc=0 vc=859 vn=- li=- udi=- nc=2
n22n aload <'this' parm LTest;>[#422 Parm] [flags 0x40000107 0x0 ] (X!=0 X>=0 ) [0x7f32a92aff70] bci=[-1,24,9] rc=1 vc=859 vn=- li=- udi=12 nc=0 flg=0x104
n25n lsub [0x7f32a92b0060] bci=[-1,32,9] rc=2 vc=859 vn=- li=- udi=- nc=2
n23n lload <temp slot 7>[#445 Auto] [flags 0x4 0x0 ] (cannotOverflow createdByPRE ) [0x7f32a92affc0] bci=[-1,26,9] rc=1 vc=859 vn=- li=- udi=13 nc=0 flg=0x41000
n24n lconst -2 (X!=0 X<=0 ) [0x7f32a92b0010] bci=[-1,29,9] rc=1 vc=859 vn=- li=- udi=- nc=0 flg=0x204
n237n lstore <temp slot 7>[#445 Auto] [flags 0x4 0x0 ] [0x7f32a934e9d0] bci=[-1,32,9] rc=0 vc=859 vn=- li=6 udi=3 nc=1
n25n ==>lsub
n33n ificmplt --> block_4 BBStart at n31n (swappedChildren ) [0x7f32a92b02e0] bci=[-1,40,10] rc=0 vc=859 vn=- li=- udi=- nc=2 flg=0x20020
n27n iload <auto slot 2>[#424 Auto] [flags 0x3 0x0 ] (cannotOverflow ) [0x7f32a92b0100] bci=[-1,36,10] rc=1 vc=859 vn=- li=- udi=14 nc=0 flg=0x1000
n29n iconst 3 (X!=0 X>=0 ) [0x7f32a92b01a0] bci=[-1,38,10] rc=1 vc=859 vn=- li=- udi=- nc=0 flg=0x104
n4n BBEnd </block_3> =====
block_28, clone of block_3
n309n BBStart <block_28> (freq 10000) [0x7f32a9350050] bci=[-1,24,9] rc=0 vc=855 vn=- li=- udi=- nc=0
n310n lstorei Test.a J[#428 notAccessed Shadow +8] [flags 0x604 0x0 ] [0x7f32a93500a0] bci=[-1,33,9] rc=0 vc=859 vn=- li=- udi=- nc=2
n311n aload <'this' parm LTest;>[#422 Parm] [flags 0x40000107 0x0 ] (X!=0 X>=0 ) [0x7f32a93500f0] bci=[-1,24,9] rc=1 vc=859 vn=- li=- udi=12 nc=0 flg=0x104
n312n lsub [0x7f32a9350140] bci=[-1,32,9] rc=2 vc=859 vn=- li=- udi=- nc=2
n313n lload <temp slot 7>[#445 Auto] [flags 0x4 0x0 ] (cannotOverflow createdByPRE ) [0x7f32a9350190] bci=[-1,26,9] rc=1 vc=859 vn=- li=- udi=13 nc=0 flg=0x41000
n314n lconst -2 (X!=0 X<=0 ) [0x7f32a93501e0] bci=[-1,29,9] rc=1 vc=859 vn=- li=- udi=- nc=0 flg=0x204
n315n lstore <temp slot 7>[#445 Auto] [flags 0x4 0x0 ] [0x7f32a9350230] bci=[-1,32,9] rc=0 vc=859 vn=- li=6 udi=3 nc=1
n312n ==>lsub
n319n BBEnd </block_28> ===== [0x7f32a9350370] bci=[-1,40,10] rc=0 vc=855 vn=- li=- udi=- nc=0
So I think the loop got rewritten from:
int d = -9;
...
do {
a += 2;
for (e = d; 3 > e;)
return;
} while (++d < 1000);
to something like:
int d = -9;
...
do {
a += 2;
a += 2;
a += 2;
a += 2;
for (e = d; 3 > e;)
return;
} while (++d < 1000);
from openj9.
So I think what happened is that unrolling attempted to remove the loop-back branch for each of the new unrolled blocks but accidentally removed the comparison of the inner-loop.
from openj9.
Related Issues (20)
- jdk23 OpenJDK String/CompactString/MaxSizeUTF16String Expected java.lang.OutOfMemoryError to be thrown, but nothing was thrown
- ReentrantLockTest::testAwaitUninterruptibly_fair timed out waiting for thread to enter thread state WAITING HOT 1
- Using full command line as GC hints key causes key proliferation HOT 11
- OpenJDK CompactString/MaxSizeUTF16String testMaxCharArray() expects OOM but gets NegativeArraySizeException with JIT HOT 8
- FIPS cmdLineTester_criu_nonPortableRestore_1_FAILED testSystemNanoTimeJitPreCheckpointCompile
- testOpenJ9DiagnosticsMXBean testRemote_resetDumpOptions UndeclaredThrowableException
- jcmd and late attach don't work with java under Windows Services HOT 6
- Storing all classes to SCC for startup performance HOT 7
- testJITServerArguments_0 failure on ppc64le: crash during initial SSL connection HOT 24
- Incorrect default cache directory permission on z/OS Java 11+
- DaaLoadTest_daa3 crash vmState=0x000522ff HOT 7
- JDK23 recipe for target 'jdk.management-copy' failed HOT 2
- OpenJ9-JDK17 mockito test failed on s390x_zos platform HOT 1
- jdk_vector_0_FAILED jdk/incubator/vector/Float64VectorTests.java NullPointerException: Cannot throw exception
- IndexOf method of String file fails using Eclipse OpenJ9 VM 11.0.22.0 HOT 9
- MessageDigest/TestDigestIOStream ArrayIndexOutOfBoundsException HOT 1
- JVM_LoadLibrary should handle .a files on AIX HOT 14
- CryptoTests are reporting GssApiMechanismTests and SaslServerFactoryTests as passed, where it should be skipped HOT 1
- harmony crash newObjectArray vmState=0x00040000
- MockitoMockTest doesn't run on jdk23 yet - Java 23 (67) is not supported by the current version of Byte Buddy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openj9.