[PATCH] D116851: [MemoryBuiltins] Add field for alignment argument

Bryce Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 8 22:45:59 PST 2022


Bryce-MW marked an inline comment as done.
Bryce-MW added a comment.

I've rolled back the addition of the size function and the changes to attributor that go with it (I'll put those together in a separate patch once this one is done). I've kept the changes to attributor that are related to alignment but I can remove those as well if you would like, I wasn't entirely sure if you meant for me to do that or not. Thanks!



================
Comment at: llvm/lib/Analysis/MemoryBuiltins.cpp:278
+  }
+  return V->getOperand(FnData->AlignParam);
+}
----------------
reames wrote:
> Er, this does not work.  You need to check that AlignmentParam is not -1, or this will crash.  
Good point, for some reason I assumed getOperand would return null for that case. Do I also need to check if it's too large?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116851



More information about the llvm-commits mailing list