[PATCH] D59985: Re-fix invalid address space generation for clk_event_t arguments of enqueue_kernel builtin function
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 3 04:52:24 PDT 2019
Anastasia added inline comments.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:3711
+ EventList = EventList->getType()->isIntegerTy()
+ ? Builder.CreateIntToPtr(EventList, EventPtrTy)
+ : Builder.CreatePointerCast(EventList, EventPtrTy);
----------------
AlexeySotkin wrote:
> Anastasia wrote:
> > It seems we are not testing the casts?
> Do you mean that when we run LIT tests, this code is not executed? If so, in the modified test below, literal zeros are making clang to execute CreateIntToPtr call indeed.
> Or, do you mean that we need some extra check(to make sure the cast will be successful for example) in the source code itself ?
I mean since you are generating extra IR nodes we should check in the tests that they appear correctly. I don't see these casts checked in the tests currently.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59985/new/
https://reviews.llvm.org/D59985
More information about the cfe-commits
mailing list