mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-22 09:29:31 +00:00
PTX: Fix case where printed alignment could be 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140624 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
98d0416fbf
commit
332850d8cc
@ -480,7 +480,7 @@ void PTXAsmPrinter::EmitVariableDeclaration(const GlobalVariable *gv) {
|
|||||||
unsigned alignment = gv->getAlignment();
|
unsigned alignment = gv->getAlignment();
|
||||||
if (alignment != 0) {
|
if (alignment != 0) {
|
||||||
decl += ".align ";
|
decl += ".align ";
|
||||||
decl += utostr(Log2_32(gv->getAlignment()));
|
decl += utostr(std::max(1U, Log2_32(gv->getAlignment())));
|
||||||
decl += " ";
|
decl += " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user