nir/opt_algebraic: Simplify an optimization using the new search ops
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
parent
05af952a11
commit
ff8e3d3b7b
|
@ -762,13 +762,8 @@ for x, y in itertools.product(['f', 'u', 'i'], ['f', 'u', 'i']):
|
||||||
|
|
||||||
b2x = 'b2f' if x == 'f' else 'b2i'
|
b2x = 'b2f' if x == 'f' else 'b2i'
|
||||||
b2y = 'b2f' if y == 'f' else 'b2i'
|
b2y = 'b2f' if y == 'f' else 'b2i'
|
||||||
|
x2yN = '{}2{}'.format(x, y)
|
||||||
for N in [8, 16, 32, 64]:
|
optimizations.append(((x2yN, (b2x, a)), (b2y, a)))
|
||||||
if y == 'f' and N == 8:
|
|
||||||
continue
|
|
||||||
|
|
||||||
x2yN = '{}2{}{}'.format(x, y, N)
|
|
||||||
optimizations.append(((x2yN, (b2x, a)), (b2y, a)))
|
|
||||||
|
|
||||||
def fexp2i(exp, bits):
|
def fexp2i(exp, bits):
|
||||||
# We assume that exp is already in the right range.
|
# We assume that exp is already in the right range.
|
||||||
|
|
Loading…
Reference in New Issue