Page MenuHomePhabricator

[Atomic] Merge alignment information from Decl and from Type when emit atomic expression.

Authored by wmi on Aug 30 2017, 2:09 PM.

Diff Detail


Event Timeline

wmi created this revision.Aug 30 2017, 2:09 PM
rjmccall added inline comments.Sep 6 2017, 5:11 PM
680 ↗(On Diff #113298)

Just use EmitPointerWithAlignment instead of EmitScalarExpr to emit the pointer operand.

wmi updated this revision to Diff 114300.Sep 7 2017, 6:13 PM

Address John's comment.

rjmccall accepted this revision.Sep 7 2017, 6:16 PM

LGTM, thanks!

This revision is now accepted and ready to land.Sep 7 2017, 6:16 PM
This revision was automatically updated to reflect the committed changes.
twoh added a subscriber: twoh.Sep 5 2018, 9:22 AM

Hello, I observed a case where atomic builtin generates libcall when the corresponding sync builtin generates an atomic instruction ( It seems that the alignment checking for __atomic builtins (line 759 of this patch) results the difference, and wonder if the check is actually necessary. Could anyone please shed some light on understanding this? Thanks!