[clang] [CIR] Fix alignment when lowering set/get bitfield operations (PR #148999)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 18 12:34:42 PDT 2025


================
@@ -352,9 +351,9 @@ RValue CIRGenFunction::emitLoadOfBitfieldLValue(LValue lv, SourceLocation loc) {
 
   assert(!cir::MissingFeatures::armComputeVolatileBitfields());
 
-  mlir::Value field = builder.createGetBitfield(
-      getLoc(loc), resLTy, ptr.getPointer(), ptr.getElementType(), info,
-      lv.isVolatile(), false, ptr.getAlignment().getAsAlign().value());
+  mlir::Value field =
+      builder.createGetBitfield(getLoc(loc), resLTy, ptr, ptr.getElementType(),
+                                info, lv.isVolatile(), false);
----------------
Andres-Salamanca wrote:

Done

https://github.com/llvm/llvm-project/pull/148999


More information about the cfe-commits mailing list