[PATCH] D119271: CGCall: also emit LLVM `allocalign` attribute when handling AllocAlign

Augie Fackler via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 10 09:21:20 PST 2022


durin42 added inline comments.


================
Comment at: clang/test/CodeGen/alloc-align-attr.c:14
 // CHECK-NEXT:    [[CASTED_ALIGN:%.*]] = zext i32 [[TMP0]] to i64
 // CHECK-NEXT:    call void @llvm.assume(i1 true) [ "align"(i32* [[CALL]], i64 [[CASTED_ALIGN]]) ]
 // CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* [[CALL]], align 4
----------------
xbolva00 wrote:
> now this llvm.assume is redudant and should be removed?
I don't think so? Right now allocalign doesn't mean a whole lot (it really just answers some questions that used to be inferred from function name by MemoryBuiltins.cpp) so I'd rather leave the llvm.assume given that I doubt it's hurting anyone?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119271



More information about the cfe-commits mailing list