[clang] [CIR] Upstream new SetBitfieldOp for handling C and C++ struct bitfields (PR #147609)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 9 05:58:55 PDT 2025
================
@@ -42,3 +42,73 @@ int init(S* s) {
//OGCG: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
//OGCG: [[TMP3:%.*]] = shl i32 [[TMP2]], 15
//OGCG: [[TMP4:%.*]] = ashr i32 [[TMP3]], 15
+
+
+void load(S* s) {
+ s->a = -4;
+ s->b = 42;
+ s->c = -12345;
+}
----------------
erichkeane wrote:
Could you do a `s->a = s->c; ` sorta thing in one of the tests?
https://github.com/llvm/llvm-project/pull/147609
More information about the cfe-commits
mailing list