-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][Clang] Fix annotations applied to integer fields #8198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYCL][Clang] Fix annotations applied to integer fields #8198
Conversation
Due to incorrect conflict resolution between 8e13852 (intel/llvm customization) and https://reviews.llvm.org/D138722 clang started emitting annotations applied to integer class/struct fields incorrectly. Incorrect overload of llvm.ptr.annotation intrinsic was picked up and this resulted in invalid IR emission. This patch restores behaviour introduced by 8e13852. The existing test added for 8e13852 didn't catch the problem since it is modified upstream test `CodeGen/annotations-field.c` which doesn't test typed pointers.
Hip failure is unrelated. The corresponding test is being disabled in intel/llvm-test-suite#1572 . |
struct foo f; | ||
f.v = 1; | ||
// CHECK: getelementptr inbounds %struct.foo, %struct.foo addrspace(4)* %{{.*}}, i32 0, i32 0 | ||
// CHECK-NEXT: call i32 addrspace(4)* @llvm.ptr.annotation.p4i32.p1i8({{.*}}str{{.*}}str{{.*}}i32 14, i8 addrspace(1)* null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this str a variable holding annotation?. Also what does 14 here refer to?
Just curious and for my own learning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, str is a variable with annotation string. 14 seems to be a line of code on which annotation happened.
@intel/llvm-gatekeepers , please merge as soon as possible. This is a blocker for the downstream. |
HIP Failed Tests (1): |
Due to incorrect conflict resolution between 8e13852 (intel/llvm customization) and https://reviews.llvm.org/D138722 clang started emitting annotations applied to integer class/struct fields incorrectly. Incorrect overload of llvm.ptr.annotation intrinsic was picked up and this resulted in invalid IR emission. This patch restores behavior introduced by 8e13852.
The existing test added for 8e13852 didn't catch the problem since it is modified upstream test
CodeGen/annotations-field.c
which doesn't test typed pointers.