nir/repair_ssa: Replace the unreachable check with the phi builder

In a3268599, I attempted to fix nir_repair_ssa for unreachable
blocks.  However, that commit missed the possibility that the use is in
a block which, itself, is unreachable.  In this case, we can end up in
an infinite loop trying to replace a def with itself.  Even though a
no-op replacement is a fine operation, it keeps extending the end of the
uses list as we're walking it.  Instead of explicitly checking for the
group of conditions, just check if the phi builder gives us a different
def.  That's guaranteed to be 100% reliable and, while it lacks symmetry
with the is_valid checks, should be more reliable.
22 jobs for !1911 with review/nir-more-repair-ssa-fixes in 16 minutes and 28 seconds (queued for 3 seconds)
detached
Status Job ID Name Coverage
  Containers Build
passed #586467
debian

00:00:28

 
  Build+Test
passed #586476
meson-arm64

00:03:12

passed #586475
meson-armhf

00:02:26

passed #586470
meson-clang

00:09:59

passed #586473
meson-clover

00:11:17

passed #586477
meson-i386

00:04:23

passed #586468
meson-main

00:11:57

passed #586469
meson-swr-glvnd

00:07:17

passed #586474
meson-vulkan

00:03:13

passed #586479
scons-llvm

00:04:05

passed #586478
scons-nollvm

00:05:42

passed #586471
scons-swr

00:08:35

passed #586472
scons-win64

00:07:50

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

00:03:35

passed #586481
test-llvmpipe-gles2 2/4

00:03:45

passed #586482
test-llvmpipe-gles2 3/4

00:03:26

passed #586483
test-llvmpipe-gles2 4/4

00:03:40

passed #586484
test-softpipe-gles2 1/4

00:01:34

passed #586485
test-softpipe-gles2 2/4

00:01:44

passed #586486
test-softpipe-gles2 3/4

00:01:18

passed #586487
test-softpipe-gles2 4/4

00:01:25

passed #586488
test-softpipe-gles3-limited

00:03:12