nir: handle negatives in ffma reassociation optimisation

shader-db results Iris (BDW):

total instructions in shared programs: 16632076 -> 16631057 (<.01%)
instructions in affected programs: 48010 -> 46991 (-2.12%)
helped: 47
HURT: 6

total cycles in shared programs: 915266726 -> 915263622 (<.01%)
cycles in affected programs: 1182283 -> 1179179 (-0.26%)
helped: 18
HURT: 27

total loops in shared programs: 4929 -> 4929 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 18834 -> 18801 (-0.18%)
spills in affected programs: 525 -> 492 (-6.29%)
helped: 3
HURT: 0

total fills in shared programs: 23008 -> 22981 (-0.12%)
fills in affected programs: 435 -> 408 (-6.21%)
helped: 3
HURT: 0

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <!8608>
108 jobs for !8608 with ffma_opt in 24 minutes and 34 seconds (queued for 8 seconds)
latest detached
Status Job ID Name Coverage
  Sanity
passed #7471175
sanity

00:00:08

 
  Container
passed #7471180
aarch64
arm_build

00:00:16

passed #7471182
arm_test-base

00:00:13

passed #7471184
windows shell 1809 mesa
windows_build_vs2019

00:00:09

passed #7471177
x86_build-base

00:00:16

passed #7471178
x86_test-base

00:00:14

 
  Container 2
passed #7471199
android_build

00:00:12

passed #7471204
arm64_test

00:00:13

passed #7471206
armhf_test

00:00:15

passed #7471194
i386_build

00:00:12

passed #7471187
kernel+rootfs_amd64

00:00:39

passed #7471188
aarch64
kernel+rootfs_arm64

00:01:07

passed #7471190
aarch64
kernel+rootfs_armhf

00:00:11

passed #7471195
ppc64el_build

00:00:38

passed #7471197
s390x_build

00:00:12

passed #7471192
x86_build

00:00:12

passed #7471200
x86_test-gl

00:00:13

passed #7471202
x86_test-vk

00:00:13

 
  Meson X86 64
passed #7471216
meson-clang

00:02:19

passed #7471217
meson-clover

00:03:24

passed #7471211
meson-clover-testing

00:01:26

passed #7471213
gstreamer
meson-gallium

00:01:25

passed #7471214
meson-release

00:02:19

passed #7471207
meson-testing

00:01:28

passed #7471209
meson-testing-asan

00:03:04

passed #7471219
meson-vulkan

00:01:24

 
  Build Misc
passed #7471221
meson-android

00:02:18

passed #7471225
aarch64
meson-arm64

00:01:32

passed #7471227
aarch64
meson-arm64-asan

00:03:04

passed #7471229
aarch64
meson-arm64-build-test

00:01:27

passed #7471223
aarch64
meson-armhf

00:01:40

passed #7471234
meson-i386

00:02:19

passed #7471240
meson-mingw32-x86_64

00:02:06

passed #7471238
kvm
meson-ppc64el

00:01:59

passed #7471236
kvm
meson-s390x

00:02:57

passed #7471231
windows docker 1809 mesa
meson-windows-vs2019

00:04:05

 
  Amd
passed #7471241
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles31:amd64

00:08:40

passed #7471243
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-traces:amd64

00:07:34

passed #7471245
radv-fossils

00:08:18

 
  Arm
passed #7471257
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles2:arm64

00:03:57

passed #7471259
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles3:arm64

00:06:36

passed #7471247
mesa-ci-aarch64-lava-collabora
panfrost-t720-gles2:arm64

00:07:11

passed #7471249
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles2:arm64

00:04:37

passed #7471251
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 1/2

00:06:38

passed #7471253
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 2/2

00:06:37

passed #7471255
mesa-ci-aarch64-lava-collabora
panfrost-t860-traces:arm64

00:09:51

 
  Broadcom
passed #7471280
igalia-rpi4
v3d-rpi4-gles2:armhf

00:09:04

passed #7471269
igalia-rpi4
v3d-rpi4-gles31:armhf 1/2

00:07:14

passed #7471271
igalia-rpi4
v3d-rpi4-gles31:armhf 2/2

00:07:46

passed #7471273
igalia-rpi4
v3d-rpi4-gles3:armhf 1/4

00:08:17

passed #7471275
igalia-rpi4
v3d-rpi4-gles3:armhf 2/4

00:06:08

passed #7471277
igalia-rpi4
v3d-rpi4-gles3:armhf 3/4

00:07:46

passed #7471279
igalia-rpi4
v3d-rpi4-gles3:armhf 4/4

00:07:52

passed #7471283
igalia-rpi4
v3dv-rpi4-vk:armhf 1/6

00:09:11

passed #7471285
igalia-rpi4
v3dv-rpi4-vk:armhf 2/6

00:08:28

passed #7471287
igalia-rpi4
v3dv-rpi4-vk:armhf 3/6

00:08:49

passed #7471288
igalia-rpi4
v3dv-rpi4-vk:armhf 4/6

00:08:51

passed #7471291
igalia-rpi4
v3dv-rpi4-vk:armhf 5/6

00:08:21

passed #7471293
igalia-rpi4
v3dv-rpi4-vk:armhf 6/6

00:08:12

passed #7471261
igalia-rpi3
vc4-rpi3-gles2:armhf 1/4

00:07:29

passed #7471263
igalia-rpi3
vc4-rpi3-gles2:armhf 2/4

00:07:25

passed #7471265
igalia-rpi3
vc4-rpi3-gles2:armhf 3/4

00:07:23

passed #7471267
igalia-rpi3
vc4-rpi3-gles2:armhf 4/4

00:06:21

 
  Freedreno
passed #7471296
google-freedreno-db410c
a306_gles2

00:07:40

passed #7471299
google-freedreno-db410c
a306_gles3 1/3

00:08:16

passed #7471301
google-freedreno-db410c
a306_gles3 2/3

00:08:00

passed #7471304
google-freedreno-db410c
a306_gles3 3/3

00:08:16

passed #7471306
google-freedreno-db410c
a306_gles3_options

00:06:19

passed #7471308
google-freedreno-db820c
a530_gles2 1/2

00:08:45

passed #7471310
google-freedreno-db820c
a530_gles2 2/2

00:08:29

passed #7471312
google-freedreno-db820c
a530_gles3

00:05:39

passed #7471315
google-freedreno-db820c
a530_gles31

00:07:31

passed #7471324
google-freedreno-cheza
a630_gl

00:01:25

passed #7471317
google-freedreno-cheza
a630_gles2

00:01:30

passed #7471322
google-freedreno-cheza
a630_gles3

00:04:41

passed #7471319
google-freedreno-cheza
a630_gles31

00:03:56

passed #7471363
google-freedreno-cheza
a630_gles_asan

00:02:11

passed #7471326
google-freedreno-cheza
a630_gles_others

00:02:36

passed #7471337
google-freedreno-cheza
a630-traces

00:12:14

passed #7471331
google-freedreno-cheza
a630_vk 1/2

00:06:16

passed #7471364
google-freedreno-cheza
a630_vk 2/2

00:06:15

passed #7471336
google-freedreno-cheza
a630_vk_sysmem

00:02:18

failed #7471328
google-freedreno-cheza
a630_gles_asan

00:04:54

failed #7471333
google-freedreno-cheza
a630_vk 2/2

00:07:45

 
  Software Renderer
passed #7471345
lavapipe-vk

00:05:22

passed #7471344
llvmpipe-gles2

00:01:35

passed #7471339
llvmpipe-piglit-cl

00:02:54

passed #7471341
llvmpipe-piglit-glslparser

00:03:46

passed #7471340
llvmpipe-piglit-quick_gl

00:06:52

passed #7471342
llvmpipe-piglit-quick_shader

00:06:10

passed #7471343
llvmpipe-traces

00:02:09

passed #7471350
softpipe-asan-gles31

00:01:42

passed #7471352
softpipe-gl

00:01:10

passed #7471346
softpipe-gles2

00:01:49

passed #7471347
softpipe-gles3

00:05:44

passed #7471348
softpipe-gles31 1/2

00:05:36

passed #7471349
softpipe-gles31 2/2

00:06:14

passed #7471351
softpipe-piglit-quick

00:08:10

 
  Layered Backends
passed #7471362
windows docker 1809 mesa
test-d3d12-windows

00:03:52

passed #7471357
virgl-gl30-on-gl

00:01:10

passed #7471358
virgl-gl31-on-gl

00:01:10

passed #7471359
virgl-gl32-on-gl

00:01:37

passed #7471353
virgl-gles2-on-gl

00:02:42

passed #7471355
virgl-gles31-on-gl 1/2

00:04:58

passed #7471356
virgl-gles31-on-gl 2/2

00:05:48

passed #7471354
virgl-gles3-on-gl

00:05:27

passed #7471360
virgl-traces

00:00:55

passed #7471361
zink-piglit-quick_gl

00:07:04