nir/loop_analyze: Treat do{}while(false) loops as 0 iterations

Loops like:

block block_0:
vec1 32 ssa_2 = load_const (0x00000020)
vec1 32 ssa_3 = load_const (0x00000001)
loop {
    vec1 32 ssa_7 = phi block_0: ssa_3, block_4: ssa_9
    vec1 1 ssa_8 = ige ssa_2, ssa_7
    if ssa_8 {
        break
    } else {
    }
    vec1 32 ssa_9 = iadd ssa_7, ssa_1
}

Were treated as having more than 1 iteration and after unrolling
produced wrong results, however such loop will exit during
the first iteration if not unrolled.

So we check if loop will actually loop.

Fixes tests/shaders/glsl-fs-loop-while-false-02.shader_test

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
22 jobs for !1718 with fix/loop-iterations-count-inference in 17 minutes and 55 seconds (queued for 1 minute and 26 seconds)
latest detached
Status Name Job ID Coverage
  Containers Build
passed debian #521430

00:00:31

 
  Build+Test
passed meson-arm64 #521439

00:02:40

passed meson-armhf #521438

00:02:41

passed meson-clang #521432

00:09:32

passed meson-clover #521436

00:10:10

passed meson-i386 #521440

00:02:17

passed meson-main #521435

00:11:14

passed meson-swr-glvnd #521431

00:05:57

passed meson-vulkan #521437

00:03:06

passed scons-llvm #521442

00:05:49

passed scons-nollvm #521441

00:04:38

passed scons-swr #521433

00:09:04

passed scons-win64 #521434

00:06:44

 
  Test
passed test-llvmpipe-gles2 1/4 #521443

00:04:27

passed test-llvmpipe-gles2 2/4 #521444

00:04:51

passed test-llvmpipe-gles2 3/4 #521445

00:04:27

passed test-llvmpipe-gles2 4/4 #521446

00:02:23

passed test-softpipe-gles2 1/4 #521447

00:01:22

passed test-softpipe-gles2 2/4 #521448

00:01:29

passed test-softpipe-gles2 3/4 #521449

00:01:48

passed test-softpipe-gles2 4/4 #521450

00:00:59

passed test-softpipe-gles3-limited #521451

00:03:14