ir3: disallow moving memory writes over discard

Writes to global memory should not be moved over discard,
otherwise we could have unintended side-effects or lack of
side-effects where they should be observed.

Fixes tests:
 dEQP-VK.rasterization.frag_side_effects.color_at_beginning.kill
 dEQP-VK.rasterization.frag_side_effects.color_at_end.kill

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <!9365>
55 jobs for !9365 with turnip/fix/kill-scheduled-before-writes in 20 minutes and 24 seconds (queued for 3 seconds)
latest detached
Status Job ID Name Coverage
  Sanity
passed sanity #7745058

00:00:12

 
  Container
passed arm_build #7745064
aarch64

00:00:18

passed arm_test-base #7745066

00:00:17

passed windows_build_vs2019 #7745067
windows shell 1809 mesa

00:00:09

passed x86_build-base #7745060

00:01:31

passed x86_test-base #7745062

00:01:29

 
  Container 2
passed android_build #7745082

00:00:17

passed arm64_test #7745088

00:01:15

passed armhf_test #7745089

00:00:32

passed i386_build #7745077

00:00:16

passed kernel+rootfs_amd64 #7745070

00:00:21

passed kernel+rootfs_arm64 #7745072
aarch64

00:00:11

passed kernel+rootfs_armhf #7745074
aarch64

00:00:15

passed ppc64el_build #7745079

00:00:36

passed s390x_build #7745080

00:00:16

passed x86_build #7745075

00:00:25

passed x86_test-gl #7745084

00:00:16

passed x86_test-vk #7745086

00:00:19

 
  Meson X86 64
passed meson-clang #7745099

00:02:49

passed meson-clover #7745100

00:04:06

passed meson-clover-testing #7745095

00:01:33

passed meson-gallium #7745096
gstreamer

00:01:31

passed meson-release #7745097

00:02:49

passed meson-testing #7745091

00:01:35

passed meson-testing-asan #7745093

00:03:34

passed meson-vulkan #7745102

00:02:29

 
  Build Misc
passed meson-android #7745104

00:01:03

passed meson-arm64 #7745108
aarch64

00:03:09

passed meson-arm64-asan #7745110
aarch64

00:03:28

passed meson-arm64-build-test #7745111
aarch64

00:02:29

passed meson-armhf #7745106
aarch64

00:04:33

passed meson-i386 #7745113

00:02:59

passed meson-mingw32-x86_64 #7745119

00:02:18

passed meson-ppc64el #7745117
kvm

00:02:31

passed meson-s390x #7745115
kvm

00:03:28

 
  Freedreno
passed a306_gles2 #7745121
google-freedreno-db410c

00:05:28

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

00:08:55

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

00:08:51

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

00:10:01

passed a306_gles3_options #7745128
google-freedreno-db410c

00:03:48

passed a530_gles2 #7745130
google-freedreno-db820c

00:05:50

passed a530_gles31 1/2 #7745136
google-freedreno-db820c

00:07:17

passed a530_gles3 1/2 #7745132
google-freedreno-db820c

00:09:11

passed a530_gles31 2/2 #7745138
google-freedreno-db820c

00:07:59

passed a530_gles3 2/2 #7745134
google-freedreno-db820c

00:08:19

passed a630_gl #7745145
google-freedreno-cheza

00:02:33

passed a630_gles2 #7745140
google-freedreno-cheza

00:02:48

passed a630_gles3 #7745143
google-freedreno-cheza

00:05:53

passed a630_gles31 #7745141
google-freedreno-cheza

00:05:08

passed a630_gles_asan #7745149
google-freedreno-cheza

00:04:06

passed a630_gles_others #7745147
google-freedreno-cheza

00:03:51

passed a630-traces #7745157
google-freedreno-cheza

00:06:32

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

00:07:50

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

00:08:04

passed a630_vk_sysmem #7745154
google-freedreno-cheza

00:02:13