This is an archive of the discontinued LLVM Phabricator instance.

Ensure field-annotations on pointers properly match the AS of the field.
ClosedPublic

Authored by erichkeane on Aug 31 2021, 9:56 AM.

Details

Summary

Discovered in SYCL, the field annotations were always cast to an i8*,
which is an invalid bitcast for a pointer type with an address space.
This patch makes sure that we create an intrinsic that takes a pointer
to the correct address-space and properly do our casts.

Diff Detail

Event Timeline

erichkeane created this revision.Aug 31 2021, 9:56 AM
erichkeane requested review of this revision.Aug 31 2021, 9:56 AM
aaron.ballman accepted this revision.Sep 1 2021, 5:14 AM

LGTM!

clang/lib/CodeGen/CodeGenFunction.cpp
2408–2413
This revision is now accepted and ready to land.Sep 1 2021, 5:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2021, 6:12 AM