https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91482
Bug ID: 91482 Summary: __builtin_assume_aligned should not break write combining Product: gcc Version: 9.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: msharov at users dot sourceforge.net Target Milestone: --- void write64 (void* p) { unsigned* p1 = (unsigned*) __builtin_assume_aligned (p, 8); *p1++ = 0; unsigned* p2 = (unsigned*) __builtin_assume_aligned (p1, 4); *p2++ = 1; } When the two stores are written without __builtin_assume_aligned, they are coalesced into a single movq store. The code above, however, results in two movl stores, even though the new information provided by __builtin_assume_aligned does not prevent combination.