[Openmp-commits] [PATCH] D110556: [openmp] Add addrspacecast to getOrCreateIdent

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Sep 27 10:53:46 PDT 2021


JonChesterfield added a comment.

Thanks for the push to look at this more closely. The change from CreatePointerCast to CreatePointerBitCastOrAddrSpaceCast did nothing. CreatePointerCast ends up calling into the latter. Likewise explicitly putting the variable in the default globals address space doesn't help this bug, but seems a good thing to do anyway.

The actual bug here is at the `return Ident = &GV` line, which was missed when adding the CreatePointerCast in D84345 <https://reviews.llvm.org/D84345>. The first diff here works because it sends that value through CreatePointerBitCastOrAddrSpaceCast, but an equally valid fix would be to change it to `return Ident = Builder.CreatePointerCast(&GV, IdentPtr)`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110556/new/

https://reviews.llvm.org/D110556



More information about the Openmp-commits mailing list