[all-commits] [llvm/llvm-project] a5db2c: [CIR] Add support for -ffine-grained-bitfield-acce...

Andres-Salamanca via All-commits all-commits at lists.llvm.org
Tue Jul 29 08:32:03 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a5db2c28443559f5a19f76f9a91ef3280231a969
      https://github.com/llvm/llvm-project/commit/a5db2c28443559f5a19f76f9a91ef3280231a969
  Author: Andres-Salamanca <andrealebarbaritos at gmail.com>
  Date:   2025-07-29 (Tue, 29 Jul 2025)

  Changed paths:
    M clang/include/clang/CIR/MissingFeatures.h
    M clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
    A clang/test/CIR/CodeGen/finegrain-bitfield-access.cpp

  Log Message:
  -----------
  [CIR] Add support for -ffine-grained-bitfield-accesses (#150687)

This PR adds support for `-ffine-grained-bitfield-accesses`. I reused
the tests from classic CodeGen, available here:

[https://github.com/llvm/llvm-project/blob/c2c881fcc85e0c2d7a050b0199d4dadf8f556b9e/clang/test/CodeGenCXX/finegrain-bitfield-access.cpp](https://github.com/llvm/llvm-project/blob/c2c881fcc85e0c2d7a050b0199d4dadf8f556b9e/clang/test/CodeGenCXX/finegrain-bitfield-access.cpp)

We produce almost exactly the same codegen, except when returning a
variable: we emit an extra variable to hold the return value, whereas
classic CodeGen does not. Also, the GEP instructions use slightly
different syntax compared to classic CodeGen.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list