[llvm-bugs] [Bug 37483] clang++ CUDA miscompile with -O1

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 16 10:06:58 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37483

Artem Belevich <tra at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|NEW                         |RESOLVED

--- Comment #2 from Artem Belevich <tra at google.com> ---
I can reproduce it on sm_60.

Jonas appears to be correct and that's a problem with ptxas in CUDA-8.
PTX generated by clang is identical for both CUDA-8 and CUDA-9.
However, SASS generated by ptxas is noticeably different. With CUDA-9
the code is very straightforward and you can see two writes, 8 bytes apart,
both with the same value. With CUDA-8, func3 messes up the store to *l_302 and
writes zero to the should_not_change field instead.

ptxas in cuda-8 is known to have number of unfixed issues. So does ptxas in
older cuda-9.x releases. I would suggest updating to more recent CUDA version
or, consider replacing ptxas with the one from CUDA-9.1 (though you will not be
able to compile for sm_20 if you do)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180516/926ed318/attachment.html>


More information about the llvm-bugs mailing list