void f1(int *a, int *b, int *c) { int d = 0xE0E0E0E0; *a = *b = *c = d; }
produces _f1: LFB0: movl $-522133280, (%rdx) movl $-522133280, (%rsi) movl $-522133280, (%rdi) ret on x86-64 at -Os. It would save instruction space and probably not be any slower to actually assign d to a register, but this is only done for 64-bit constants. -- Summary: x86 constants could be unduplicated Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: astrange at ithinksw dot com GCC host triplet: x86_64-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44073