package float32 file_number 0 "/inputs/subtree/xls/dslx/stdlib/apfloat.x" file_number 1 "/inputs/subtree/xls/dslx/stdlib/std.x" file_number 2 "/inputs/subtree/xls/dslx/stdlib/float32.x" fn __apfloat__is_zero_or_subnormal__8_23(x: (bits[1], bits[8], bits[23]) id=1) -> bits[1] { x_bexp: bits[8] = tuple_index(x, index=1, id=4, pos=[(0,804,5)]) literal.5: bits[8] = literal(value=0, id=5, pos=[(0,804,14)]) EXP_SZ: bits[32] = literal(value=8, id=2, pos=[(0,802,28)]) FRACTION_SZ: bits[32] = literal(value=23, id=3, pos=[(0,802,41)]) ret eq.6: bits[1] = eq(x_bexp, literal.5, id=6, pos=[(0,804,5)]) } fn __std__mask_bits__8() -> bits[8] { literal.8: bits[8] = literal(value=0, id=8, pos=[(1,835,41)]) X: bits[32] = literal(value=8, id=7, pos=[(1,835,17)]) ret not.9: bits[8] = not(literal.8, id=9, pos=[(1,835,40)]) } fn __apfloat__is_inf__8_23(x: (bits[1], bits[8], bits[23]) id=10) -> bits[1] { x_bexp: bits[8] = tuple_index(x, index=1, id=13, pos=[(0,96,6)]) invoke.14: bits[8] = invoke(to_apply=__std__mask_bits__8, id=14, pos=[(0,96,29)]) x_fraction: bits[23] = tuple_index(x, index=2, id=16, pos=[(0,96,44)]) literal.17: bits[23] = literal(value=0, id=17, pos=[(0,96,57)]) eq.15: bits[1] = eq(x_bexp, invoke.14, id=15, pos=[(0,96,6)]) eq.18: bits[1] = eq(x_fraction, literal.17, id=18, pos=[(0,96,44)]) EXP_SZ: bits[32] = literal(value=8, id=11, pos=[(0,95,14)]) FRACTION_SZ: bits[32] = literal(value=23, id=12, pos=[(0,95,27)]) ret and.19: bits[1] = and(eq.15, eq.18, id=19, pos=[(0,96,6)]) } fn __apfloat__is_nan__8_23(x: (bits[1], bits[8], bits[23]) id=20) -> bits[1] { x_bexp: bits[8] = tuple_index(x, index=1, id=23, pos=[(0,71,6)]) invoke.24: bits[8] = invoke(to_apply=__std__mask_bits__8, id=24, pos=[(0,71,29)]) x_fraction: bits[23] = tuple_index(x, index=2, id=26, pos=[(0,71,44)]) literal.27: bits[23] = literal(value=0, id=27, pos=[(0,71,57)]) eq.25: bits[1] = eq(x_bexp, invoke.24, id=25, pos=[(0,71,6)]) ne.28: bits[1] = ne(x_fraction, literal.27, id=28, pos=[(0,71,44)]) EXP_SZ: bits[32] = literal(value=8, id=21, pos=[(0,70,14)]) FRACTION_SZ: bits[32] = literal(value=23, id=22, pos=[(0,70,27)]) ret and.29: bits[1] = and(eq.25, ne.28, id=29, pos=[(0,71,6)]) } fn __apfloat__mul__8_23(x: (bits[1], bits[8], bits[23]) id=30, y: (bits[1], bits[8], bits[23]) id=31) -> (bits[1], bits[8], bits[23]) { FRACTION_SZ: bits[32] = literal(value=23, id=33, pos=[(0,3264,24)]) x_fraction: bits[23] = tuple_index(x, index=2, id=50, pos=[(0,3290,23)]) literal.52: bits[48] = literal(value=1, id=52, pos=[(0,3291,22)]) zero_ext.53: bits[48] = zero_ext(FRACTION_SZ, new_bit_count=48, id=53) y_fraction: bits[23] = tuple_index(y, index=2, id=56, pos=[(0,3292,23)]) literal.58: bits[48] = literal(value=1, id=58, pos=[(0,3293,22)]) zero_ext.59: bits[48] = zero_ext(FRACTION_SZ, new_bit_count=48, id=59) zero_ext.51: bits[48] = zero_ext(x_fraction, new_bit_count=48, id=51) shll.54: bits[48] = shll(literal.52, zero_ext.53, id=54, pos=[(0,3291,22)]) zero_ext.57: bits[48] = zero_ext(y_fraction, new_bit_count=48, id=57) shll.60: bits[48] = shll(literal.58, zero_ext.59, id=60, pos=[(0,3293,22)]) invoke.47: bits[1] = invoke(x, to_apply=__apfloat__is_zero_or_subnormal__8_23, id=47, pos=[(0,3287,40)]) invoke.48: bits[1] = invoke(y, to_apply=__apfloat__is_zero_or_subnormal__8_23, id=48, pos=[(0,3287,67)]) x_fraction__1: bits[48] = or(zero_ext.51, shll.54, id=55, pos=[(0,3290,23)]) y_fraction__1: bits[48] = or(zero_ext.57, shll.60, id=61, pos=[(0,3292,23)]) x_bexp: bits[8] = tuple_index(x, index=1, id=69, pos=[(0,3305,16)]) y_bexp: bits[8] = tuple_index(y, index=1, id=71, pos=[(0,3305,45)]) invoke.65: bits[8] = invoke(to_apply=__std__mask_bits__8, id=65, pos=[(0,3304,29)]) has_0_arg: bits[1] = or(invoke.47, invoke.48, id=49, pos=[(0,3287,40)]) umul.63: bits[48] = umul(x_fraction__1, y_fraction__1, id=63, pos=[(0,3296,63)]) literal.62: bits[48] = literal(value=0, id=62, pos=[(0,3296,34)]) zero_ext.70: bits[10] = zero_ext(x_bexp, new_bit_count=10, id=70) zero_ext.72: bits[10] = zero_ext(y_bexp, new_bit_count=10, id=72) zero_ext.66: bits[10] = zero_ext(invoke.65, new_bit_count=10, id=66) literal.67: bits[10] = literal(value=1, id=67, pos=[(0,3304,61)]) fraction: bits[48] = sel(has_0_arg, cases=[umul.63, literal.62], id=64, pos=[(0,3296,19)]) add.73: bits[10] = add(zero_ext.70, zero_ext.72, id=73, pos=[(0,3305,16)]) bias: bits[10] = shra(zero_ext.66, literal.67, id=68, pos=[(0,3304,29)]) bit_slice.77: bits[1] = bit_slice(fraction, start=47, width=1, id=77, pos=[(0,3320,33)]) exp: bits[10] = sub(add.73, bias, id=74, pos=[(0,3305,16)]) literal.75: bits[10] = literal(value=0, id=75, pos=[(0,3314,29)]) fraction_shift: bits[48] = zero_ext(bit_slice.77, new_bit_count=48, id=78) bit_slice.79: bits[1] = bit_slice(fraction, start=0, width=1, id=79, pos=[(0,3325,25)]) exp__1: bits[10] = sel(has_0_arg, cases=[exp, literal.75], id=76, pos=[(0,3314,14)]) bit_slice.83: bits[10] = bit_slice(fraction_shift, start=0, width=10, id=83) fraction__1: bits[48] = shrl(fraction, fraction_shift, id=81, pos=[(0,3326,19)]) sticky: bits[48] = zero_ext(bit_slice.79, new_bit_count=48, id=80) exp__2: bits[10] = add(exp__1, bit_slice.83, id=84, pos=[(0,3330,14)]) literal.87: bits[10] = literal(value=0, id=87, pos=[(0,3342,29)]) fraction__2: bits[48] = or(fraction__1, sticky, id=82, pos=[(0,3327,19)]) literal.89: bits[48] = literal(value=1, id=89, pos=[(0,3342,60)]) sle.88: bits[1] = sle(exp__2, literal.87, id=88, pos=[(0,3342,22)]) shrl.90: bits[48] = shrl(fraction__2, literal.89, id=90, pos=[(0,3342,48)]) bit_slice.85: bits[1] = bit_slice(fraction__2, start=0, width=1, id=85, pos=[(0,3341,25)]) fraction__3: bits[48] = sel(sle.88, cases=[fraction__2, shrl.90], id=91, pos=[(0,3342,19)]) sticky__1: bits[48] = zero_ext(bit_slice.85, new_bit_count=48, id=86) fraction__4: bits[48] = or(fraction__3, sticky__1, id=92, pos=[(0,3343,19)]) bit_slice.94: bits[22] = bit_slice(fraction__4, start=0, width=22, id=94, pos=[(0,3354,31)]) literal.95: bits[22] = literal(value=0, id=95, pos=[(0,3354,67)]) zero_ext.106: bits[48] = zero_ext(FRACTION_SZ, new_bit_count=48, id=106) bit_slice.99: bits[22] = bit_slice(fraction__4, start=0, width=22, id=99, pos=[(0,3356,41)]) literal.100: bits[22] = literal(value=0, id=100, pos=[(0,3357,32)]) bit_slice.93: bits[1] = bit_slice(fraction__4, start=22, width=1, id=93, pos=[(0,3353,30)]) eq.96: bits[1] = eq(bit_slice.94, literal.95, id=96, pos=[(0,3354,31)]) shrl.107: bits[48] = shrl(fraction__4, zero_ext.106, id=107, pos=[(0,3364,20)]) bit_slice.98: bits[1] = bit_slice(fraction__4, start=22, width=1, id=98, pos=[(0,3355,40)]) ne.101: bits[1] = ne(bit_slice.99, literal.100, id=101, pos=[(0,3356,41)]) is_half_way: bits[1] = and(bit_slice.93, eq.96, id=97, pos=[(0,3353,30)]) bit_slice.103: bits[1] = bit_slice(fraction__4, start=23, width=1, id=103, pos=[(0,3359,45)]) fraction__5: bits[23] = bit_slice(shrl.107, start=0, width=23, id=108) greater_than_half_way: bits[1] = and(bit_slice.98, ne.101, id=102, pos=[(0,3355,40)]) and.104: bits[1] = and(is_half_way, bit_slice.103, id=104, pos=[(0,3359,23)]) fraction__6: bits[24] = zero_ext(fraction__5, new_bit_count=24, id=109) literal.110: bits[24] = literal(value=1, id=110, pos=[(0,3366,47)]) do_round_up: bits[1] = or(greater_than_half_way, and.104, id=105, pos=[(0,3358,22)]) add.111: bits[24] = add(fraction__6, literal.110, id=111, pos=[(0,3366,36)]) fraction__7: bits[24] = sel(do_round_up, cases=[fraction__6, add.111], id=112, pos=[(0,3366,19)]) literal.114: bits[10] = literal(value=1, id=114, pos=[(0,3370,39)]) bit_slice.113: bits[1] = bit_slice(fraction__7, start=23, width=1, id=113, pos=[(0,3370,25)]) add.115: bits[10] = add(exp__2, literal.114, id=115, pos=[(0,3370,33)]) exp__3: bits[10] = sel(bit_slice.113, cases=[exp__2, add.115], id=116, pos=[(0,3370,14)]) literal.117: bits[10] = literal(value=0, id=117, pos=[(0,3371,30)]) is_subnormal: bits[1] = sle(exp__3, literal.117, id=118, pos=[(0,3371,23)]) result_exp: bits[9] = bit_slice(exp__3, start=0, width=9, id=122) literal.124: bits[9] = literal(value=0, id=124, pos=[(0,3380,39)]) high_exp: bits[8] = invoke(to_apply=__std__mask_bits__8, id=128, pos=[(0,3384,33)]) invoke.146: bits[1] = invoke(x, to_apply=__apfloat__is_inf__8_23, id=146, pos=[(0,3398,28)]) invoke.147: bits[1] = invoke(y, to_apply=__apfloat__is_inf__8_23, id=147, pos=[(0,3398,62)]) result_exp__1: bits[9] = sel(is_subnormal, cases=[result_exp, literal.124], id=125, pos=[(0,3380,21)]) zero_ext.133: bits[9] = zero_ext(high_exp, new_bit_count=9, id=133) zero_ext.129: bits[9] = zero_ext(high_exp, new_bit_count=9, id=129) result_fraction: bits[23] = bit_slice(fraction__7, start=0, width=23, id=123) literal.126: bits[23] = literal(value=0, id=126, pos=[(0,3381,44)]) invoke.143: bits[1] = invoke(x, to_apply=__apfloat__is_nan__8_23, id=143, pos=[(0,3397,28)]) invoke.144: bits[1] = invoke(y, to_apply=__apfloat__is_nan__8_23, id=144, pos=[(0,3397,62)]) has_inf_arg: bits[1] = or(invoke.146, invoke.147, id=148, pos=[(0,3398,28)]) invoke.137: bits[1] = invoke(x, to_apply=__apfloat__is_inf__8_23, id=137, pos=[(0,3391,31)]) invoke.138: bits[1] = invoke(y, to_apply=__apfloat__is_inf__8_23, id=138, pos=[(0,3391,65)]) ult.134: bits[1] = ult(result_exp__1, zero_ext.133, id=134, pos=[(0,3388,11)]) bit_slice.135: bits[8] = bit_slice(result_exp__1, start=0, width=8, id=135) ult.130: bits[1] = ult(result_exp__1, zero_ext.129, id=130, pos=[(0,3386,11)]) literal.131: bits[23] = literal(value=0, id=131, pos=[(0,3386,78)]) result_fraction__1: bits[23] = sel(is_subnormal, cases=[result_fraction, literal.126], id=127, pos=[(0,3381,26)]) bit_slice.153: bits[23] = bit_slice(FRACTION_SZ, start=0, width=23, id=153) literal.154: bits[23] = literal(value=1, id=154, pos=[(0,3401,78)]) has_nan_arg: bits[1] = or(invoke.143, invoke.144, id=145, pos=[(0,3397,28)]) and.149: bits[1] = and(has_0_arg, has_inf_arg, id=149, pos=[(0,3399,40)]) x_sign: bits[1] = tuple_index(x, index=0, id=119, pos=[(0,3374,23)]) y_sign: bits[1] = tuple_index(y, index=0, id=120, pos=[(0,3374,33)]) is_operand_inf: bits[1] = or(invoke.137, invoke.138, id=139, pos=[(0,3391,31)]) result_exp__2: bits[8] = sel(ult.134, cases=[high_exp, bit_slice.135], id=136, pos=[(0,3388,8)]) result_fraction__2: bits[23] = sel(ult.130, cases=[literal.131, result_fraction__1], id=132, pos=[(0,3386,8)]) literal.141: bits[23] = literal(value=0, id=141, pos=[(0,3393,46)]) literal.152: bits[23] = literal(value=1, id=152, pos=[(0,3401,23)]) sub.155: bits[23] = sub(bit_slice.153, literal.154, id=155, pos=[(0,3401,45)]) EXP_SZ: bits[32] = literal(value=8, id=32, pos=[(0,3264,11)]) literal.34: bits[32] = literal(value=1, id=34, pos=[(0,3268,35)]) is_result_nan: bits[1] = or(has_nan_arg, and.149, id=150, pos=[(0,3399,24)]) result_sign: bits[1] = ne(x_sign, y_sign, id=121, pos=[(0,3374,23)]) literal.158: bits[1] = literal(value=0, id=158, pos=[(0,3403,41)]) result_exp__3: bits[8] = sel(is_operand_inf, cases=[result_exp__2, high_exp], id=140, pos=[(0,3392,21)]) result_fraction__3: bits[23] = sel(is_operand_inf, cases=[result_fraction__2, literal.141], id=142, pos=[(0,3393,26)]) nan_fraction: bits[23] = shll(literal.152, sub.155, id=156, pos=[(0,3401,23)]) WIDE_EXP: bits[32] = add(EXP_SZ, literal.34, id=35, pos=[(0,3268,26)]) literal.36: bits[32] = literal(value=1, id=36, pos=[(0,3270,39)]) literal.38: bits[32] = literal(value=1, id=38, pos=[(0,3274,49)]) add.40: bits[32] = add(FRACTION_SZ, FRACTION_SZ, id=40, pos=[(0,3278,31)]) literal.41: bits[32] = literal(value=2, id=41, pos=[(0,3278,59)]) literal.43: bits[32] = literal(value=1, id=43, pos=[(0,3280,53)]) literal.45: bits[32] = literal(value=1, id=45, pos=[(0,3284,47)]) result_sign__1: bits[1] = sel(is_result_nan, cases=[result_sign, literal.158], id=159, pos=[(0,3403,22)]) result_exp__4: bits[8] = sel(is_result_nan, cases=[result_exp__3, high_exp], id=151, pos=[(0,3400,21)]) result_fraction__4: bits[23] = sel(is_result_nan, cases=[result_fraction__3, nan_fraction], id=157, pos=[(0,3402,26)]) SIGNED_EXP: bits[32] = add(WIDE_EXP, literal.36, id=37, pos=[(0,3270,28)]) ROUNDING_FRACTION: bits[32] = add(FRACTION_SZ, literal.38, id=39, pos=[(0,3274,35)]) WIDE_FRACTION: bits[32] = add(add.40, literal.41, id=42, pos=[(0,3278,31)]) FRACTION_ROUNDING_BIT: bits[32] = sub(FRACTION_SZ, literal.43, id=44, pos=[(0,3280,39)]) STICKY_FRACTION: bits[32] = add(FRACTION_SZ, literal.45, id=46, pos=[(0,3284,33)]) ret tuple.160: (bits[1], bits[8], bits[23]) = tuple(result_sign__1, result_exp__4, result_fraction__4, id=160, pos=[(0,3405,33)]) } top fn __float32__mul(x: (bits[1], bits[8], bits[23]) id=161, y: (bits[1], bits[8], bits[23]) id=162) -> (bits[1], bits[8], bits[23]) { ret invoke.163: (bits[1], bits[8], bits[23]) = invoke(x, y, to_apply=__apfloat__mul__8_23, id=163, pos=[(2,367,48)]) }