[llvm-dev] maximum value for alignstack function attribute?

Andrew Kelley via llvm-dev llvm-dev at lists.llvm.org
Mon Oct 23 13:02:56 PDT 2017


I have this test case in my frontend, which is triggering an assert in llvm
master branch:

fn fnWithAlignedStack() -> i32 {
    @setAlignStack(1024);
    return 1234;
}

It sets alignstack=1024 in the function attributes (see
http://llvm.org/docs/LangRef.html#function-attributes). It's tripping an
assert:

llvm/lib/IR/Attributes.cpp:134: static llvm::Attribute
llvm::Attribute::getWithStackAlignment(llvm::LLVMContext&, uint64_t):
Assertion `Align <= 0x100 && "Alignment too large."'

Is 0x100 the correct maximum alignstack value? Can I submit a patch to
document this in LangRef.html?

Regards,
Andrew Kelley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171023/9a61cd7d/attachment.html>


More information about the llvm-dev mailing list