[PATCH] D86200: [GlobalISel] Add setting of pointer flags to ArgInfo
Gabriel Hjort Ã…kerlund via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 01:42:10 PDT 2020
ehjogab created this revision.
ehjogab added reviewers: dsanders, arsenm, qcolombet, ab.
Herald added subscribers: hiraditya, rovka.
Herald added a project: LLVM.
ehjogab requested review of this revision.
Herald added a subscriber: wdng.
When invoking CallLowering::setArgFlags() with a pointer type, it did
not properly set the pointer flags.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86200
Files:
llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
Index: llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
===================================================================
--- llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
+++ llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
@@ -83,6 +83,11 @@
const FuncInfoTy &FuncInfo) const {
auto &Flags = Arg.Flags[0];
const AttributeList &Attrs = FuncInfo.getAttributes();
+ if (Arg.Ty->isPointerTy()) {
+ Flags.setPointer();
+ Flags.setPointerAddrSpace(
+ cast<PointerType>(Arg.Ty)->getAddressSpace());
+ }
if (Attrs.hasAttribute(OpIdx, Attribute::ZExt))
Flags.setZExt();
if (Attrs.hasAttribute(OpIdx, Attribute::SExt))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86200.286504.patch
Type: text/x-patch
Size: 668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200819/609e5b52/attachment.bin>
More information about the llvm-commits
mailing list