llvm-project
a5db2c28 - [CIR] Add support for -ffine-grained-bitfield-accesses (#150687)

Commit
102 days ago
[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.
Parents
Loading