Skip to content

Conversation

rolandschulz
Copy link
Contributor

Fixes #3271

@rolandschulz rolandschulz requested a review from bader as a code owner February 28, 2021 06:37
@rolandschulz
Copy link
Contributor Author

Note: I tested that this fixes the issue. But I don't really understand the code and why it is null in this case. Therefore I don't know whether this is the correct fix and isn't just working around the actual problem.

@bader bader changed the title Fix SYCL PI passes if function operand is null-ref [CUDA] Fix SYCL PI passes if function operand is null-ref Mar 3, 2021
@bader bader changed the title [CUDA] Fix SYCL PI passes if function operand is null-ref [CUDA] Fix SYCL NVPTX passes if function operand is null-ref Mar 3, 2021
@bader bader added the cuda CUDA back-end label Mar 3, 2021
@bader
Copy link
Contributor

bader commented Mar 3, 2021

+@steffenlarsen, @Naghasan

@steffenlarsen
Copy link
Contributor

I do not have an explanation as to why the function operand is null-ref, and frankly I am slightly concerned. That said, I am okay with this fix.

Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

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

@rolandschulz, could you add a small regression test exposing the issue, please?
You can try bugpoint tool to reduce the test case from #3271.

@Naghasan
Copy link
Contributor

Naghasan commented Mar 8, 2021

The null ref is probably coming from the dead argument elimination pass. As it builds a new function and removes the old one, this would turns into a nullref in the MD later on.

Regardless, the checks this patch adds make sense and is safe.

@bader bader merged commit 20c5aea into intel:sycl Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda CUDA back-end

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SYCL][CUDA] pass 'Add implicit SYCL global offset': Assertion `Val && "isa<> used on a null pointer"' failed.

4 participants