package float64 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/float64.x" fn __apfloat__is_zero_or_subnormal__11_52(x: (bits[1], bits[11], bits[52]) id=1) -> bits[1] { x_bexp: bits[11] = tuple_index(x, index=1, id=4, pos=[(0,804,5)]) literal.5: bits[11] = literal(value=0, id=5, pos=[(0,804,14)]) EXP_SZ: bits[32] = literal(value=11, id=2, pos=[(0,802,28)]) FRACTION_SZ: bits[32] = literal(value=52, 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__11() -> bits[11] { literal.8: bits[11] = literal(value=0, id=8, pos=[(1,835,41)]) X: bits[32] = literal(value=11, id=7, pos=[(1,835,17)]) ret not.9: bits[11] = not(literal.8, id=9, pos=[(1,835,40)]) } fn __apfloat__is_inf__11_52(x: (bits[1], bits[11], bits[52]) id=10) -> bits[1] { x_bexp: bits[11] = tuple_index(x, index=1, id=13, pos=[(0,96,6)]) invoke.14: bits[11] = invoke(to_apply=__std__mask_bits__11, id=14, pos=[(0,96,29)]) x_fraction: bits[52] = tuple_index(x, index=2, id=16, pos=[(0,96,44)]) literal.17: bits[52] = 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=11, id=11, pos=[(0,95,14)]) FRACTION_SZ: bits[32] = literal(value=52, 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__11_52(x: (bits[1], bits[11], bits[52]) id=20) -> bits[1] { x_bexp: bits[11] = tuple_index(x, index=1, id=23, pos=[(0,71,6)]) invoke.24: bits[11] = invoke(to_apply=__std__mask_bits__11, id=24, pos=[(0,71,29)]) x_fraction: bits[52] = tuple_index(x, index=2, id=26, pos=[(0,71,44)]) literal.27: bits[52] = 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=11, id=21, pos=[(0,70,14)]) FRACTION_SZ: bits[32] = literal(value=52, 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__11_52(x: (bits[1], bits[11], bits[52]) id=30, y: (bits[1], bits[11], bits[52]) id=31) -> (bits[1], bits[11], bits[52]) { FRACTION_SZ: bits[32] = literal(value=52, id=33, pos=[(0,3268,24)]) x_fraction: bits[52] = tuple_index(x, index=2, id=50, pos=[(0,3294,23)]) literal.52: bits[106] = literal(value=0x1, id=52, pos=[(0,3295,22)]) zero_ext.53: bits[106] = zero_ext(FRACTION_SZ, new_bit_count=106, id=53) y_fraction: bits[52] = tuple_index(y, index=2, id=56, pos=[(0,3296,23)]) literal.58: bits[106] = literal(value=0x1, id=58, pos=[(0,3297,22)]) zero_ext.59: bits[106] = zero_ext(FRACTION_SZ, new_bit_count=106, id=59) zero_ext.51: bits[106] = zero_ext(x_fraction, new_bit_count=106, id=51) shll.54: bits[106] = shll(literal.52, zero_ext.53, id=54, pos=[(0,3295,22)]) zero_ext.57: bits[106] = zero_ext(y_fraction, new_bit_count=106, id=57) shll.60: bits[106] = shll(literal.58, zero_ext.59, id=60, pos=[(0,3297,22)]) invoke.47: bits[1] = invoke(x, to_apply=__apfloat__is_zero_or_subnormal__11_52, id=47, pos=[(0,3291,40)]) invoke.48: bits[1] = invoke(y, to_apply=__apfloat__is_zero_or_subnormal__11_52, id=48, pos=[(0,3291,67)]) x_fraction__1: bits[106] = or(zero_ext.51, shll.54, id=55, pos=[(0,3294,23)]) y_fraction__1: bits[106] = or(zero_ext.57, shll.60, id=61, pos=[(0,3296,23)]) x_bexp: bits[11] = tuple_index(x, index=1, id=69, pos=[(0,3309,16)]) y_bexp: bits[11] = tuple_index(y, index=1, id=71, pos=[(0,3309,45)]) invoke.65: bits[11] = invoke(to_apply=__std__mask_bits__11, id=65, pos=[(0,3308,29)]) has_0_arg: bits[1] = or(invoke.47, invoke.48, id=49, pos=[(0,3291,40)]) umul.63: bits[106] = umul(x_fraction__1, y_fraction__1, id=63, pos=[(0,3300,63)]) literal.62: bits[106] = literal(value=0x0, id=62, pos=[(0,3300,34)]) zero_ext.70: bits[13] = zero_ext(x_bexp, new_bit_count=13, id=70) zero_ext.72: bits[13] = zero_ext(y_bexp, new_bit_count=13, id=72) zero_ext.66: bits[13] = zero_ext(invoke.65, new_bit_count=13, id=66) literal.67: bits[13] = literal(value=1, id=67, pos=[(0,3308,61)]) fraction: bits[106] = sel(has_0_arg, cases=[umul.63, literal.62], id=64, pos=[(0,3300,19)]) add.73: bits[13] = add(zero_ext.70, zero_ext.72, id=73, pos=[(0,3309,16)]) bias: bits[13] = shra(zero_ext.66, literal.67, id=68, pos=[(0,3308,29)]) bit_slice.77: bits[1] = bit_slice(fraction, start=105, width=1, id=77, pos=[(0,3324,33)]) exp: bits[13] = sub(add.73, bias, id=74, pos=[(0,3309,16)]) literal.75: bits[13] = literal(value=0, id=75, pos=[(0,3318,29)]) fraction_shift: bits[106] = zero_ext(bit_slice.77, new_bit_count=106, id=78) bit_slice.79: bits[1] = bit_slice(fraction, start=0, width=1, id=79, pos=[(0,3329,25)]) exp__1: bits[13] = sel(has_0_arg, cases=[exp, literal.75], id=76, pos=[(0,3318,14)]) bit_slice.83: bits[13] = bit_slice(fraction_shift, start=0, width=13, id=83) fraction__1: bits[106] = shrl(fraction, fraction_shift, id=81, pos=[(0,3330,19)]) sticky: bits[106] = zero_ext(bit_slice.79, new_bit_count=106, id=80) exp__2: bits[13] = add(exp__1, bit_slice.83, id=84, pos=[(0,3334,14)]) literal.87: bits[13] = literal(value=0, id=87, pos=[(0,3346,29)]) fraction__2: bits[106] = or(fraction__1, sticky, id=82, pos=[(0,3331,19)]) literal.89: bits[106] = literal(value=0x1, id=89, pos=[(0,3346,60)]) sle.88: bits[1] = sle(exp__2, literal.87, id=88, pos=[(0,3346,22)]) shrl.90: bits[106] = shrl(fraction__2, literal.89, id=90, pos=[(0,3346,48)]) bit_slice.85: bits[1] = bit_slice(fraction__2, start=0, width=1, id=85, pos=[(0,3345,25)]) fraction__3: bits[106] = sel(sle.88, cases=[fraction__2, shrl.90], id=91, pos=[(0,3346,19)]) sticky__1: bits[106] = zero_ext(bit_slice.85, new_bit_count=106, id=86) fraction__4: bits[106] = or(fraction__3, sticky__1, id=92, pos=[(0,3347,19)]) bit_slice.94: bits[51] = bit_slice(fraction__4, start=0, width=51, id=94, pos=[(0,3358,31)]) literal.95: bits[51] = literal(value=0, id=95, pos=[(0,3358,67)]) zero_ext.106: bits[106] = zero_ext(FRACTION_SZ, new_bit_count=106, id=106) bit_slice.99: bits[51] = bit_slice(fraction__4, start=0, width=51, id=99, pos=[(0,3360,41)]) literal.100: bits[51] = literal(value=0, id=100, pos=[(0,3361,32)]) bit_slice.93: bits[1] = bit_slice(fraction__4, start=51, width=1, id=93, pos=[(0,3357,30)]) eq.96: bits[1] = eq(bit_slice.94, literal.95, id=96, pos=[(0,3358,31)]) shrl.107: bits[106] = shrl(fraction__4, zero_ext.106, id=107, pos=[(0,3368,20)]) bit_slice.98: bits[1] = bit_slice(fraction__4, start=51, width=1, id=98, pos=[(0,3359,40)]) ne.101: bits[1] = ne(bit_slice.99, literal.100, id=101, pos=[(0,3360,41)]) is_half_way: bits[1] = and(bit_slice.93, eq.96, id=97, pos=[(0,3357,30)]) bit_slice.103: bits[1] = bit_slice(fraction__4, start=52, width=1, id=103, pos=[(0,3363,45)]) fraction__5: bits[52] = bit_slice(shrl.107, start=0, width=52, id=108) greater_than_half_way: bits[1] = and(bit_slice.98, ne.101, id=102, pos=[(0,3359,40)]) and.104: bits[1] = and(is_half_way, bit_slice.103, id=104, pos=[(0,3363,23)]) fraction__6: bits[53] = zero_ext(fraction__5, new_bit_count=53, id=109) literal.110: bits[53] = literal(value=1, id=110, pos=[(0,3370,47)]) do_round_up: bits[1] = or(greater_than_half_way, and.104, id=105, pos=[(0,3362,22)]) add.111: bits[53] = add(fraction__6, literal.110, id=111, pos=[(0,3370,36)]) fraction__7: bits[53] = sel(do_round_up, cases=[fraction__6, add.111], id=112, pos=[(0,3370,19)]) literal.114: bits[13] = literal(value=1, id=114, pos=[(0,3374,39)]) bit_slice.113: bits[1] = bit_slice(fraction__7, start=52, width=1, id=113, pos=[(0,3374,25)]) add.115: bits[13] = add(exp__2, literal.114, id=115, pos=[(0,3374,33)]) exp__3: bits[13] = sel(bit_slice.113, cases=[exp__2, add.115], id=116, pos=[(0,3374,14)]) literal.117: bits[13] = literal(value=0, id=117, pos=[(0,3375,30)]) is_subnormal: bits[1] = sle(exp__3, literal.117, id=118, pos=[(0,3375,23)]) result_exp: bits[12] = bit_slice(exp__3, start=0, width=12, id=122) literal.124: bits[12] = literal(value=0, id=124, pos=[(0,3384,39)]) high_exp: bits[11] = invoke(to_apply=__std__mask_bits__11, id=128, pos=[(0,3388,33)]) invoke.146: bits[1] = invoke(x, to_apply=__apfloat__is_inf__11_52, id=146, pos=[(0,3402,28)]) invoke.147: bits[1] = invoke(y, to_apply=__apfloat__is_inf__11_52, id=147, pos=[(0,3402,62)]) result_exp__1: bits[12] = sel(is_subnormal, cases=[result_exp, literal.124], id=125, pos=[(0,3384,21)]) zero_ext.133: bits[12] = zero_ext(high_exp, new_bit_count=12, id=133) zero_ext.129: bits[12] = zero_ext(high_exp, new_bit_count=12, id=129) result_fraction: bits[52] = bit_slice(fraction__7, start=0, width=52, id=123) literal.126: bits[52] = literal(value=0, id=126, pos=[(0,3385,44)]) invoke.143: bits[1] = invoke(x, to_apply=__apfloat__is_nan__11_52, id=143, pos=[(0,3401,28)]) invoke.144: bits[1] = invoke(y, to_apply=__apfloat__is_nan__11_52, id=144, pos=[(0,3401,62)]) has_inf_arg: bits[1] = or(invoke.146, invoke.147, id=148, pos=[(0,3402,28)]) invoke.137: bits[1] = invoke(x, to_apply=__apfloat__is_inf__11_52, id=137, pos=[(0,3395,31)]) invoke.138: bits[1] = invoke(y, to_apply=__apfloat__is_inf__11_52, id=138, pos=[(0,3395,65)]) ult.134: bits[1] = ult(result_exp__1, zero_ext.133, id=134, pos=[(0,3392,11)]) bit_slice.135: bits[11] = bit_slice(result_exp__1, start=0, width=11, id=135) ult.130: bits[1] = ult(result_exp__1, zero_ext.129, id=130, pos=[(0,3390,11)]) literal.131: bits[52] = literal(value=0, id=131, pos=[(0,3390,78)]) result_fraction__1: bits[52] = sel(is_subnormal, cases=[result_fraction, literal.126], id=127, pos=[(0,3385,26)]) zero_ext.153: bits[52] = zero_ext(FRACTION_SZ, new_bit_count=52, id=153) literal.154: bits[52] = literal(value=1, id=154, pos=[(0,3405,78)]) has_nan_arg: bits[1] = or(invoke.143, invoke.144, id=145, pos=[(0,3401,28)]) and.149: bits[1] = and(has_0_arg, has_inf_arg, id=149, pos=[(0,3403,40)]) x_sign: bits[1] = tuple_index(x, index=0, id=119, pos=[(0,3378,23)]) y_sign: bits[1] = tuple_index(y, index=0, id=120, pos=[(0,3378,33)]) is_operand_inf: bits[1] = or(invoke.137, invoke.138, id=139, pos=[(0,3395,31)]) result_exp__2: bits[11] = sel(ult.134, cases=[high_exp, bit_slice.135], id=136, pos=[(0,3392,8)]) result_fraction__2: bits[52] = sel(ult.130, cases=[literal.131, result_fraction__1], id=132, pos=[(0,3390,8)]) literal.141: bits[52] = literal(value=0, id=141, pos=[(0,3397,46)]) literal.152: bits[52] = literal(value=1, id=152, pos=[(0,3405,23)]) sub.155: bits[52] = sub(zero_ext.153, literal.154, id=155, pos=[(0,3405,45)]) EXP_SZ: bits[32] = literal(value=11, id=32, pos=[(0,3268,11)]) literal.34: bits[32] = literal(value=1, id=34, pos=[(0,3272,35)]) is_result_nan: bits[1] = or(has_nan_arg, and.149, id=150, pos=[(0,3403,24)]) result_sign: bits[1] = ne(x_sign, y_sign, id=121, pos=[(0,3378,23)]) literal.158: bits[1] = literal(value=0, id=158, pos=[(0,3407,41)]) result_exp__3: bits[11] = sel(is_operand_inf, cases=[result_exp__2, high_exp], id=140, pos=[(0,3396,21)]) result_fraction__3: bits[52] = sel(is_operand_inf, cases=[result_fraction__2, literal.141], id=142, pos=[(0,3397,26)]) nan_fraction: bits[52] = shll(literal.152, sub.155, id=156, pos=[(0,3405,23)]) WIDE_EXP: bits[32] = add(EXP_SZ, literal.34, id=35, pos=[(0,3272,26)]) literal.36: bits[32] = literal(value=1, id=36, pos=[(0,3274,39)]) literal.38: bits[32] = literal(value=1, id=38, pos=[(0,3278,49)]) add.40: bits[32] = add(FRACTION_SZ, FRACTION_SZ, id=40, pos=[(0,3282,31)]) literal.41: bits[32] = literal(value=2, id=41, pos=[(0,3282,59)]) literal.43: bits[32] = literal(value=1, id=43, pos=[(0,3284,53)]) literal.45: bits[32] = literal(value=1, id=45, pos=[(0,3288,47)]) result_sign__1: bits[1] = sel(is_result_nan, cases=[result_sign, literal.158], id=159, pos=[(0,3407,22)]) result_exp__4: bits[11] = sel(is_result_nan, cases=[result_exp__3, high_exp], id=151, pos=[(0,3404,21)]) result_fraction__4: bits[52] = sel(is_result_nan, cases=[result_fraction__3, nan_fraction], id=157, pos=[(0,3406,26)]) SIGNED_EXP: bits[32] = add(WIDE_EXP, literal.36, id=37, pos=[(0,3274,28)]) ROUNDING_FRACTION: bits[32] = add(FRACTION_SZ, literal.38, id=39, pos=[(0,3278,35)]) WIDE_FRACTION: bits[32] = add(add.40, literal.41, id=42, pos=[(0,3282,31)]) FRACTION_ROUNDING_BIT: bits[32] = sub(FRACTION_SZ, literal.43, id=44, pos=[(0,3284,39)]) STICKY_FRACTION: bits[32] = add(FRACTION_SZ, literal.45, id=46, pos=[(0,3288,33)]) ret tuple.160: (bits[1], bits[11], bits[52]) = tuple(result_sign__1, result_exp__4, result_fraction__4, id=160, pos=[(0,3409,33)]) } top fn __float64__mul(x: (bits[1], bits[11], bits[52]) id=161, y: (bits[1], bits[11], bits[52]) id=162) -> (bits[1], bits[11], bits[52]) { ret invoke.163: (bits[1], bits[11], bits[52]) = invoke(x, y, to_apply=__apfloat__mul__11_52, id=163, pos=[(2,170,48)]) }