https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120647
--- Comment #3 from vekumar at gcc dot gnu.org ---
Fortran test case.
program pop_simple
implicit none
integer, parameter :: rank2 = 9
integer :: test_part(rank2, rank2)
integer :: i, j, iter, niter
test_part = 0
test_part(1,1) = 1
test_part(2,2) = 2
test_part(3,3) = 3
test_part(4,4) = 4
test_part(5,5) = 5
test_part(6,6) = 6
test_part(7,7) = 7
test_part(8,8) = 8
test_part(9,9) = 9
do i = 1, rank2
do j = 1, rank2
if (count(test_part(:, i) /= 0) > rank2/2) test_part(i,j) = 0
end do
enddo
print *, "done", test_part(1,1), test_part(5,5)
end program pop_simple
I need to stop unrolling to vectorize this without "popcnt"