[PATCH] D29598: LLVM Changes for alloc_align

Marina Yatsina via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 19 02:32:36 PDT 2017


myatsina added inline comments.


================
Comment at: include/llvm/IR/IRBuilder.h:1794
+private:
+  CallInst *CreateAlignmentAssumptionHelper(const DataLayout &DL,
+                                            Value *PtrValue, Value *Mask,
----------------
Please add function documentation here as well.


================
Comment at: include/llvm/IR/IRBuilder.h:1857
+    if (Alignment->getType() != IntPtrTy)
+      Alignment = CreateIntCast(Alignment, IntPtrTy, /*isSigned*/ false,
+                                "alignmentcast");
----------------
I think we should do a signed cast. If the original value is negative, then we want to preserve it and then choose "0".


https://reviews.llvm.org/D29598





More information about the llvm-commits mailing list