Skip to content

Commit

Permalink
Fix LLVM codegen constant alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaret committed Dec 1, 2022
1 parent 8d3a449 commit c099d06
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/target/llvm/codegen_llvm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,7 @@ void CodeGenLLVM::VisitStmt_(const AllocateConstNode* op) {
llvm::GlobalVariable* param_symbol = new llvm::GlobalVariable(
*module_, array->getType(), true, llvm::GlobalValue::InternalLinkage, array, symbol_name);

param_symbol->setAlignment(data.DataType().bits());
var_map_[op->buffer_var.operator->()] = param_symbol;
this->VisitStmt(op->body);
}
Expand Down

0 comments on commit c099d06

Please sign in to comment.