Skip to content

Commit

Permalink
[gccjit] alloca alignment is specified in bits
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingerZhu committed Nov 11, 2024
1 parent e3d93e7 commit a4d71f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Conversion/ConvertMemrefToGCCJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <limits>
#include <llvm/Support/Casting.h>
#include <llvm/Support/ErrorHandling.h>
#include <mlir/Dialect/Func/IR/FuncOps.h>
Expand Down Expand Up @@ -554,7 +555,7 @@ struct AllocaOpLowering : public AllocationLowering<memref::AllocaOp> {

if (auto align = op.getAlignment()) {
auto alignment =
createIndexAttrConstant(rewriter, loc, getIndexType(), *align);
createIndexAttrConstant(rewriter, loc, getIndexType(), *align * 8);
alloca =
rewriter
.create<CallOp>(loc, getVoidPtrType(),
Expand Down

0 comments on commit a4d71f5

Please sign in to comment.