[PATCH] D116851: [MemoryBuiltins] Add field for alignment argument
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 12 00:42:28 PST 2022
xbolva00 added a comment.
BTW, https://clang.llvm.org/docs/AttributeReference.html#id330 ... is it broken just for me or.. ?
void *b(void *v, int align) __attribute__((alloc_size(2), alloc_align(2))) ;
void *b(void *v, int align) {
return v;
}
; ModuleID = '/app/example.cpp'
source_filename = "/app/example.cpp"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone uwtable willreturn allocsize(1)
define dso_local i8* @_Z1bPvi(i8* readnone returned %0, i32 %1) local_unnamed_addr #0 {
ret i8* %0
}
attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone uwtable willreturn allocsize(1) "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
!llvm.module.flags = !{!0, !1}
!llvm.ident = !{!2}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 7, !"uwtable", i32 1}
!2 = !{!"clang version 14.0.0 (https://github.com/llvm/llvm-project.git d23fa4f2f1319039b7d939a4bf68c493ba26b07a)"}
Clang seems to ignore alloc_align attribute?
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