package hfloat16 file_number 0 "/inputs/subtree/xls/dslx/stdlib/std.x" file_number 1 "/inputs/subtree/xls/dslx/stdlib/apfloat.x" file_number 2 "/inputs/subtree/xls/dslx/stdlib/hfloat16.x" fn __std__mask_bits__8() -> bits[8] { literal.2: bits[8] = literal(value=0, id=2, pos=[(0,835,41)]) X: bits[32] = literal(value=8, id=1, pos=[(0,835,17)]) ret not.3: bits[8] = not(literal.2, id=3, pos=[(0,835,40)]) } fn __apfloat__tag__8_23(input_float: (bits[1], bits[8], bits[23]) id=4) -> bits[3] { input_float_bexp: bits[8] = tuple_index(input_float, index=1, id=8, pos=[(1,40,22)]) input_float_fraction: bits[23] = tuple_index(input_float, index=2, id=9, pos=[(1,40,40)]) tuple.10: (bits[8], bits[23]) = tuple(input_float_bexp, input_float_fraction, id=10, pos=[(1,40,10)]) EXPR_MASK: bits[8] = invoke(to_apply=__std__mask_bits__8, id=7, pos=[(1,39,36)]) tuple_index.40: bits[8] = tuple_index(tuple.10, index=0, id=40) tuple_index.31: bits[8] = tuple_index(tuple.10, index=0, id=31) literal.23: bits[8] = literal(value=0, id=23, pos=[(1,42,9)]) tuple_index.22: bits[8] = tuple_index(tuple.10, index=0, id=22) literal.13: bits[8] = literal(value=0, id=13, pos=[(1,41,9)]) tuple_index.12: bits[8] = tuple_index(tuple.10, index=0, id=12) literal.39: bits[1] = literal(value=1, id=39) eq.41: bits[1] = eq(EXPR_MASK, tuple_index.40, id=41) literal.30: bits[1] = literal(value=1, id=30) eq.32: bits[1] = eq(EXPR_MASK, tuple_index.31, id=32) literal.35: bits[23] = literal(value=0, id=35, pos=[(1,43,20)]) tuple_index.34: bits[23] = tuple_index(tuple.10, index=1, id=34) literal.21: bits[1] = literal(value=1, id=21) eq.24: bits[1] = eq(literal.23, tuple_index.22, id=24) literal.11: bits[1] = literal(value=1, id=11) eq.14: bits[1] = eq(literal.13, tuple_index.12, id=14) literal.17: bits[23] = literal(value=0, id=17, pos=[(1,41,23)]) tuple_index.16: bits[23] = tuple_index(tuple.10, index=1, id=16) and.42: bits[1] = and(literal.39, eq.41, id=42) literal.44: bits[1] = literal(value=1, id=44, pos=[(1,44,20)]) and.33: bits[1] = and(literal.30, eq.32, id=33) eq.36: bits[1] = eq(literal.35, tuple_index.34, id=36) and.25: bits[1] = and(literal.21, eq.24, id=25) literal.27: bits[1] = literal(value=1, id=27, pos=[(1,42,23)]) and.15: bits[1] = and(literal.11, eq.14, id=15) eq.18: bits[1] = eq(literal.17, tuple_index.16, id=18) literal.47: bits[1] = literal(value=1, id=47) literal.49: bits[1] = literal(value=1, id=49, pos=[(1,45,9)]) and.45: bits[1] = and(and.42, literal.44, id=45) and.37: bits[1] = and(and.33, eq.36, id=37) and.28: bits[1] = and(and.25, literal.27, id=28) and.19: bits[1] = and(and.15, eq.18, id=19) and.50: bits[1] = and(literal.47, literal.49, id=50) literal.52: bits[1] = literal(value=1, id=52, pos=[(1,45,12)]) concat.55: bits[4] = concat(and.45, and.37, and.28, and.19, id=55) literal.20: bits[3] = literal(value=3, id=20, pos=[(1,41,45)]) literal.29: bits[3] = literal(value=2, id=29, pos=[(1,42,29)]) literal.38: bits[3] = literal(value=1, id=38, pos=[(1,43,42)]) literal.46: bits[3] = literal(value=0, id=46, pos=[(1,44,26)]) literal.54: bits[3] = literal(value=4, id=54, pos=[(1,45,18)]) EXP_SZ: bits[32] = literal(value=8, id=5, pos=[(1,38,11)]) FRACTION_SZ: bits[32] = literal(value=23, id=6, pos=[(1,38,24)]) tuple_index.26: bits[23] = tuple_index(tuple.10, index=1, id=26) tuple_index.43: bits[23] = tuple_index(tuple.10, index=1, id=43) tuple_index.48: bits[8] = tuple_index(tuple.10, index=0, id=48) tuple_index.51: bits[23] = tuple_index(tuple.10, index=1, id=51) and.53: bits[1] = and(and.50, literal.52, id=53) ret priority_sel.56: bits[3] = priority_sel(concat.55, cases=[literal.20, literal.29, literal.38, literal.46], default=literal.54, id=56) } fn __std__mask_bits__5() -> bits[5] { literal.58: bits[5] = literal(value=0, id=58, pos=[(0,835,41)]) X: bits[32] = literal(value=5, id=57, pos=[(0,835,17)]) ret not.59: bits[5] = not(literal.58, id=59, pos=[(0,835,40)]) } fn __apfloat__qnan__5_10() -> (bits[1], bits[5], bits[10]) { FRACTION_SZ: bits[32] = literal(value=10, id=61, pos=[(1,50,25)]) literal.66: bits[32] = literal(value=1, id=66, pos=[(1,54,57)]) sub.67: bits[32] = sub(FRACTION_SZ, literal.66, id=67, pos=[(1,54,43)]) invoke.63: bits[5] = invoke(to_apply=__std__mask_bits__5, id=63, pos=[(1,53,28)]) literal.65: bits[10] = literal(value=1, id=65, pos=[(1,54,18)]) bit_slice.68: bits[10] = bit_slice(sub.67, start=0, width=10, id=68) literal.62: bits[1] = literal(value=0, id=62, pos=[(1,52,14)]) zero_ext.64: bits[5] = zero_ext(invoke.63, new_bit_count=5, id=64) shll.69: bits[10] = shll(literal.65, bit_slice.68, id=69, pos=[(1,54,18)]) EXP_SZ: bits[32] = literal(value=5, id=60, pos=[(1,50,12)]) ret tuple.70: (bits[1], bits[5], bits[10]) = tuple(literal.62, zero_ext.64, shll.69, id=70, pos=[(1,51,33)]) } fn __apfloat__inf__5_10(sign: bits[1] id=71) -> (bits[1], bits[5], bits[10]) { invoke.74: bits[5] = invoke(to_apply=__std__mask_bits__5, id=74, pos=[(1,78,28)]) literal.75: bits[10] = literal(value=0, id=75, pos=[(1,79,18)]) EXP_SZ: bits[32] = literal(value=5, id=72, pos=[(1,75,11)]) FRACTION_SZ: bits[32] = literal(value=10, id=73, pos=[(1,75,24)]) ret tuple.76: (bits[1], bits[5], bits[10]) = tuple(sign, invoke.74, literal.75, id=76, pos=[(1,76,33)]) } fn __apfloat__zero__5_10(sign: bits[1] id=77) -> (bits[1], bits[5], bits[10]) { literal.80: bits[5] = literal(value=0, id=80, pos=[(1,131,47)]) literal.81: bits[10] = literal(value=0, id=81, pos=[(1,131,73)]) EXP_SZ: bits[32] = literal(value=5, id=78, pos=[(1,130,12)]) FRACTION_SZ: bits[32] = literal(value=10, id=79, pos=[(1,130,25)]) ret tuple.82: (bits[1], bits[5], bits[10]) = tuple(sign, literal.80, literal.81, id=82, pos=[(1,131,33)]) } fn __std__keep_lsbs__32_23(x: bits[23] id=83, n: bits[32] id=84) -> bits[23] { literal.87: bits[23] = literal(value=8388607, id=87, pos=[(0,1406,19)]) shll.88: bits[23] = shll(literal.87, n, id=88, pos=[(0,1406,19)]) not.89: bits[23] = not(shll.88, id=89, pos=[(0,1406,8)]) WIDTH: bits[32] = literal(value=23, id=85, pos=[(0,1405,17)]) N_WIDTH: bits[32] = literal(value=32, id=86, pos=[(0,1405,29)]) ret and.90: bits[23] = and(x, not.89, id=90, pos=[(0,1406,4)]) } fn __std__or_reduce_lsb_impl__1_32_23(value: bits[23] id=91, n: bits[32] id=92) -> bits[1] { WIDTH: bits[32] = literal(value=23, id=94, pos=[(0,1492,42)]) zero_ext.99: bits[32] = zero_ext(WIDTH, new_bit_count=32, id=99) sub.100: bits[32] = sub(zero_ext.99, n, id=100, pos=[(0,1499,18)]) shll.101: bits[23] = shll(value, sub.100, id=101, pos=[(0,1499,8)]) literal.102: bits[23] = literal(value=0, id=102, pos=[(0,1499,47)]) invoke.96: bits[23] = invoke(value, n, to_apply=__std__keep_lsbs__32_23, id=96, pos=[(0,1496,17)]) literal.97: bits[23] = literal(value=0, id=97, pos=[(0,1496,31)]) DO_MASK_IMPL: bits[1] = literal(value=1, id=93, pos=[(0,1492,22)]) ne.103: bits[1] = ne(shll.101, literal.102, id=103, pos=[(0,1499,8)]) ne.98: bits[1] = ne(invoke.96, literal.97, id=98, pos=[(0,1496,17)]) N_WIDTH: bits[32] = literal(value=32, id=95, pos=[(0,1492,54)]) ret sel.104: bits[1] = sel(DO_MASK_IMPL, cases=[ne.103, ne.98], id=104, pos=[(0,1494,4)]) } fn __std__or_reduce_lsb__32_23(value: bits[23] id=105, n: bits[32] id=106) -> bits[1] { WIDTH: bits[32] = literal(value=23, id=107, pos=[(0,1522,21)]) N_WIDTH: bits[32] = literal(value=32, id=108, pos=[(0,1522,33)]) ret invoke.109: bits[1] = invoke(value, n, to_apply=__std__or_reduce_lsb_impl__1_32_23, id=109, pos=[(0,1523,22)]) } fn __itok__apfloat__does_lsb_round_up__23(__token: token id=110, __activated: bits[1] id=111, lsb_index: bits[32] id=112, fraction: bits[23] id=113, round_style: bits[1] id=114) -> (token, bits[1]) { FRACTION_SZ: bits[32] = literal(value=23, id=115, pos=[(1,402,21)]) literal.130: bits[32] = literal(value=1, id=130, pos=[(1,414,41)]) literal.138: bits[32] = literal(value=1, id=138, pos=[(1,421,66)]) literal.116: bits[32] = literal(value=1, id=116, pos=[(1,411,25)]) zero_ext.123: bits[32] = zero_ext(FRACTION_SZ, new_bit_count=32, id=123) first_lost_bit_idx: bits[32] = sub(lsb_index, literal.130, id=131, pos=[(1,414,29)]) sub.139: bits[32] = sub(lsb_index, literal.138, id=139, pos=[(1,421,54)]) ult.135: bits[1] = ult(lsb_index, FRACTION_SZ, id=135, pos=[(1,419,22)]) dynamic_bit_slice.136: bits[1] = dynamic_bit_slice(fraction, lsb_index, width=1, id=136, pos=[(1,419,57)]) not.119: bits[1] = not(__activated, id=119) uge.117: bits[1] = uge(lsb_index, literal.116, id=117, pos=[(1,411,12)]) not.126: bits[1] = not(__activated, id=126) ule.124: bits[1] = ule(lsb_index, zero_ext.123, id=124, pos=[(1,412,12)]) literal.133: bits[1] = literal(value=0, id=133, pos=[(1,417,8)]) round_bit: bits[1] = dynamic_bit_slice(fraction, first_lost_bit_idx, width=1, id=132, pos=[(1,415,28)]) sticky: bits[1] = invoke(fraction, sub.139, to_apply=__std__or_reduce_lsb__32_23, id=140, pos=[(1,421,43)]) lsb: bits[1] = and(ult.135, dynamic_bit_slice.136, id=137, pos=[(1,419,22)]) or.120: bits[1] = or(not.119, uge.117, id=120) or.127: bits[1] = or(not.126, ule.124, id=127) eq.134: bits[1] = eq(literal.133, round_style, id=134) and.141: bits[1] = and(round_bit, sticky, id=141, pos=[(1,428,13)]) and.142: bits[1] = and(round_bit, lsb, id=142, pos=[(1,428,38)]) assert.121: token = assert(__token, or.120, message="Assertion failure via assert! @ /inputs/subtree/xls/dslx/stdlib/apfloat.x:412:12-412:65", label="apfloat_round_without_residue", id=121) assert.128: token = assert(__token, or.127, message="Assertion failure via assert! @ /inputs/subtree/xls/dslx/stdlib/apfloat.x:413:12-413:74", label="apfloat_round_without_lsb", id=128) concat.146: bits[1] = concat(eq.134, id=146) or.143: bits[1] = or(and.141, and.142, id=143, pos=[(1,428,13)]) literal.144: bits[1] = literal(value=1, id=144, pos=[(1,430,8)]) after_all.148: token = after_all(assert.121, assert.128, id=148) priority_sel.147: bits[1] = priority_sel(concat.146, cases=[or.143], default=round_bit, id=147) literal.118: bits[8][29] = literal(value=[97, 112, 102, 108, 111, 97, 116, 95, 114, 111, 117, 110, 100, 95, 119, 105, 116, 104, 111, 117, 116, 95, 114, 101, 115, 105, 100, 117, 101], id=118, pos=[(1,411,32)]) tuple.122: () = tuple(id=122) literal.125: bits[8][25] = literal(value=[97, 112, 102, 108, 111, 97, 116, 95, 114, 111, 117, 110, 100, 95, 119, 105, 116, 104, 111, 117, 116, 95, 108, 115, 98], id=125, pos=[(1,412,45)]) tuple.129: () = tuple(id=129) eq.145: bits[1] = eq(literal.144, round_style, id=145) ret tuple.149: (token, bits[1]) = tuple(after_all.148, priority_sel.147, id=149) } fn __itok__apfloat__downcast_fractional__8_23_10(__token: token id=150, __activated: bits[1] id=151, f: (bits[1], bits[8], bits[23]) id=152, round_style: bits[1] id=153) -> (token, (bits[1], bits[8], bits[10])) { FROM_FRACTION_SZ: bits[32] = literal(value=23, id=155, pos=[(1,1105,44)]) TO_FRACTION_SZ: bits[32] = literal(value=10, id=154, pos=[(1,1105,23)]) lsb_index: bits[32] = sub(FROM_FRACTION_SZ, TO_FRACTION_SZ, id=157, pos=[(1,1110,20)]) f_fraction__1: bits[23] = tuple_index(f, index=2, id=160, pos=[(1,1113,49)]) f_fraction: bits[23] = tuple_index(f, index=2, id=158, pos=[(1,1111,30)]) invoke.161: (token, bits[1]) = invoke(__token, __activated, lsb_index, f_fraction__1, round_style, to_apply=__itok__apfloat__does_lsb_round_up__23, id=161, pos=[(1,1113,36)]) truncated_fraction: bits[10] = bit_slice(f_fraction, start=13, width=10, id=159, pos=[(1,1111,39)]) round_up: bits[1] = tuple_index(invoke.161, index=1, id=163) and_reduce.164: bits[1] = and_reduce(truncated_fraction, id=164, pos=[(1,1115,44)]) f_bexp: bits[8] = tuple_index(f, index=1, id=167, pos=[(1,1122,32)]) literal.168: bits[8] = literal(value=1, id=168, pos=[(1,1122,40)]) literal.172: bits[10] = literal(value=1, id=172, pos=[(1,1124,33)]) renormalize: bits[1] = and(round_up, and_reduce.164, id=165, pos=[(1,1115,22)]) f_bexp__1: bits[8] = tuple_index(f, index=1, id=170, pos=[(1,1122,63)]) add.169: bits[8] = add(f_bexp, literal.168, id=169, pos=[(1,1122,32)]) add.173: bits[10] = add(truncated_fraction, literal.172, id=173, pos=[(1,1124,12)]) tuple_index.162: token = tuple_index(invoke.161, index=0, id=162) f_sign: bits[1] = tuple_index(f, index=0, id=166, pos=[(1,1121,15)]) sel.171: bits[8] = sel(renormalize, cases=[f_bexp__1, add.169], id=171, pos=[(1,1122,14)]) sel.174: bits[10] = sel(round_up, cases=[truncated_fraction, add.173], id=174, pos=[(1,1123,18)]) after_all.176: token = after_all(tuple_index.162, id=176) tuple.175: (bits[1], bits[8], bits[10]) = tuple(f_sign, sel.171, sel.174, id=175, pos=[(1,1120,12)]) EXP_SZ: bits[32] = literal(value=8, id=156, pos=[(1,1105,67)]) ret tuple.177: (token, (bits[1], bits[8], bits[10])) = tuple(after_all.176, tuple.175, id=177) } fn __std__unsigned_max_value__8_9() -> bits[8] { literal.180: bits[9] = literal(value=1, id=180, pos=[(0,81,6)]) N: bits[32] = literal(value=8, id=178, pos=[(0,80,26)]) shll.181: bits[9] = shll(literal.180, N, id=181, pos=[(0,81,6)]) literal.182: bits[9] = literal(value=1, id=182, pos=[(0,81,31)]) sub.183: bits[9] = sub(shll.181, literal.182, id=183, pos=[(0,81,6)]) N_PLUS_ONE: bits[32] = literal(value=9, id=179, pos=[(0,80,34)]) ret bit_slice.184: bits[8] = bit_slice(sub.183, start=0, width=8, id=184) } fn __std__signed_max_value__5_4() -> bits[5] { literal.187: bits[5] = literal(value=1, id=187, pos=[(0,47,6)]) N_MINUS_ONE: bits[32] = literal(value=4, id=186, pos=[(0,46,32)]) shll.188: bits[5] = shll(literal.187, N_MINUS_ONE, id=188, pos=[(0,47,6)]) literal.189: bits[5] = literal(value=1, id=189, pos=[(0,47,32)]) sub.190: bits[5] = sub(shll.188, literal.189, id=190, pos=[(0,47,6)]) N: bits[32] = literal(value=5, id=185, pos=[(0,46,24)]) ret sign_ext.191: bits[5] = sign_ext(sub.190, new_bit_count=5, id=191) } fn __std__signed_max_value__8_7() -> bits[8] { literal.194: bits[8] = literal(value=1, id=194, pos=[(0,47,6)]) N_MINUS_ONE: bits[32] = literal(value=7, id=193, pos=[(0,46,32)]) shll.195: bits[8] = shll(literal.194, N_MINUS_ONE, id=195, pos=[(0,47,6)]) literal.196: bits[8] = literal(value=1, id=196, pos=[(0,47,32)]) sub.197: bits[8] = sub(shll.195, literal.196, id=197, pos=[(0,47,6)]) N: bits[32] = literal(value=8, id=192, pos=[(0,46,24)]) ret sign_ext.198: bits[8] = sign_ext(sub.197, new_bit_count=8, id=198) } fn __apfloat__exponent_bias__8_10(f: (bits[1], bits[8], bits[10]) id=199) -> bits[8] { invoke.202: bits[8] = invoke(to_apply=__std__signed_max_value__8_7, id=202, pos=[(1,221,25)]) EXP_SZ: bits[32] = literal(value=8, id=200, pos=[(1,220,21)]) FRACTION_SZ: bits[32] = literal(value=10, id=201, pos=[(1,220,34)]) ret sign_ext.203: bits[8] = sign_ext(invoke.202, new_bit_count=8, id=203) } fn __apfloat__unbiased_exponent__8_10(f: (bits[1], bits[8], bits[10]) id=204) -> bits[8] { f_bexp: bits[8] = tuple_index(f, index=1, id=208, pos=[(1,266,6)]) zero_ext.209: bits[8] = zero_ext(f_bexp, new_bit_count=8, id=209) bias: bits[8] = invoke(f, to_apply=__apfloat__exponent_bias__8_10, id=207, pos=[(1,265,28)]) EXP_SZ: bits[32] = literal(value=8, id=205, pos=[(1,263,25)]) FRACTION_SZ: bits[32] = literal(value=10, id=206, pos=[(1,263,38)]) ret sub.210: bits[8] = sub(zero_ext.209, bias, id=210, pos=[(1,266,6)]) } fn __apfloat__exponent_bias__8_23(f: (bits[1], bits[8], bits[23]) id=211) -> bits[8] { invoke.214: bits[8] = invoke(to_apply=__std__signed_max_value__8_7, id=214, pos=[(1,221,25)]) EXP_SZ: bits[32] = literal(value=8, id=212, pos=[(1,220,21)]) FRACTION_SZ: bits[32] = literal(value=23, id=213, pos=[(1,220,34)]) ret sign_ext.215: bits[8] = sign_ext(invoke.214, new_bit_count=8, id=215) } fn __apfloat__unbiased_exponent__8_23(f: (bits[1], bits[8], bits[23]) id=216) -> bits[8] { f_bexp: bits[8] = tuple_index(f, index=1, id=220, pos=[(1,266,6)]) zero_ext.221: bits[8] = zero_ext(f_bexp, new_bit_count=8, id=221) bias: bits[8] = invoke(f, to_apply=__apfloat__exponent_bias__8_23, id=219, pos=[(1,265,28)]) EXP_SZ: bits[32] = literal(value=8, id=217, pos=[(1,263,25)]) FRACTION_SZ: bits[32] = literal(value=23, id=218, pos=[(1,263,38)]) ret sub.222: bits[8] = sub(zero_ext.221, bias, id=222, pos=[(1,266,6)]) } fn __apfloat__min_normal_exp__5() -> bits[5] { EXP_SZ: bits[32] = literal(value=5, id=223, pos=[(1,207,22)]) literal.225: bits[32] = literal(value=1, id=225, pos=[(1,208,59)]) literal.224: bits[5] = literal(value=1, id=224, pos=[(1,208,33)]) sub.226: bits[32] = sub(EXP_SZ, literal.225, id=226, pos=[(1,208,50)]) shll.227: bits[5] = shll(literal.224, sub.226, id=227, pos=[(1,208,33)]) literal.228: bits[5] = literal(value=2, id=228, pos=[(1,208,69)]) sub.229: bits[5] = sub(shll.227, literal.228, id=229, pos=[(1,208,33)]) minus_min_normal_exp: bits[5] = zero_ext(sub.229, new_bit_count=5, id=230) ret neg.231: bits[5] = neg(minus_min_normal_exp, id=231, pos=[(1,209,4)]) } fn __std__keep_lsbs__32_24(x: bits[24] id=232, n: bits[32] id=233) -> bits[24] { literal.236: bits[24] = literal(value=16777215, id=236, pos=[(0,1406,19)]) shll.237: bits[24] = shll(literal.236, n, id=237, pos=[(0,1406,19)]) not.238: bits[24] = not(shll.237, id=238, pos=[(0,1406,8)]) WIDTH: bits[32] = literal(value=24, id=234, pos=[(0,1405,17)]) N_WIDTH: bits[32] = literal(value=32, id=235, pos=[(0,1405,29)]) ret and.239: bits[24] = and(x, not.238, id=239, pos=[(0,1406,4)]) } fn __std__or_reduce_lsb_impl__1_32_24(value: bits[24] id=240, n: bits[32] id=241) -> bits[1] { WIDTH: bits[32] = literal(value=24, id=243, pos=[(0,1492,42)]) zero_ext.248: bits[32] = zero_ext(WIDTH, new_bit_count=32, id=248) sub.249: bits[32] = sub(zero_ext.248, n, id=249, pos=[(0,1499,18)]) shll.250: bits[24] = shll(value, sub.249, id=250, pos=[(0,1499,8)]) literal.251: bits[24] = literal(value=0, id=251, pos=[(0,1499,47)]) invoke.245: bits[24] = invoke(value, n, to_apply=__std__keep_lsbs__32_24, id=245, pos=[(0,1496,17)]) literal.246: bits[24] = literal(value=0, id=246, pos=[(0,1496,31)]) DO_MASK_IMPL: bits[1] = literal(value=1, id=242, pos=[(0,1492,22)]) ne.252: bits[1] = ne(shll.250, literal.251, id=252, pos=[(0,1499,8)]) ne.247: bits[1] = ne(invoke.245, literal.246, id=247, pos=[(0,1496,17)]) N_WIDTH: bits[32] = literal(value=32, id=244, pos=[(0,1492,54)]) ret sel.253: bits[1] = sel(DO_MASK_IMPL, cases=[ne.252, ne.247], id=253, pos=[(0,1494,4)]) } fn __std__or_reduce_lsb__32_24(value: bits[24] id=254, n: bits[32] id=255) -> bits[1] { WIDTH: bits[32] = literal(value=24, id=256, pos=[(0,1522,21)]) N_WIDTH: bits[32] = literal(value=32, id=257, pos=[(0,1522,33)]) ret invoke.258: bits[1] = invoke(value, n, to_apply=__std__or_reduce_lsb_impl__1_32_24, id=258, pos=[(0,1523,22)]) } fn __itok__apfloat__does_lsb_round_up__24(__token: token id=259, __activated: bits[1] id=260, lsb_index: bits[32] id=261, fraction: bits[24] id=262, round_style: bits[1] id=263) -> (token, bits[1]) { FRACTION_SZ: bits[32] = literal(value=24, id=264, pos=[(1,402,21)]) literal.279: bits[32] = literal(value=1, id=279, pos=[(1,414,41)]) literal.287: bits[32] = literal(value=1, id=287, pos=[(1,421,66)]) literal.265: bits[32] = literal(value=1, id=265, pos=[(1,411,25)]) zero_ext.272: bits[32] = zero_ext(FRACTION_SZ, new_bit_count=32, id=272) first_lost_bit_idx: bits[32] = sub(lsb_index, literal.279, id=280, pos=[(1,414,29)]) sub.288: bits[32] = sub(lsb_index, literal.287, id=288, pos=[(1,421,54)]) ult.284: bits[1] = ult(lsb_index, FRACTION_SZ, id=284, pos=[(1,419,22)]) dynamic_bit_slice.285: bits[1] = dynamic_bit_slice(fraction, lsb_index, width=1, id=285, pos=[(1,419,57)]) not.268: bits[1] = not(__activated, id=268) uge.266: bits[1] = uge(lsb_index, literal.265, id=266, pos=[(1,411,12)]) not.275: bits[1] = not(__activated, id=275) ule.273: bits[1] = ule(lsb_index, zero_ext.272, id=273, pos=[(1,412,12)]) literal.282: bits[1] = literal(value=0, id=282, pos=[(1,417,8)]) round_bit: bits[1] = dynamic_bit_slice(fraction, first_lost_bit_idx, width=1, id=281, pos=[(1,415,28)]) sticky: bits[1] = invoke(fraction, sub.288, to_apply=__std__or_reduce_lsb__32_24, id=289, pos=[(1,421,43)]) lsb: bits[1] = and(ult.284, dynamic_bit_slice.285, id=286, pos=[(1,419,22)]) or.269: bits[1] = or(not.268, uge.266, id=269) or.276: bits[1] = or(not.275, ule.273, id=276) eq.283: bits[1] = eq(literal.282, round_style, id=283) and.290: bits[1] = and(round_bit, sticky, id=290, pos=[(1,428,13)]) and.291: bits[1] = and(round_bit, lsb, id=291, pos=[(1,428,38)]) assert.270: token = assert(__token, or.269, message="Assertion failure via assert! @ /inputs/subtree/xls/dslx/stdlib/apfloat.x:412:12-412:65", label="apfloat_round_without_residue", id=270) assert.277: token = assert(__token, or.276, message="Assertion failure via assert! @ /inputs/subtree/xls/dslx/stdlib/apfloat.x:413:12-413:74", label="apfloat_round_without_lsb", id=277) concat.295: bits[1] = concat(eq.283, id=295) or.292: bits[1] = or(and.290, and.291, id=292, pos=[(1,428,13)]) literal.293: bits[1] = literal(value=1, id=293, pos=[(1,430,8)]) after_all.297: token = after_all(assert.270, assert.277, id=297) priority_sel.296: bits[1] = priority_sel(concat.295, cases=[or.292], default=round_bit, id=296) literal.267: bits[8][29] = literal(value=[97, 112, 102, 108, 111, 97, 116, 95, 114, 111, 117, 110, 100, 95, 119, 105, 116, 104, 111, 117, 116, 95, 114, 101, 115, 105, 100, 117, 101], id=267, pos=[(1,411,32)]) tuple.271: () = tuple(id=271) literal.274: bits[8][25] = literal(value=[97, 112, 102, 108, 111, 97, 116, 95, 114, 111, 117, 110, 100, 95, 119, 105, 116, 104, 111, 117, 116, 95, 108, 115, 98], id=274, pos=[(1,412,45)]) tuple.278: () = tuple(id=278) eq.294: bits[1] = eq(literal.293, round_style, id=294) ret tuple.298: (token, bits[1]) = tuple(after_all.297, priority_sel.296, id=298) } fn __itok__apfloat__downcast_to_subnormal__8_23_5_10(__token: token id=299, __activated: bits[1] id=300, f: (bits[1], bits[8], bits[23]) id=301, round_style: bits[1] id=302) -> (token, (bits[1], bits[5], bits[10])) { invoke.307: bits[5] = invoke(to_apply=__std__signed_max_value__5_4, id=307, pos=[(1,1310,41)]) TO_BIAS: bits[8] = sign_ext(invoke.307, new_bit_count=8, id=308) uexp: bits[8] = invoke(f, to_apply=__apfloat__unbiased_exponent__8_23, id=309, pos=[(1,1311,32)]) add.318: bits[8] = add(TO_BIAS, uexp, id=318, pos=[(1,1320,28)]) neg.319: bits[8] = neg(add.318, id=319, pos=[(1,1320,26)]) sign_ext.320: bits[32] = sign_ext(neg.319, new_bit_count=32, id=320) literal.321: bits[32] = literal(value=1, id=321, pos=[(1,1320,53)]) TO_FRACTION_SZ: bits[32] = literal(value=10, id=303, pos=[(1,1307,5)]) literal.323: bits[32] = literal(value=1, id=323, pos=[(1,1321,43)]) right_shift_cnt: bits[32] = add(sign_ext.320, literal.321, id=322, pos=[(1,1320,26)]) add.324: bits[32] = add(TO_FRACTION_SZ, literal.323, id=324, pos=[(1,1321,26)]) FROM_FRACTION_SZ: bits[32] = literal(value=23, id=305, pos=[(1,1307,42)]) ugt.325: bits[1] = ugt(right_shift_cnt, add.324, id=325, pos=[(1,1321,7)]) f_fraction: bits[23] = tuple_index(f, index=2, id=329, pos=[(1,1327,30)]) SMALL_FRAC_OFF: bits[32] = sub(FROM_FRACTION_SZ, TO_FRACTION_SZ, id=328, pos=[(1,1325,31)]) not.339: bits[1] = not(ugt.325, id=339) zero_ext.334: bits[32] = zero_ext(right_shift_cnt, new_bit_count=32, id=334) literal.336: bits[1] = literal(value=1, id=336, pos=[(1,1334,53)]) f_fraction__1: bits[23] = tuple_index(f, index=2, id=337, pos=[(1,1334,62)]) literal.331: bits[1] = literal(value=1, id=331, pos=[(1,1329,24)]) truncated_frac: bits[10] = dynamic_bit_slice(f_fraction, SMALL_FRAC_OFF, width=10, id=330, pos=[(1,1327,39)]) and.340: bits[1] = and(__activated, not.339, id=340) add.335: bits[32] = add(zero_ext.334, SMALL_FRAC_OFF, id=335, pos=[(1,1334,12)]) concat.338: bits[24] = concat(literal.336, f_fraction__1, id=338, pos=[(1,1334,53)]) full_frac: bits[11] = concat(literal.331, truncated_frac, id=332, pos=[(1,1329,24)]) invoke.341: (token, bits[1]) = invoke(__token, and.340, add.335, concat.338, round_style, to_apply=__itok__apfloat__does_lsb_round_up__24, id=341, pos=[(1,1333,40)]) unrounded_subnormal_frac: bits[10] = dynamic_bit_slice(full_frac, right_shift_cnt, width=10, id=333, pos=[(1,1331,48)]) literal.344: bits[10] = literal(value=1, id=344, pos=[(1,1337,39)]) invoke.310: bits[5] = invoke(to_apply=__apfloat__min_normal_exp__5, id=310, pos=[(1,1314,30)]) round_up: bits[1] = tuple_index(invoke.341, index=1, id=343) add.345: bits[10] = add(unrounded_subnormal_frac, literal.344, id=345, pos=[(1,1337,12)]) sign_ext.311: bits[8] = sign_ext(invoke.310, new_bit_count=8, id=311) literal.347: bits[32] = literal(value=1, id=347, pos=[(1,1344,50)]) subnormal_frac: bits[10] = sel(round_up, cases=[unrounded_subnormal_frac, add.345], id=346, pos=[(1,1336,29)]) literal.349: bits[10] = literal(value=0, id=349, pos=[(1,1344,77)]) not.314: bits[1] = not(__activated, id=314) slt.312: bits[1] = slt(uexp, sign_ext.311, id=312, pos=[(1,1314,8)]) eq.348: bits[1] = eq(right_shift_cnt, literal.347, id=348, pos=[(1,1344,31)]) eq.350: bits[1] = eq(subnormal_frac, literal.349, id=350, pos=[(1,1344,59)]) f_sign__2: bits[1] = tuple_index(f, index=0, id=356, pos=[(1,1349,29)]) literal.357: bits[5] = literal(value=0, id=357, pos=[(1,1349,42)]) f_sign__1: bits[1] = tuple_index(f, index=0, id=352, pos=[(1,1347,29)]) literal.353: bits[5] = literal(value=1, id=353, pos=[(1,1347,42)]) literal.354: bits[10] = literal(value=0, id=354, pos=[(1,1347,69)]) or.315: bits[1] = or(not.314, slt.312, id=315) rounds_to_normal: bits[1] = and(eq.348, eq.350, id=351, pos=[(1,1344,31)]) tuple.358: (bits[1], bits[5], bits[10]) = tuple(f_sign__2, literal.357, subnormal_frac, id=358, pos=[(1,1349,20)]) tuple.355: (bits[1], bits[5], bits[10]) = tuple(f_sign__1, literal.353, literal.354, id=355, pos=[(1,1347,20)]) f_sign: bits[1] = tuple_index(f, index=0, id=326, pos=[(1,1323,41)]) assert.316: token = assert(__token, or.315, message="Assertion failure via assert! @ /inputs/subtree/xls/dslx/stdlib/apfloat.x:1314:12-1316:65", label="apfloat_downcast_to_subnormal_called_on_normal_number", id=316) tuple_index.342: token = tuple_index(invoke.341, index=0, id=342) sel.359: (bits[1], bits[5], bits[10]) = sel(rounds_to_normal, cases=[tuple.358, tuple.355], id=359, pos=[(1,1346,8)]) invoke.327: (bits[1], bits[5], bits[10]) = invoke(f_sign, to_apply=__apfloat__zero__5_10, id=327, pos=[(1,1323,12)]) after_all.361: token = after_all(assert.316, tuple_index.342, id=361) sel.360: (bits[1], bits[5], bits[10]) = sel(ugt.325, cases=[sel.359, invoke.327], id=360, pos=[(1,1321,4)]) TO_EXP_SZ: bits[32] = literal(value=5, id=304, pos=[(1,1307,26)]) FROM_EXP_SZ: bits[32] = literal(value=8, id=306, pos=[(1,1307,65)]) literal.313: bits[8][53] = literal(value=[97, 112, 102, 108, 111, 97, 116, 95, 100, 111, 119, 110, 99, 97, 115, 116, 95, 116, 111, 95, 115, 117, 98, 110, 111, 114, 109, 97, 108, 95, 99, 97, 108, 108, 101, 100, 95, 111, 110, 95, 110, 111, 114, 109, 97, 108, 95, 110, 117, 109, 98, 101, 114], id=313, pos=[(1,1315,8)]) tuple.317: () = tuple(id=317) ret tuple.362: (token, (bits[1], bits[5], bits[10])) = tuple(after_all.361, sel.360, id=362) } fn __apfloat__bias__5(unbiased_exponent: bits[5] id=363) -> bits[5] { BIAS: bits[5] = invoke(to_apply=__std__signed_max_value__5_4, id=365, pos=[(1,343,38)]) add.366: bits[5] = add(unbiased_exponent, BIAS, id=366, pos=[(1,344,5)]) EXP_SZ: bits[32] = literal(value=5, id=364, pos=[(1,342,12)]) ret sign_ext.367: bits[5] = sign_ext(add.366, new_bit_count=5, id=367) } fn __itok__apfloat__downcast_normal__8_23_5_10(__token: token id=368, __activated: bits[1] id=369, f: (bits[1], bits[8], bits[23]) id=370, round_style: bits[1] id=371) -> (token, (bits[1], bits[5], bits[10])) { FROM_FRACTION_SZ: bits[32] = literal(value=23, id=374, pos=[(1,1360,56)]) TO_FRACTION_SZ: bits[32] = literal(value=10, id=372, pos=[(1,1360,19)]) ugt.384: bits[1] = ugt(FROM_FRACTION_SZ, TO_FRACTION_SZ, id=384, pos=[(1,1365,20)]) f_fraction: bits[23] = tuple_index(f, index=2, id=391, pos=[(1,1368,57)]) and.385: bits[1] = and(__activated, ugt.384, id=385) f_sign: bits[1] = tuple_index(f, index=0, id=389, pos=[(1,1368,25)]) f_bexp: bits[8] = tuple_index(f, index=1, id=390, pos=[(1,1368,39)]) bit_slice.392: bits[10] = bit_slice(f_fraction, start=0, width=10, id=392) invoke.386: (token, (bits[1], bits[8], bits[10])) = invoke(__token, and.385, f, round_style, to_apply=__itok__apfloat__downcast_fractional__8_23_10, id=386, pos=[(1,1366,27)]) tuple.393: (bits[1], bits[8], bits[10]) = tuple(f_sign, f_bexp, bit_slice.392, id=393, pos=[(1,1368,16)]) tuple_index.388: (bits[1], bits[8], bits[10]) = tuple_index(invoke.386, index=1, id=388) f_cast: (bits[1], bits[8], bits[10]) = sel(ugt.384, cases=[tuple.393, tuple_index.388], id=394, pos=[(1,1365,17)]) f_cast_bexp: bits[8] = tuple_index(f_cast, index=1, id=398, pos=[(1,1373,50)]) INF_EXP: bits[8] = invoke(to_apply=__std__unsigned_max_value__8_9, id=395, pos=[(1,1370,43)]) invoke.403: bits[5] = invoke(to_apply=__std__signed_max_value__5_4, id=403, pos=[(1,1377,45)]) ugt.397: bits[1] = ugt(FROM_FRACTION_SZ, TO_FRACTION_SZ, id=397, pos=[(1,1373,7)]) eq.399: bits[1] = eq(f_cast_bexp, INF_EXP, id=399, pos=[(1,1373,50)]) FROM_EXP_SZ: bits[32] = literal(value=8, id=375, pos=[(1,1360,79)]) TO_EXP_SZ: bits[32] = literal(value=5, id=373, pos=[(1,1360,40)]) uexp: bits[8] = invoke(f_cast, to_apply=__apfloat__unbiased_exponent__8_10, id=405, pos=[(1,1378,36)]) TO_BIAS: bits[8] = sign_ext(invoke.403, new_bit_count=8, id=404) and.400: bits[1] = and(ugt.397, eq.399, id=400, pos=[(1,1373,7)]) CAN_GENERATE_SUBNORMALS: bits[1] = ugt(FROM_EXP_SZ, TO_EXP_SZ, id=396, pos=[(1,1371,36)]) sgt.406: bits[1] = sgt(uexp, TO_BIAS, id=406, pos=[(1,1379,38)]) not.415: bits[1] = not(and.400, id=415) and.407: bits[1] = and(CAN_GENERATE_SUBNORMALS, sgt.406, id=407, pos=[(1,1379,11)]) neg.410: bits[8] = neg(TO_BIAS, id=410, pos=[(1,1382,53)]) and.416: bits[1] = and(__activated, not.415, id=416) not.417: bits[1] = not(and.407, id=417) sle.411: bits[1] = sle(uexp, neg.410, id=411, pos=[(1,1382,45)]) and.418: bits[1] = and(and.416, not.417, id=418) and.412: bits[1] = and(CAN_GENERATE_SUBNORMALS, sle.411, id=412, pos=[(1,1382,18)]) bit_slice.424: bits[5] = bit_slice(uexp, start=0, width=5, id=424) and.419: bits[1] = and(and.418, and.412, id=419) invoke.376: bits[3] = invoke(f, to_apply=__apfloat__tag__8_23, id=376, pos=[(1,1363,15)]) literal.377: bits[3] = literal(value=4, id=377, pos=[(1,1363,22)]) f_cast_sign: bits[1] = tuple_index(f_cast, index=0, id=423, pos=[(1,1386,28)]) invoke.425: bits[5] = invoke(bit_slice.424, to_apply=__apfloat__bias__5, id=425, pos=[(1,1387,26)]) f_cast_fraction: bits[10] = tuple_index(f_cast, index=2, id=426, pos=[(1,1388,32)]) invoke.420: (token, (bits[1], bits[5], bits[10])) = invoke(__token, and.419, f, round_style, to_apply=__itok__apfloat__downcast_to_subnormal__8_23_5_10, id=420, pos=[(1,1383,33)]) not.380: bits[1] = not(__activated, id=380) eq.378: bits[1] = eq(invoke.376, literal.377, id=378, pos=[(1,1363,15)]) tuple.427: (bits[1], bits[5], bits[10]) = tuple(f_cast_sign, invoke.425, f_cast_fraction, id=427, pos=[(1,1385,20)]) tuple_index.422: (bits[1], bits[5], bits[10]) = tuple_index(invoke.420, index=1, id=422) f_sign__2: bits[1] = tuple_index(f, index=0, id=408, pos=[(1,1381,44)]) or.381: bits[1] = or(not.380, eq.378, id=381) sel.428: (bits[1], bits[5], bits[10]) = sel(and.412, cases=[tuple.427, tuple_index.422], id=428, pos=[(1,1382,15)]) invoke.409: (bits[1], bits[5], bits[10]) = invoke(f_sign__2, to_apply=__apfloat__inf__5_10, id=409, pos=[(1,1381,15)]) f_sign__1: bits[1] = tuple_index(f, index=0, id=401, pos=[(1,1374,40)]) assert.382: token = assert(__token, or.381, message="Assertion failure via assert! @ /inputs/subtree/xls/dslx/stdlib/apfloat.x:1364:12-1364:90", label="apfloat_downcast_normal_called_on_non_normal", id=382) tuple_index.387: token = tuple_index(invoke.386, index=0, id=387) tuple_index.421: token = tuple_index(invoke.420, index=0, id=421) sel.429: (bits[1], bits[5], bits[10]) = sel(and.407, cases=[sel.428, invoke.409], id=429, pos=[(1,1379,8)]) invoke.402: (bits[1], bits[5], bits[10]) = invoke(f_sign__1, to_apply=__apfloat__inf__5_10, id=402, pos=[(1,1374,11)]) not.413: bits[1] = not(and.400, id=413) after_all.431: token = after_all(assert.382, tuple_index.387, tuple_index.421, id=431) sel.430: (bits[1], bits[5], bits[10]) = sel(and.400, cases=[sel.429, invoke.402], id=430, pos=[(1,1373,4)]) literal.379: bits[8][44] = literal(value=[97, 112, 102, 108, 111, 97, 116, 95, 100, 111, 119, 110, 99, 97, 115, 116, 95, 110, 111, 114, 109, 97, 108, 95, 99, 97, 108, 108, 101, 100, 95, 111, 110, 95, 110, 111, 110, 95, 110, 111, 114, 109, 97, 108], id=379, pos=[(1,1363,42)]) tuple.383: () = tuple(id=383) and.414: bits[1] = and(__activated, not.413, id=414) ret tuple.432: (token, (bits[1], bits[5], bits[10])) = tuple(after_all.431, sel.430, id=432) } fn __itok__apfloat__downcast__8_23_5_10(__token: token id=433, __activated: bits[1] id=434, f: (bits[1], bits[8], bits[23]) id=435, round_style: bits[1] id=436) -> (token, (bits[1], bits[5], bits[10])) { literal.442: bits[3] = literal(value=0, id=442, pos=[(1,1408,8)]) invoke.441: bits[3] = invoke(f, to_apply=__apfloat__tag__8_23, id=441, pos=[(1,1407,13)]) literal.445: bits[3] = literal(value=1, id=445, pos=[(1,1409,8)]) literal.449: bits[3] = literal(value=3, id=449, pos=[(1,1410,8)]) literal.453: bits[3] = literal(value=2, id=453, pos=[(1,1411,8)]) eq.443: bits[1] = eq(literal.442, invoke.441, id=443) eq.446: bits[1] = eq(literal.445, invoke.441, id=446) eq.450: bits[1] = eq(literal.449, invoke.441, id=450) eq.454: bits[1] = eq(literal.453, invoke.441, id=454) nor.459: bits[1] = nor(eq.443, eq.446, eq.450, eq.454, id=459) and.460: bits[1] = and(__activated, nor.459, id=460) invoke.461: (token, (bits[1], bits[5], bits[10])) = invoke(__token, and.460, f, round_style, to_apply=__itok__apfloat__downcast_normal__8_23_5_10, id=461, pos=[(1,1416,45)]) f_sign: bits[1] = tuple_index(f, index=0, id=447, pos=[(1,1409,64)]) f_sign__1: bits[1] = tuple_index(f, index=0, id=451, pos=[(1,1410,61)]) f_sign__2: bits[1] = tuple_index(f, index=0, id=455, pos=[(1,1414,45)]) tuple_index.462: token = tuple_index(invoke.461, index=0, id=462) concat.464: bits[4] = concat(eq.454, eq.450, eq.446, eq.443, id=464) invoke.444: (bits[1], bits[5], bits[10]) = invoke(to_apply=__apfloat__qnan__5_10, id=444, pos=[(1,1408,31)]) invoke.448: (bits[1], bits[5], bits[10]) = invoke(f_sign, to_apply=__apfloat__inf__5_10, id=448, pos=[(1,1409,35)]) invoke.452: (bits[1], bits[5], bits[10]) = invoke(f_sign__1, to_apply=__apfloat__zero__5_10, id=452, pos=[(1,1410,32)]) invoke.456: (bits[1], bits[5], bits[10]) = invoke(f_sign__2, to_apply=__apfloat__zero__5_10, id=456, pos=[(1,1414,16)]) tuple_index.463: (bits[1], bits[5], bits[10]) = tuple_index(invoke.461, index=1, id=463) literal.457: bits[3] = literal(value=4, id=457, pos=[(1,1416,8)]) after_all.466: token = after_all(tuple_index.462, id=466) priority_sel.465: (bits[1], bits[5], bits[10]) = priority_sel(concat.464, cases=[invoke.444, invoke.448, invoke.452, invoke.456], default=tuple_index.463, id=465) TO_FRACTION_SZ: bits[32] = literal(value=10, id=437, pos=[(1,1399,16)]) TO_EXP_SZ: bits[32] = literal(value=5, id=438, pos=[(1,1399,37)]) FROM_FRACTION_SZ: bits[32] = literal(value=23, id=439, pos=[(1,1399,53)]) FROM_EXP_SZ: bits[32] = literal(value=8, id=440, pos=[(1,1399,76)]) eq.458: bits[1] = eq(literal.457, invoke.441, id=458) ret tuple.467: (token, (bits[1], bits[5], bits[10])) = tuple(after_all.466, priority_sel.465, id=467) } fn __apfloat__is_zero_or_subnormal__5_10(x: (bits[1], bits[5], bits[10]) id=468) -> bits[1] { x_bexp: bits[5] = tuple_index(x, index=1, id=471, pos=[(1,804,5)]) literal.472: bits[5] = literal(value=0, id=472, pos=[(1,804,14)]) EXP_SZ: bits[32] = literal(value=5, id=469, pos=[(1,802,28)]) FRACTION_SZ: bits[32] = literal(value=10, id=470, pos=[(1,802,41)]) ret eq.473: bits[1] = eq(x_bexp, literal.472, id=473, pos=[(1,804,5)]) } fn __apfloat__subnormals_to_zero__5_10(x: (bits[1], bits[5], bits[10]) id=474) -> (bits[1], bits[5], bits[10]) { x_sign: bits[1] = tuple_index(x, index=0, id=478, pos=[(1,809,60)]) invoke.477: bits[1] = invoke(x, to_apply=__apfloat__is_zero_or_subnormal__5_10, id=477, pos=[(1,809,27)]) invoke.479: (bits[1], bits[5], bits[10]) = invoke(x_sign, to_apply=__apfloat__zero__5_10, id=479, pos=[(1,809,37)]) EXP_SZ: bits[32] = literal(value=5, id=475, pos=[(1,807,26)]) FRACTION_SZ: bits[32] = literal(value=10, id=476, pos=[(1,807,39)]) ret sel.480: (bits[1], bits[5], bits[10]) = sel(invoke.477, cases=[x, invoke.479], id=480, pos=[(1,809,4)]) } fn __itok__apfloat__downcast_rne__8_23_5_10(__token: token id=481, __activated: bits[1] id=482, f: (bits[1], bits[8], bits[23]) id=483) -> (token, (bits[1], bits[5], bits[10])) { literal.488: bits[1] = literal(value=0, id=488, pos=[(1,1721,62)]) invoke.489: (token, (bits[1], bits[5], bits[10])) = invoke(__token, __activated, f, literal.488, to_apply=__itok__apfloat__downcast__8_23_5_10, id=489, pos=[(1,1721,31)]) tuple_index.490: token = tuple_index(invoke.489, index=0, id=490) tuple_index.491: (bits[1], bits[5], bits[10]) = tuple_index(invoke.489, index=1, id=491) after_all.493: token = after_all(tuple_index.490, id=493) invoke.492: (bits[1], bits[5], bits[10]) = invoke(tuple_index.491, to_apply=__apfloat__subnormals_to_zero__5_10, id=492, pos=[(1,1721,22)]) TO_FRACTION_SZ: bits[32] = literal(value=10, id=484, pos=[(1,1719,20)]) TO_EXP_SZ: bits[32] = literal(value=5, id=485, pos=[(1,1719,41)]) FROM_FRACTION_SZ: bits[32] = literal(value=23, id=486, pos=[(1,1719,57)]) FROM_EXP_SZ: bits[32] = literal(value=8, id=487, pos=[(1,1719,80)]) ret tuple.494: (token, (bits[1], bits[5], bits[10])) = tuple(after_all.493, invoke.492, id=494) } fn __itok__hfloat16__from_float32(__token: token id=495, __activated: bits[1] id=496, f32: (bits[1], bits[8], bits[23]) id=497) -> (token, (bits[1], bits[5], bits[10])) { invoke.498: (token, (bits[1], bits[5], bits[10])) = invoke(__token, __activated, f32, to_apply=__itok__apfloat__downcast_rne__8_23_5_10, id=498, pos=[(2,176,25)]) tuple_index.499: token = tuple_index(invoke.498, index=0, id=499) after_all.501: token = after_all(tuple_index.499, id=501) tuple_index.500: (bits[1], bits[5], bits[10]) = tuple_index(invoke.498, index=1, id=500) ret tuple.502: (token, (bits[1], bits[5], bits[10])) = tuple(after_all.501, tuple_index.500, id=502) } top fn __hfloat16__from_float32(f32: (bits[1], bits[8], bits[23]) id=503) -> (bits[1], bits[5], bits[10]) { after_all.504: token = after_all(id=504) literal.505: bits[1] = literal(value=1, id=505) invoke.506: (token, (bits[1], bits[5], bits[10])) = invoke(after_all.504, literal.505, f32, to_apply=__itok__hfloat16__from_float32, id=506) ret tuple_index.507: (bits[1], bits[5], bits[10]) = tuple_index(invoke.506, index=1, id=507) }