Revert "nir: Turn imov/fmov of undef into undef."
authorTimothy Arceri <timothy.arceri@collabora.com>
Thu, 15 Dec 2016 05:51:13 +0000 (16:51 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 15 Dec 2016 06:05:12 +0000 (17:05 +1100)
This reverts commit 6aa730000fea84a14b49828a4bb30761d43903bf.

This was changing the size of the undef to always be 1 (the number of inputs
to imov and fmov) which is wrong, we could be moving a vec4 for example.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
src/compiler/nir/nir_opt_undef.c

index 0f8ba31a68ef022303c1b76db1f8ee4eda8b5022..c4777a86c8f3cb26eab3dc7c78492b80e65a396f 100644 (file)
@@ -79,9 +79,7 @@ opt_undef_vecN(nir_builder *b, nir_alu_instr *alu)
 {
    if (alu->op != nir_op_vec2 &&
        alu->op != nir_op_vec3 &&
-       alu->op != nir_op_vec4 &&
-       alu->op != nir_op_fmov &&
-       alu->op != nir_op_imov)
+       alu->op != nir_op_vec4)
       return false;
 
    assert(alu->dest.dest.is_ssa);