[clang] [CIR] Implement lowering for BitInt that needs to be an array (PR #225470)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 22 11:50:24 PDT 2026
================
@@ -297,10 +297,10 @@ mlir::LogicalResult CIRToLLVMCopyOpLowering::matchAndRewrite(
op.getCopySizeInBytes(layout));
assert(!cir::MissingFeatures::aggValueSlotVolatile());
- uint64_t dstTypeAlign = dataLayout.getTypeABIAlignment(convertTypeForMemory(
- *getTypeConverter(), dataLayout, op.getDst().getType().getPointee()));
- uint64_t srcTypeAlign = dataLayout.getTypeABIAlignment(convertTypeForMemory(
- *getTypeConverter(), dataLayout, op.getSrc().getType().getPointee()));
+ uint64_t dstTypeAlign =
+ dataLayout.getTypeABIAlignment(op.getDst().getType().getPointee());
----------------
erichkeane wrote:
That is the bit I mentioned as 'second' in my commit message. Doing `convertTypeForMemory` for bit-int types ends up getting the array, so the alignment is wrong. It would be problematic for many reasons for the before/after types here to have a different alignment, so getting the CIR alignment SHOULD be the same as the LLVM type anyway (other than the slight awkwardness of BitInt arrays).
https://github.com/llvm/llvm-project/pull/225470
More information about the cfe-commits
mailing list