You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The end IR is quite small (clspv source.cl -cl-std=CLC++ -inline-entry-points -cl-kernel-arg-info --show-producer-ir)
I guess you have been looking at the one with --output-format=bc, which is a non-optimized one just after the frontend. It is normal to have something large there.
Looking at the debugger it feels like it fails in llvm before really running clspv passes, which lead me to think it is a bug in llvm/clang, not clspv.
Above also Fails with an older Clspv from May 22, using LLVM 15, while my previous bug report compiles OK with that older Clspv.
It also compiles OK with Clang release 16, using: clang -x cl -cl-std=CLC++ -S -emit-llvm
I do not have the latest Clang 17 ready, but my instinct is that it is quite unlikely that such basic language bug triggers would go unnoticed at the LLVM project.
Thank you for teaching me about the "--show-producer-ir" , it is not in the --help!
basically if you compile with --output-format=bc and it fails, it means that the issue is in llvm/clang as we did not do anything else than calling llvm/clang with this option.
clspv.exe -cl-std=CLC++ -inline-entry-points -cl-kernel-arg-info
Note the function is not even called. Just defining it fails.
Fails:
'Invalid bitcast'
' %0 = bitcast ptr %ref.tmp1 to ptr addrspace(4)'
'LLVM ERROR: Broken module found, compilation aborted!'
Source:
This one fails to produce IR, but when avoiding the bug triggers, the IR is curiously large.
The text was updated successfully, but these errors were encountered: