Bug 65088 - Does GCC has load/store widening phase?
Summary: Does GCC has load/store widening phase?
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-17 09:14 UTC by Marat Zakirov
Modified: 2021-09-02 01:56 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marat Zakirov 2015-02-17 09:14:27 UTC
This example says me that it doesn't.

$ cat t2.c

int a[2];
int b[2];

int main ()
{
  b[0] = a[0];
  b[1] = a[1];
  return 0;
}

$ gcc t2.c -O3 -S

$ cat t2.s

...

main:
.LFB0:
	.cfi_startproc
	movl	a(%rip), %eax
	movl	%eax, b(%rip)
	movl	a+4(%rip), %eax
	movl	%eax, b+4(%rip)
	xorl	%eax, %eax
	ret
	.cfi_endproc

gcc version is:

commit 71464ecd3a554b889c3bbc53d8874fc532bdf953
Author: trippels <trippels@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon Jan 12 07:53:10 2015 +0000
Comment 1 Andrew Pinski 2015-02-20 08:41:16 UTC
See bug 23684.
Comment 2 Marek Polacek 2015-02-26 18:25:10 UTC
I think this has been discussed on the gcc mailing list.
Comment 3 Marat Zakirov 2015-02-27 06:46:19 UTC
> I think this has been discussed on the gcc mailing list

Marek could you please share some resuting conclusion at least for x86 platform?
Why didn't x86 GCC RTL fold these loads/stores?