[PATCH] D122130: Verify parameter alignment attribute
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 21 06:33:37 PDT 2022
LuoYuanke added inline comments.
================
Comment at: llvm/lib/IR/Verifier.cpp:1831
}
if (Attrs.hasAttribute(Attribute::ByRef)) {
SmallPtrSet<Type *, 4> Visited;
----------------
pengfei wrote:
> Do we need check for `ByRef`?
It seems align attribute doesn't affect ByRef. Run below code with "llc t.ll" doesn't crash.
```
define dso_local void @foo(i8* %p) {
entry:
%p1 = bitcast i8* %p to <8 x float>*
call void @bar(<8 x float>* noundef byref(<8 x float>) align 32768 %p1)
ret void
}
declare dso_local void @bar(<8 x float>* %p)
```
In https://llvm.org/docs/LangRef.html, it says `Note that this attribute has additional semantics when combined with the byval or preallocated attribute, which are documented there.`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122130/new/
https://reviews.llvm.org/D122130
More information about the llvm-commits
mailing list