Skip to content

Fix VABS evaluator - #6722

Merged
0xdaryl merged 1 commit into
eclipse-omr:masterfrom
r30shah:fixVABSForIntegral
Sep 28, 2022
Merged

Fix VABS evaluator#6722
0xdaryl merged 1 commit into
eclipse-omr:masterfrom
r30shah:fixVABSForIntegral

Conversation

@r30shah

@r30shah r30shah commented Sep 22, 2022

Copy link
Copy Markdown
Contributor

InlineVectorUnaryOp evaluator was called to generate instruction for VABS for integral type but did not emit VLP instruction to load positive value of the operand for ABS. This commit fixes that and also changes an assert to fatal assert to make sure it is called for the op which is supported.

Fixes: eclipse-openj9/openj9#15918

Signed-off-by: Rahil Shah rahil@ca.ibm.com

InlineVectorUnaryOp evaluator was called to generate instruction for
VABS for integral type but did not emit VLP instruction to load positive
value of the operand for ABS. This commit fixes that and also changes an
assert to fatal assert to make sure it is called for the op which is
supported.

Fixes: eclipse-openj9/openj9#15918

Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
@r30shah
r30shah requested a review from fjeremic as a code owner September 22, 2022 12:54
@r30shah

r30shah commented Sep 22, 2022

Copy link
Copy Markdown
Contributor Author

@joransiu Can I get a review on this change ?

break;
default:
TR_ASSERT(false, "Unary Vector IL evaluation unimplemented for node : %s\n", cg->getDebug()->getName(node));
TR_ASSERT_FATAL_WITH_NODE(node, false, "Unary Vector IL evaluation unimplemented for node\n");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no way we can print the node name with TR_ASSERT_FATAL_WITH_NODE? That'll be really useful to know if we hit this assert in the future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TR_ASSERT_FATAL_WITH_NODE actually prints out more useful information. Here is the sample I got when changed the assert to fatal and ran the test that hits it.

Testing Int128Vector ABS
Assertion failed at /root/VectorAPIJDK19Build/openj9-openjdk-jdk19/omr/compiler/z/codegen/OMRTreeEvaluator.cpp:14430: false
VMState: 0x0005ff04
	Node 0x3ff8fed2d50 [vabs]: Unary Vector IL evaluation unimplemented for node
...
Node context:

...
n6748n    treetop                                                                             [     0x3ff8fed2d00] bci=[18,91,684] rc=0 vc=7536 vn=- li=374 udi=- nc=1
n6749n      vabsVector128Int32 ()                                                             [     0x3ff8fed2d50] bci=[18,91,684] rc=2 vc=7536 vn=- li=374 udi=- nc=1 flg=0x20
n6750n        vloadi  <array-shadow>[#269  Shadow] [flags 0x80000613 0x0 ] ()                 [     0x3ff8fed2da0] bci=[7,32,3446] rc=1 vc=7536 vn=- li=374 udi=- nc=1 flg=0x20
n6751n          aladd (X>=0 sharedMemory )                                                    [     0x3ff8fed2df0] bci=[-1,0,112] rc=0 vc=7547 vn=- li=374 udi=- nc=2 flg=0x100
n6752n            aload  a<parm 1 [I>[#383  Parm] [flags 0xc0000107 0x0 ] (X!=0 sharedMemory )  [     0x3ff8fed2e40] bci=[7,17,3447] rc=7 vc=7536 vn=- li=374 udi=- nc=0 flg=0x4
n6753n            lsub (cannotOverflow )                                                      [     0x3ff8fed2e90] bci=[-1,0,112] rc=0 vc=7536 vn=- li=374 udi=- nc=2 flg=0x1000
n6754n              lshl (cannotOverflow )                                                    [     0x3ff8fed2ee0] bci=[-1,0,112] rc=0 vc=7536 vn=- li=374 udi=- nc=2 flg=0x1000
n6755n                i2l                                                                     [     0x3ff8fed2f30] bci=[12,4,3695] rc=0 vc=7536 vn=- li=374 udi=- nc=1
n6776n                  ==>icall
n8133n                iconst 2                                                                [     0x3ff8de9dde0] bci=[-1,0,112] rc=0 vc=7536 vn=- li=374 udi=- nc=0
n6758n              lconst -16 (X!=0 X<=0 )                                                   [     0x3ff8fed3020] bci=[-1,0,112] rc=7 vc=7536 vn=- li=374 udi=- nc=0 flg=0x204

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh cool! Haven't seen that before. Changes LGTM.

@r30shah

r30shah commented Sep 22, 2022

Copy link
Copy Markdown
Contributor Author

Jenkins build zlinux,zos

@r30shah

r30shah commented Sep 23, 2022

Copy link
Copy Markdown
Contributor Author

Build passes on LoZ, zOS failure seems like infrastructure issue. Launching z/OS only again.

@r30shah

r30shah commented Sep 23, 2022

Copy link
Copy Markdown
Contributor Author

Jenkins build zos

@r30shah

r30shah commented Sep 26, 2022

Copy link
Copy Markdown
Contributor Author

@0xdaryl Can you please review and merge this PR? This one fixes the failure seen on nightly builds with ABS vector tests on Z.

@r30shah

r30shah commented Sep 27, 2022

Copy link
Copy Markdown
Contributor Author

Jenkins build zos

@r30shah

r30shah commented Sep 27, 2022

Copy link
Copy Markdown
Contributor Author

I am unable to get the Jenkins build going on z/OS, it fails due to infrastructure related issue.

10:03:19  stderr: 
10:03:19  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2675)
10:03:19  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2099)
10:03:19  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:85)
10:03:19  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:619)
10:03:19  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:848)
10:03:19  	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:158)
10:03:19  	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:151)
10:03:19  	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
10:03:19  	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
10:03:19  	at hudson.remoting.Request$2.run(Request.java:376)
10:03:19  	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
10:03:19  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
10:03:19  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
10:03:19  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
10:03:19  	at java.base/java.lang.Thread.run(Thread.java:840)
10:03:19  	Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to ZISVJD10
10:03:19  		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
10:03:19  		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
10:03:19  		at hudson.remoting.Channel.call(Channel.java:1000)
10:03:19  		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:143)
10:03:19  		at jdk.internal.reflect.GeneratedMethodAccessor900.invoke(Unknown Source)
10:03:19  		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
10:03:19  		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
10:03:19  		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:129)
10:03:19  		at com.sun.proxy.$Proxy116.execute(Unknown Source)
10:03:19  		at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1226)
10:03:19  		at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1308)
10:03:19  		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
10:03:19  		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
10:03:19  		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
10:03:19  		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
10:03:19  		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
10:03:19  		... 4 more

I did tested out this changes with sanity.openjdk tests with JDK19 where it fails in the nightly build (OpenJ9 - Personal/job/Pipeline-Build-Test-Personal/14263/) and it passes. @0xdaryl Can I request you to merge this one? It fixes the failures seen on the nightly openj9 builds.

@0xdaryl 0xdaryl self-assigned this Sep 28, 2022
@0xdaryl
0xdaryl merged commit 0da55e4 into eclipse-omr:master Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jdk19 openjdk jdk/incubator/vector/Byte128VectorTests.java input = -126 expected [126] but found [-126]

3 participants