Open
Description
There are some differences from the OG LLVM for unions for C++ code...
The empty union in initialized with undef
values in OG and with zeroinitializer
in CIR:
union U { int a; long long b;};
union U u = {};
// OG
@u = dso_local global { i32, [4 x i8] } { i32 0, [4 x i8] undef }, align 8
// CIR enabled
@u = global { i32, [4 x i8] } zeroinitializer, align 8
This is a difference - and soon or later we may want to fix it.
Originally posted by @gitoleg in #1257 (comment)