[llvm] [DataLayout] Remove i1 alignment entry (PR #156657)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 3 05:45:09 PDT 2025
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/156657
I don't think we need to explicitly specify i1 alignment, as this is going to fall back to i8 alignment.
This may change behavior if a data layout explicitly sets i8 alignment without also setting i1 layout, but I'd expect this to be a bug fix in that case.
>From 495b15c08826bedccdf90a57d5cc9a800918d2c4 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov at redhat.com>
Date: Wed, 3 Sep 2025 14:41:54 +0200
Subject: [PATCH] [DataLayout] Remove i1 alignment entry
I don't think we need to explicitly specify i1 alignment, as this
is going to fall back to i8 alignment.
This may change behavior if a data layout explicitly sets i8 alignment
without also setting i1 layout, but I'd expect this to be a bug
fix in that case.
---
llvm/lib/IR/DataLayout.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index ee43ad49d0df2..38f33f96fca7d 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -187,7 +187,6 @@ const char *DataLayout::getManglingComponent(const Triple &T) {
// Default primitive type specifications.
// NOTE: These arrays must be sorted by type bit width.
constexpr DataLayout::PrimitiveSpec DefaultIntSpecs[] = {
- {1, Align::Constant<1>(), Align::Constant<1>()}, // i1:8:8
{8, Align::Constant<1>(), Align::Constant<1>()}, // i8:8:8
{16, Align::Constant<2>(), Align::Constant<2>()}, // i16:16:16
{32, Align::Constant<4>(), Align::Constant<4>()}, // i32:32:32
More information about the llvm-commits
mailing list