nir: turn an ssa check in nir_search into an assert

Everything should be in ssa form when we call this. This is a
hotpath so replace the check with an assert.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
Timothy Arceri
2019-02-13 16:09:20 +11:00
parent 46a4d2c867
commit 68baf96824

View File

@@ -200,8 +200,7 @@ match_value(const nir_search_value *value, nir_alu_instr *instr, unsigned src,
* replacing so those reads will happen after the original reads and may * replacing so those reads will happen after the original reads and may
* not be valid if they're register reads. * not be valid if they're register reads.
*/ */
if (!instr->src[src].src.is_ssa) assert(instr->src[src].src.is_ssa);
return false;
/* If the source is an explicitly sized source, then we need to reset /* If the source is an explicitly sized source, then we need to reset
* both the number of components and the swizzle. * both the number of components and the swizzle.