delete extra cast (#14517)

This commit is contained in:
Nino Risteski
2026-02-03 14:29:04 +01:00
committed by GitHub
parent 9d1e9e643e
commit af4c74bb41

View File

@@ -44,7 +44,7 @@ def ldexp3k(d:UOp, e:UOp) -> UOp:
dtype = {dtypes.float64: dtypes.int64, dtypes.float32: dtypes.int32, dtypes.float16: dtypes.int16}[d.dtype.scalar()].vec(d.dtype.count)
m1 = d.bitcast(dtype)
m2 = shl(e.cast(dtype), mantissa_bits(d.dtype))
return (m1 + m2).bitcast(d.dtype).cast(d.dtype)
return (m1 + m2).bitcast(d.dtype)
def ldexp2k(d:UOp, e:UOp) -> UOp:
"""d*2^e. much faster than ldexp3k but risky. d > 0 and d is not denormal."""