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
92 jobs for !8608 with ffma_opt in 8 seconds (queued for 4 seconds)
detached
Status Job ID Name Coverage
  Sanity
passed #6778151
sanity

00:00:08

 
  Container
manual #6778154
aarch64 manual
arm_build
manual #6778155
manual
arm_test-base
manual #6778156
windows shell 1809 mesa manual
windows_build_vs2019
manual #6778152
manual
x86_build-base
manual #6778153
manual
x86_test-base
 
  Container 2
created #6778164
android_build
created #6778167
arm64_test
created #6778168
armhf_test
created #6778161
i386_build
created #6778157
kernel+rootfs_amd64
created #6778158
aarch64
kernel+rootfs_arm64
created #6778159
aarch64
kernel+rootfs_armhf
created #6778162
ppc64el_build
created #6778163
s390x_build
created #6778160
x86_build
created #6778165
x86_test-gl
created #6778166
x86_test-vk
 
  Meson X86 64
created #6778174
meson-clang
created #6778175
meson-clover
created #6778171
meson-clover-testing
created #6778172
meson-gallium
created #6778173
meson-release
created #6778169
meson-testing
created #6778170
meson-testing-asan
created #6778176
meson-vulkan
 
  Build Misc
created #6778177
meson-android
created #6778179
aarch64
meson-arm64
created #6778180
aarch64
meson-arm64-build-test
created #6778178
aarch64
meson-armhf
created #6778183
meson-i386
created #6778186
meson-mingw32-x86_64
created #6778185
kvm
meson-ppc64el
created #6778184
kvm
meson-s390x
created #6778181
windows docker 1809 mesa
meson-windows-vs2019
created #6778182
allowed to fail
scons-win64
 
  Amd
created #6778187
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles2:amd64
created #6778189
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles31:amd64
created #6778188
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles3:amd64
created #6778190
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-traces:amd64
created #6778191
radv-fossils
 
  Arm
created #6778197
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles2:arm64
created #6778198
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles3:arm64
created #6778192
mesa-ci-aarch64-lava-collabora
panfrost-t720-gles2:arm64
created #6778193
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles2:arm64
created #6778194
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 1/2
created #6778195
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 2/2
created #6778196
mesa-ci-aarch64-lava-collabora
panfrost-t860-traces:arm64
 
  Freedreno
created #6778209
google-freedreno-db410c
arm64_a306_gles2
created #6778210
google-freedreno-db410c
arm64_a306_gles3
created #6778211
google-freedreno-db410c
arm64_a306_gles3_options
created #6778212
google-freedreno-db820c
arm64_a530_gles2 1/2
created #6778213
google-freedreno-db820c
arm64_a530_gles2 2/2
created #6778214
google-freedreno-db820c
arm64_a530_gles3
created #6778215
google-freedreno-db820c
arm64_a530_gles31
created #6778216
google-freedreno-db820c
arm64_a530_piglit_shader
created #6778203
google-freedreno-cheza
arm64_a630_gl
created #6778200
google-freedreno-cheza
arm64_a630_gles2
created #6778202
google-freedreno-cheza
arm64_a630_gles3
created #6778201
google-freedreno-cheza
arm64_a630_gles31
created #6778204
google-freedreno-cheza
arm64_a630_gles_others
created #6778208
google-freedreno-cheza
arm64_a630_piglit_shader
created #6778199
google-freedreno-cheza
arm64-a630-traces
created #6778205
google-freedreno-cheza
arm64_a630_vk 1/2
created #6778206
google-freedreno-cheza
arm64_a630_vk 2/2
created #6778207
google-freedreno-cheza
arm64_a630_vk_sysmem
 
  Raspberrypi
created #6778217
igalia-rpi3
vc4-rpi3-gles2:armhf 1/4
created #6778218
igalia-rpi3
vc4-rpi3-gles2:armhf 2/4
created #6778219
igalia-rpi3
vc4-rpi3-gles2:armhf 3/4
created #6778220
igalia-rpi3
vc4-rpi3-gles2:armhf 4/4
 
  Software Renderer
created #6778233
lavapipe-vk
created #6778226
llvmpipe-gles2
created #6778221
llvmpipe-piglit-cl
created #6778223
llvmpipe-piglit-glslparser
created #6778222
llvmpipe-piglit-quick_gl
created #6778224
llvmpipe-piglit-quick_shader
created #6778225
llvmpipe-traces
created #6778232
softpipe-gl
created #6778227
softpipe-gles2
created #6778228
softpipe-gles3
created #6778229
softpipe-gles31 1/2
created #6778230
softpipe-gles31 2/2
created #6778231
softpipe-piglit-quick
 
  Layered Backends
created #6778234
windows docker 1809 mesa
test-d3d12-windows
created #6778240
virgl-gl30-on-gl
created #6778241
virgl-gl31-on-gl
created #6778242
virgl-gl32-on-gl
created #6778236
virgl-gles2-on-gl
created #6778238
virgl-gles31-on-gl 1/2
created #6778239
virgl-gles31-on-gl 2/2
created #6778237
virgl-gles3-on-gl
created #6778235
virgl-traces