This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][Clang] Skip adding noundef attribute to AMDGPU HIP device functions
AbandonedPublic

Authored by skc7 on Jun 27 2022, 11:38 PM.

Details

Summary

Adding noundef attribute has been enabled by default in clang. This is causing execution issue on amdgpu, when kernel has uninitialized variables passed as function arguments to cuda cross-lane APIs. This patch skips adding noundef attribute to function arguments and return values for HIP device functions.

Diff Detail

Event Timeline

skc7 created this revision.Jun 27 2022, 11:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2022, 11:38 PM
skc7 requested review of this revision.Jun 27 2022, 11:38 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 27 2022, 11:38 PM
skc7 edited the summary of this revision. (Show Details)Jun 28 2022, 9:06 AM
arsenm added inline comments.Jun 28 2022, 9:06 AM
clang/lib/CodeGen/CGCall.cpp
2309

Shouldn't be limited to HIP. All languages with convergent operations

skc7 added inline comments.Jun 30 2022, 5:56 AM
clang/lib/CodeGen/CGCall.cpp
2309

With this above suggested change to include all languages with convergent operations, lot of tests had to be updated. Created this new patch D128907 for same.

arsenm resigned from this revision.Nov 16 2022, 3:19 PM

This is now obsolete

skc7 abandoned this revision.Nov 16 2022, 9:46 PM