[PATCH] D120129: [NVPTX] Enhance vectorization of ld.param & st.param

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 27 20:45:12 PDT 2022


jdoerfert added a comment.

In D120129#3410493 <https://reviews.llvm.org/D120129#3410493>, @kovdan01 wrote:

> In D120129#3410479 <https://reviews.llvm.org/D120129#3410479>, @jdoerfert wrote:
>
>> Please revert this commit. It breaks any code using the cuda.11.0.2 libdevice.bc file, the source of the `null` `nvvm.annotations` and the annotations with 5 arguments. See below.
>> Once a fix is in, and a test is added, we can reapply this.
>>
>>   $ opt -S .../cuda-11.0.2/nvvm/libdevice/libdevice.10.bc | tail
>>   !nvvm.annotations = !{!1, !2, !1, !3, !3, !3, !3, !4, !4, !3}
>>   
>>   !0 = !{i32 1, i32 4}
>>   !1 = !{null, !"align", i32 8}
>>   !2 = !{null, !"align", i32 8, !"align", i32 65544, !"align", i32 131080}
>>   !3 = !{null, !"align", i32 16}
>>   !4 = !{null, !"align", i32 16, !"align", i32 65552, !"align", i32 131088}
>>   !5 = distinct !{!5, !6}
>
> Got it, will revert the patch shortly. Could you please describe what do you mean by "break" in a bit more detail? Is that only about poorly designed and failing assertions in `getFunctionParamOptimizedAlign` or there are some other (maybe even functional) issues? If that's only about assertions, won't using `isKernelFunction` (as suggested in D122550 <https://reviews.llvm.org/D122550>) help?

The two assertions introduced here do not hold for the libdevice.bc above. So whenever we link the above we will cause the assertions to fail. That's what I mean with break. isKernelFunction is probably going to fix all that. For a test, copy annotations like the above into one of the .ll files and make sure it contains a private/internal function w/ arguments as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120129/new/

https://reviews.llvm.org/D120129



More information about the cfe-commits mailing list