intel/fs: Add support for a new load_reloc_const intrinsic
[mesa.git] / src / compiler / nir / nir_lower_to_source_mods.c
index 63ef4043fe278df2a3b5dd5fc3ed4e7ff3d4c65a..ab9581dcc3d98f46b4d94cb6a1a8e3481728ab80 100644 (file)
@@ -98,7 +98,7 @@ nir_lower_to_source_mods_block(nir_block *block,
          if (!parent->src[0].src.is_ssa)
             continue;
 
-         if (!lower_abs && (parent->op == nir_op_fabs &&
+         if (!lower_abs && (parent->op == nir_op_fabs ||
                             parent->op == nir_op_iabs))
             continue;
 
@@ -122,8 +122,8 @@ nir_lower_to_source_mods_block(nir_block *block,
             alu->src[i].swizzle[j] = parent->src[0].swizzle[alu->src[i].swizzle[j]];
          }
 
-         if (list_empty(&parent->dest.dest.ssa.uses) &&
-             list_empty(&parent->dest.dest.ssa.if_uses))
+         if (list_is_empty(&parent->dest.dest.ssa.uses) &&
+             list_is_empty(&parent->dest.dest.ssa.if_uses))
             nir_instr_remove(&parent->instr);
 
          progress = true;
@@ -144,7 +144,7 @@ nir_lower_to_source_mods_block(nir_block *block,
       if (!(options & nir_lower_float_source_mods))
          continue;
 
-      if (!list_empty(&alu->dest.dest.ssa.if_uses))
+      if (!list_is_empty(&alu->dest.dest.ssa.if_uses))
          continue;
 
       bool all_children_are_sat = true;
@@ -178,7 +178,7 @@ nir_lower_to_source_mods_block(nir_block *block,
          assert(child_src->is_ssa);
          nir_alu_instr *child_alu = nir_instr_as_alu(child_src->parent_instr);
 
-         child_alu->op = nir_op_fmov;
+         child_alu->op = nir_op_mov;
          child_alu->dest.saturate = false;
          /* We could propagate the dest of our instruction to the
           * destinations of the uses here.  However, one quick round of