On Tue, Dec 16, 2025 at 11:31:13PM +0100, Florian Weimer wrote:
> * Steve Kargl via Gcc:
> 
> > So, my question is "Does -flto simply suppress reporting from
> > -fopt-info-optall or does -flto actually suppress unrolling,
> > tree vectorization, and tree auto parallization.
> 
> Do you supply -fopt-info-optall during linking?
> 

To simplify things,

% cat xxx.f90
module xxx
   implicit none
   contains
      subroutine bar(n, dx, x, y)
         integer, intent(in) :: n
         real, intent(in) :: dx, x(n)
         real, intent(out) :: y(n)
         integer i
         y = x + dx * [(i, i = 0, n-1)]
      end subroutine bar
end module xxx


% gfcx --version
GNU Fortran (GCC) 16.0.0 20251119 (experimental)
% gfcx -c -O3 -ftree-vectorize -fopt-info-optall xxx.f90
xxx.f90:9:39: optimized: loop vectorized using 16 byte vectors and unroll 
factor 4
xxx.f90:9:39: optimized: epilogue loop vectorized using 8 byte vectors and 
unroll factor 2
xxx.f90:9:39: optimized: loop vectorized using 16 byte vectors and unroll 
factor 4
xxx.f90:9:39: optimized: loop turned into non-loop; it never loops
xxx.f90:9:39: optimized: loop turned into non-loop; it never loops
xxx.f90:9:39: optimized: loop with 2 iterations completely unrolled (header 
execution count 7569051)
% gfcx -c -O3 -ftree-vectorize -fopt-info-optall -flto=auto xxx.f90
(nothing?)

-- 
Steve

Reply via email to