-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Multiple conditions evaluation results in wrong code gen #117
Comments
Has this issue been resolved? (We have various math statements, eg., "max", "min" that presumably use if conditions underneath and we may have similar or more complex if conditions as described above.) |
hi @gsaxena888, this bug is still present. We have a unit-test that breaks: tornado -ea --printKernel --jvm "-Xmx6g -Dtornado.recover.bailout=False -Dtornado.unittests.verbose=True " -m tornado.unittests/uk.ac.manchester.tornado.unittests.tools.TornadoTestRunner --params "uk.ac.manchester.tornado.unittests.foundation.TestIf#test06" I am wondering if with the latest compiler updates, we still observe similar behaviour as described above by @jjfumero. We will have a look, and report back. |
Yes, this bug is still present for the OpenCL backend. but it is fixed for the SPIR-V and PTX backends. The reason the OpenCL is more complicated is due to the uncontrolled flow graph to control the flow graph during the code generation of the OpenCL C code. We want to fully transition to SPIR-V code to be dispatched through the OpenCL runtime, so our OpenCL C code will be deprecated, and only used on old OpenCL driver implementations (FPGAs, and Apple M1/M2/M3). |
Describe the bug
The generated code omits a condition when having a complex if condition:
The result code for OpenCL is as follows:
How To Reproduce
This test case reproduces the error.
The problem is that during one of the low-tier compiler phases the multiple conditions is removed. I suspect this is during one of the canonicalization phases.
The text was updated successfully, but these errors were encountered: