[clang] [llvm] [CIR] Add TBAA support for scalar loads and stores (PR #246079)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 26 06:52:25 PST 2026
================
@@ -253,7 +253,10 @@ static void emitAsmStores(CIRGenFunction &cgf, const AsmStmt &s,
diag::err_store_value_to_reg);
return;
}
- dest = cgf.makeAddrLValue(addr, ty);
+ // The store writes all of the destination's members at once, so it must
+ // be allowed to alias an access to any of them.
+ dest = cgf.makeAddrLValue(addr, ty, dest.getBaseInfo(),
+ TBAAAccessInfo::getMayAliasInfo());
----------------
xlauko wrote:
Classic also truncates `tmp` and keeps the destination's qualifiers. Here a 2-byte struct output gets an 8-byte store, and a `volatile` one loses `volatile`. Both bugs predate this PR; worth porting the rest of that fix?
https://github.com/llvm/llvm-project/pull/246079
More information about the cfe-commits
mailing list