This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/52473] CSHIFT slow - inline it?


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52473

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Looking at the code, inlining cshift for a constant shift
could already be a good idea.

So, change

b = cshift(b,1) + cshift(b,-1)

to

a = b

b(1) = a(2) + a(n)
b(2:n-1) = a(1:n-2) + a(3:n)
b(n) = a(1) + a(n-1)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]