nir: Unroll loops with multiplication and left shift incrementation

Calculate number of iterations for loops, where incrementation is done
by multiplication.

Multiplication by  power of two may  be transformed to left  shift for
integers, thereof requires separate algorithm.

No shader-db changes were observed.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
50 jobs for !1935 with opt_loop-unroll-mult in 81 minutes and 53 seconds (queued for 8 seconds)
latest detached
Status Job ID Name Coverage
  Container
passed arm_build #966822
aarch64

00:00:25

passed arm_test #966823
aarch64

00:00:26

passed lava_arm64 #966818

00:00:20

passed lava_armhf #966817

00:00:20

passed x86_build #966819

00:00:19

passed x86_build_old #966821

00:00:20

passed x86_test #966820

00:00:20

 
  Build
passed lava-build:arm64 #966825

00:02:18

passed lava-build:armhf #966824

00:02:00

passed meson-arm64 #966828
aarch64

00:09:17

passed meson-armhf #966827
aarch64

00:06:02

passed meson-clang #966830

00:04:59

passed meson-clover #966833

00:03:33

passed meson-clover-old-llvm #966834

00:02:25

passed meson-i386 #966836

00:02:31

passed meson-main #966826

00:03:41

passed meson-mingw32-x86_64 #966837

00:01:39

passed meson-swr-glvnd #966829

00:03:07

passed meson-vulkan #966835

00:04:27

passed scons #966838

00:10:01

passed scons-old-llvm #966839

00:06:13

passed scons-swr #966831

00:02:46

passed scons-win64 #966832

00:02:21

 
  Test
passed arm64_a306_gles2 1/4 #966863
db410c

00:05:20

passed arm64_a306_gles2 2/4 #966864
db410c

00:06:16

passed arm64_a306_gles2 3/4 #966865
db410c

00:05:21

passed arm64_a306_gles2 4/4 #966866
db410c

00:05:24

passed arm64_a630_gles2 #966852
mesa-cheza

00:05:18

passed arm64_a630_gles31 1/4 #966853
mesa-cheza

00:05:05

passed arm64_a630_gles31 2/4 #966854
mesa-cheza

00:05:46

passed arm64_a630_gles31 3/4 #966855
mesa-cheza

00:05:48

passed arm64_a630_gles31 4/4 #966856
mesa-cheza

00:05:19

passed arm64_a630_gles3 1/6 #966857
mesa-cheza

00:04:12

passed arm64_a630_gles3 2/6 #966858
mesa-cheza

00:04:33

passed arm64_a630_gles3 3/6 #966859
mesa-cheza

00:04:19

passed arm64_a630_gles3 4/6 #966860
mesa-cheza

00:04:22

passed arm64_a630_gles3 5/6 #966861
mesa-cheza

00:04:25

passed arm64_a630_gles3 6/6 #966862
mesa-cheza

00:04:41

passed panfrost-t760-test:armhf #966840
lava-rk3288-veyron-jaq

00:06:31

passed panfrost-t860-test:arm64 #966841
lava-rk3399-gru-kevin

00:07:52

passed piglit-glslparser+quick_shader #966843

00:04:56

passed piglit-quick_gl #966842

00:08:18

passed test-llvmpipe-gles2 #966844

00:03:37

passed test-softpipe-gles2 #966845

00:01:40

passed test-softpipe-gles31 1/4 #966848

00:03:09

passed test-softpipe-gles3 1/2 #966846

00:05:54

passed test-softpipe-gles31 2/4 #966849

00:04:12

passed test-softpipe-gles31 3/4 #966850

00:06:32

passed test-softpipe-gles31 4/4 #966851

00:03:16

passed test-softpipe-gles3 2/2 #966847

00:05:01