PTX: Fix case where printed alignment could be 0

llvm-svn: 140624
This commit is contained in:
Justin Holewinski 2011-09-27 19:25:49 +00:00
parent 84d2d3a90e
commit 4f7054e56e
1 changed files with 1 additions and 1 deletions

View File

@ -480,7 +480,7 @@ void PTXAsmPrinter::EmitVariableDeclaration(const GlobalVariable *gv) {
unsigned alignment = gv->getAlignment();
if (alignment != 0) {
decl += ".align ";
decl += utostr(Log2_32(gv->getAlignment()));
decl += utostr(std::max(1U, Log2_32(gv->getAlignment())));
decl += " ";
}