From cfab2be39188b9fdd695bf4ae6d6817c55190b6c Mon Sep 17 00:00:00 2001 From: Justin Holewinski Date: Wed, 28 Sep 2011 18:24:58 +0000 Subject: [PATCH] PTX: Fix alignment logic git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140709 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PTX/PTXAsmPrinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/PTX/PTXAsmPrinter.cpp b/lib/Target/PTX/PTXAsmPrinter.cpp index 80b1a4babdb..75136a7ea3b 100644 --- a/lib/Target/PTX/PTXAsmPrinter.cpp +++ b/lib/Target/PTX/PTXAsmPrinter.cpp @@ -444,7 +444,7 @@ void PTXAsmPrinter::EmitVariableDeclaration(const GlobalVariable *gv) { unsigned alignment = gv->getAlignment(); if (alignment != 0) { decl += ".align "; - decl += utostr(std::max(1U, Log2_32(gv->getAlignment()))); + decl += utostr(gv->getAlignment()); decl += " "; }