[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
================
@@ -193,9 +193,9 @@ RValue CIRGenFunction::emitCXXMemberOrOperatorMemberCallExpr(
LValue thisPtr;
if (isArrow) {
LValueBaseInfo baseInfo;
- assert(!cir::MissingFeatures::opTBAA());
- Address thisValue = emitPointerWithAlignment(base, &baseInfo);
- thisPtr = makeAddrLValue(thisValue, base->getType(), baseInfo);
+ TBAAAccessInfo tbaaInfo;
+ Address thisValue = emitPointerWithAlignment(base, &baseInfo, &tbaaInfo);
+ thisPtr = makeAddrLValue(thisValue, base->getType(), baseInfo, tbaaInfo);
----------------
xlauko wrote:
A trivial `operator=` now stores through struct-path tags, so a `may_alias` typedef on the operand is lost: `*f = 1.0f; *p = *q; return *f;` with `f` aliasing `p->i` returns 1.0 at -O2 (classic: 2.0). Classic uses a memcpy here.
https://github.com/llvm/llvm-project/pull/246079
More information about the cfe-commits
mailing list