[Bug fortran/31016] Use __buildin_memcpy and __memcpy for array assignment

2019-12-30 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31016 --- Comment #11 from Thomas Koenig --- Correction: The rank-1 copying cases are now handled by the middle end, the two-dimensional case isn't.

[Bug fortran/31016] Use __buildin_memcpy and __memcpy for array assignment

2019-12-30 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31016 --- Comment #10 from Thomas Koenig --- Excellent news: The __builtin_memcpy cases have been fixed in the meantime, and using __builtin_memset for values of more than one byte doesn't work. I will commit a test case and then close.

[Bug fortran/31016] Use __buildin_memcpy and __memcpy for array assignment

2015-09-06 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31016 Thomas Koenig changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|tkoenig at gcc do

[Bug fortran/31016] Use __buildin_memcpy and __memcpy for array assignment

2013-07-28 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31016 Eric Botcazou changed: What|Removed |Added CC||ebotcazou at gcc dot gnu.org --- Comment

[Bug fortran/31016] Use __buildin_memcpy and __memcpy for array assignment

2013-07-27 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31016 --- Comment #7 from Tobias Burnus --- (In reply to Thomas Koenig from comment #6) > Working on it a little bit. I believe that the middle end prefers the use of ARRAY_RANGE_REF to the use of memcpy. The reason is that with ARRAY_RANGE_REF it know

[Bug fortran/31016] Use __buildin_memcpy and __memcpy for array assignment

2013-07-27 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31016 Thomas Koenig changed: What|Removed |Added Status|NEW |ASSIGNED CC|

[Bug fortran/31016] Use __buildin_memcpy and __memcpy for array assignment

2007-04-30 Thread pinskia at gcc dot gnu dot org
--- Comment #5 from pinskia at gcc dot gnu dot org 2007-04-30 17:25 --- > AFAIK the libc memset/cpy choose the algorithm depending the the size etc., so > you have to do a big block to make up for all the overhead. But what could be > done for small multidimensional arrays would be to "f

[Bug fortran/31016] Use __buildin_memcpy and __memcpy for array assignment

2007-04-29 Thread jb at gcc dot gnu dot org
--- Comment #4 from jb at gcc dot gnu dot org 2007-04-29 11:46 --- I don't think you can use memset for populating real arrays except when the value is 0.0; the bit patterns would be different, as memset takes an int argument which is actually converted to unsigned char. AFAIK the libc

[Bug fortran/31016] Use __buildin_memcpy and __memcpy for array assignment

2007-03-01 Thread tkoenig at gcc dot gnu dot org
--- Comment #3 from tkoenig at gcc dot gnu dot org 2007-03-01 19:34 --- Confirmed. -- tkoenig at gcc dot gnu dot org changed: What|Removed |Added Status|UNCON

[Bug fortran/31016] Use __buildin_memcpy and __memcpy for array assignment

2007-03-01 Thread burnus at gcc dot gnu dot org
--- Comment #2 from burnus at gcc dot gnu dot org 2007-03-01 19:26 --- And another example for compile-time known sizes: subroutine bar(a,n) implicit none integer :: n real :: a(n),b(12) a(1:12) = b a(2:n) = b ! Here, n is unknown, but it is only valid if the shapes of b an a are

[Bug fortran/31016] Use __buildin_memcpy and __memcpy for array assignment

2007-03-01 Thread burnus at gcc dot gnu dot org
--- Comment #1 from burnus at gcc dot gnu dot org 2007-03-01 19:15 --- subroutine bar(a,b,n) implicit none integer :: n real :: a(n,n), b(n,n) a = b end subroutine For that example example, the overhead is even more obvious. One needs to run only: for (int i = 0; i < n*n; i++) a[