[PATCH] D59985: Re-fix invalid address space generation for clk_event_t arguments of enqueue_kernel builtin function

Alexey Sotkin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 3 03:15:15 PDT 2019


AlexeySotkin marked an inline comment as done.
AlexeySotkin added inline comments.


================
Comment at: lib/CodeGen/CGBuiltin.cpp:3711
+      EventList = EventList->getType()->isIntegerTy()
+                      ? Builder.CreateIntToPtr(EventList, EventPtrTy)
+                      : Builder.CreatePointerCast(EventList, EventPtrTy);
----------------
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 ?


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