Improve dead-code elimination check in SPIR-V.
Improve dead-code elimination check in SPIR-V.

The dead-code elimination pass only occurs when three separate flags are
all enabled: optimize, control-flow analysis, dead-code elimination.
Previously the code checked just the dead-code elimination flag, not the
other two.

Change-Id: I1e7e356432c4398f6b072d472fe4d1ec5dac107e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376178
Auto-Submit: John Stiles <f4fcf42d3bb5924557f1eeb3be66747535e585da@google.com>
Commit-Queue: Brian Osman <794c0b5534edf5601d88e1d41975d0262da12894@google.com>
Reviewed-by: Brian Osman <794c0b5534edf5601d88e1d41975d0262da12894@google.com>

google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia