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