Stream: git-wasmtime

Topic: wasmtime / issue #5689 Cranelift yields different answer ...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 02 2023 at 15:40):

alexcrichton labeled issue #5689:

This input:

<details>

;;Output of `std::fmt::Debug`:

;; Fuzzgen test case

test interpret
test run
set opt_level=speed
set regalloc_checker=true
set enable_simd=true
set enable_safepoints=true
set unwind_info=false
set preserve_frame_pointers=true
set machine_code_cfg_info=true
set enable_table_access_spectre_mitigation=false
target aarch64
function %u1(i64, i128 sext, i128 uext, i64, i16 uext, i8 uext, i32 sext, f32, i8, i128 uext) ->   i8 uext system_v {
    ss0 = explicit_slot 48
    ss1 = explicit_slot 48
    ss2 = explicit_slot 48
    ss3 = explicit_slot 48

block0(v0: i64, v1: i128, v2: i128, v3: i64, v4: i16, v5: i8, v6: i32, v7: f32, v8: i8, v9: i128):
    v102 -> v0
    v103 -> v1
    v109 -> v1
    v167 -> v1
    v119 -> v2
    v172 -> v2
    v130 -> v3
    v176 -> v3
    v106 -> v4
    v104 -> v5
    v129 -> v5
    v175 -> v5
    v158 -> v6
    v177 -> v6
    v105 -> v7
    v75 = f64const 0x1.0303030303030p-764
    v76 = f64const 0x1.0303030303030p-252
    v77 = f64const 0x1.0303030303030p-252
    v110 -> v77
    v168 -> v77
    v78 = f64const 0x1.3e83030303030p-188
    v79 = f64const 0x1.d363633323832p-220
    v80 = f64const 0x1.4333634383339p-156
    v81 = iconst.i32 0x3833_3833
    v82 = iconst.i32 0x3330_3830
    v83 = iconst.i8 48
    v112 -> v83
    v170 -> v83
    v84 = iconst.i64 0x362f_3033_3236_3630
    v85 = iconst.i64 0x8989_8904_3334_3535
    v86 = iconcat v85, v84  ; v85 = 0x8989_8904_3334_3535, v84 = 0x362f_3033_3236_3630
    v121 -> v86
    v173 -> v86
    v87 = iconst.i64 0x8989_8989_8989_8989
    v88 = iconst.i64 0x8989_8989_8989_8989
    v89 = iconcat v88, v87  ; v88 = 0x8989_8989_8989_8989, v87 = 0x8989_8989_8989_8989
    v118 -> v89
    v171 -> v89
    v90 = iconst.i64 0x8989_8989_8989_8989
    v91 = iconst.i64 0x8989_8989_8989_8989
    v92 = iconcat v91, v90  ; v91 = 0x8989_8989_8989_8989, v90 = 0x8989_8989_8989_8989
    v111 -> v92
    v169 -> v92
    v93 = iconst.i64 0x012c_80be_8989_8989
    v94 = iconst.i64 0xbe7e_a0f3_008b_0000
    v95 = iconcat v94, v93  ; v94 = 0xbe7e_a0f3_008b_0000, v93 = 0x012c_80be_8989_8989
    v96 = iconst.i32 -212
    v122 -> v96
    v174 -> v96
    v97 = iconst.i8 0
    v98 = iconst.i16 0
    v99 = iconst.i32 0
    v100 = iconst.i64 0
    v101 = uextend.i128 v100  ; v100 = 0
    stack_store v101, ss0
    stack_store v101, ss0+16
    stack_store v101, ss0+32
    stack_store v101, ss1
    stack_store v101, ss1+16
    stack_store v101, ss1+32
    stack_store v101, ss2
    stack_store v101, ss2+16
    stack_store v101, ss2+32
    stack_store v101, ss3
    stack_store v101, ss3+16
    stack_store v101, ss3+32
    brif v5, block1(v75, v75, v75, v75, v75, v75, v75, v75), block2(v75, v75, v75, v0, v75, v75, v75, v75)  ; v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764

block1(v10: f64, v11: f64, v12: f64, v13: f64, v14: f64, v15: f64, v16: f64, v17: f64):
    brif.i8 v104, block2(v17, v17, v17, v102, v17, v17, v17, v17), block8(v17, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v83, v102, v77)  ; v83 = 48, v77 = 0x1.0303030303030p-252

block2(v18: f64, v19: f64, v20: f64, v21: i64, v22: f64, v23: f64, v24: f64, v25: f64):
    v108 -> v21
    jump block3(v25, v25, v105, v106, v106, v106, v106, v106)

block3(v26: f64, v27: f64, v28: f32, v29: i16, v30: i16, v31: i16, v32: i16, v33: i16):
    v107 -> v33
    jump block4(v27)

block4(v34: f64) cold:
    jump block5(v34, v34, v34, v107, v108, v34, v34, v34)

block5(v35: f64, v36: f64, v37: f64, v38: i16, v39: i64, v40: f64, v41: f64, v42: f64):
    v113 -> v38
    v114 -> v39
    jump block6(v42, v42, v42, v42, v42, v109, v109, v42)

block6(v43: f64, v44: f64, v45: f64, v46: f64, v47: f64, v48: i128, v49: i128, v50: f64):
    v120 -> v49
    jump block7(v110, v110, v110, v110, v111, v111, v112, v112)  ; v110 = 0x1.0303030303030p-252, v110 = 0x1.0303030303030p-252, v110 = 0x1.0303030303030p-252, v110 = 0x1.0303030303030p-252, v112 = 48, v112 = 48

block7(v51: f64, v52: f64, v53: f64, v54: f64, v55: i128, v56: i128, v57: i8, v58: i8):
    v115 = rotr.i16 v113, v114
    v116 = ushr v58, v58
    v117 = ishl.i64 v114, v114
    jump block8(v54, v56, v118, v118, v118, v118, v118, v118, v119, v120, v120, v121, v118, v118, v118, v118, v116, v117, v54)

block8(v59: f64, v60: i128, v61: i128, v62: i128, v63: i128, v64: i128, v65: i128, v66: i128, v67: i128, v68: i128, v69: i128, v70: i128, v71: i128, v72: i128, v73: i128, v74: i128, v132: i8, v145: i64, v154: f64):
    v123 = smulhi.i32 v122, v122  ; v122 = -212, v122 = -212
    v124 = smulhi v123, v123
    v125 = smulhi v124, v124
    v126 = smulhi v125, v125
    v127 = smulhi v126, v126
    v128 = smulhi v127, v127
    v131 = ishl.i8 v129, v130
    v133 = ishl v132, v130
    v134 = smulhi v128, v128
    v135 = smulhi v134, v134
    v136 = smulhi v135, v135
    v137 = smulhi v136, v136
    v138 = smulhi v137, v137
    v139 = smulhi v138, v138
    v140 = smulhi v139, v139
    v141 = smulhi v140, v140
    v142 = smulhi v141, v141
    v143 = smulhi v142, v142
    v144 = smulhi v143, v143
    v146 = ishl v145, v145
    v147 = ishl v146, v146
    v148 = ishl v147, v147
    v149 = ishl v148, v148
    v150 = ishl.i64 v130, v130
    v151 = ishl v131, v150
    v152 = ishl v151, v150
    v153 = ishl v152, v149
    nop
    nop
    v178 = fmin v154, v154
    v179 = fcmp ne v178, v178
    v180 = f64const +NaN
    v155 = select v179, v180, v178  ; v180 = +NaN
    v156 = ishl v149, v149
    v157 = stack_addr.i64 ss0+23
    store.i32 v158, v157+2
    v159 = ishl v156, v156
    v160 = ishl v159, v159
    v161 = ishl v160, v150
    v162 = smulhi v144, v144
    v163 = smulhi v162, v162
    v164 = smulhi v163, v163
    v165 = smulhi v164, v164
    v166 = smulhi v165, v165
    return  v133
}

; Note: the results in the below test cases are simply a placeholder and probably will be wrong

; run: %u1(-1446803456761533461, 0, 0, 0, 0, 0, 0, 0.0, 0, -27913787911483233330979948265887236096) == 48

</details>

yields:

$ cargo run -q test ../out.log
 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ../out.log: run

Caused by:
    Failed test: run: %u1(-1446803456761533461, 0, 0, 0, 0, 0, 0, 0.0, 0, -27913787911483233330979948265887236096) == 48, actual: 0
1 tests
Error: 1 failure

but if the test run directive is removed it passes

This is the regression range, so cc @fitzgen

view this post on Zulip Wasmtime GitHub notifications bot (Feb 02 2023 at 15:40):

alexcrichton opened issue #5689:

This input:

<details>

;;Output of `std::fmt::Debug`:

;; Fuzzgen test case

test interpret
test run
set opt_level=speed
set regalloc_checker=true
set enable_simd=true
set enable_safepoints=true
set unwind_info=false
set preserve_frame_pointers=true
set machine_code_cfg_info=true
set enable_table_access_spectre_mitigation=false
target aarch64
function %u1(i64, i128 sext, i128 uext, i64, i16 uext, i8 uext, i32 sext, f32, i8, i128 uext) ->   i8 uext system_v {
    ss0 = explicit_slot 48
    ss1 = explicit_slot 48
    ss2 = explicit_slot 48
    ss3 = explicit_slot 48

block0(v0: i64, v1: i128, v2: i128, v3: i64, v4: i16, v5: i8, v6: i32, v7: f32, v8: i8, v9: i128):
    v102 -> v0
    v103 -> v1
    v109 -> v1
    v167 -> v1
    v119 -> v2
    v172 -> v2
    v130 -> v3
    v176 -> v3
    v106 -> v4
    v104 -> v5
    v129 -> v5
    v175 -> v5
    v158 -> v6
    v177 -> v6
    v105 -> v7
    v75 = f64const 0x1.0303030303030p-764
    v76 = f64const 0x1.0303030303030p-252
    v77 = f64const 0x1.0303030303030p-252
    v110 -> v77
    v168 -> v77
    v78 = f64const 0x1.3e83030303030p-188
    v79 = f64const 0x1.d363633323832p-220
    v80 = f64const 0x1.4333634383339p-156
    v81 = iconst.i32 0x3833_3833
    v82 = iconst.i32 0x3330_3830
    v83 = iconst.i8 48
    v112 -> v83
    v170 -> v83
    v84 = iconst.i64 0x362f_3033_3236_3630
    v85 = iconst.i64 0x8989_8904_3334_3535
    v86 = iconcat v85, v84  ; v85 = 0x8989_8904_3334_3535, v84 = 0x362f_3033_3236_3630
    v121 -> v86
    v173 -> v86
    v87 = iconst.i64 0x8989_8989_8989_8989
    v88 = iconst.i64 0x8989_8989_8989_8989
    v89 = iconcat v88, v87  ; v88 = 0x8989_8989_8989_8989, v87 = 0x8989_8989_8989_8989
    v118 -> v89
    v171 -> v89
    v90 = iconst.i64 0x8989_8989_8989_8989
    v91 = iconst.i64 0x8989_8989_8989_8989
    v92 = iconcat v91, v90  ; v91 = 0x8989_8989_8989_8989, v90 = 0x8989_8989_8989_8989
    v111 -> v92
    v169 -> v92
    v93 = iconst.i64 0x012c_80be_8989_8989
    v94 = iconst.i64 0xbe7e_a0f3_008b_0000
    v95 = iconcat v94, v93  ; v94 = 0xbe7e_a0f3_008b_0000, v93 = 0x012c_80be_8989_8989
    v96 = iconst.i32 -212
    v122 -> v96
    v174 -> v96
    v97 = iconst.i8 0
    v98 = iconst.i16 0
    v99 = iconst.i32 0
    v100 = iconst.i64 0
    v101 = uextend.i128 v100  ; v100 = 0
    stack_store v101, ss0
    stack_store v101, ss0+16
    stack_store v101, ss0+32
    stack_store v101, ss1
    stack_store v101, ss1+16
    stack_store v101, ss1+32
    stack_store v101, ss2
    stack_store v101, ss2+16
    stack_store v101, ss2+32
    stack_store v101, ss3
    stack_store v101, ss3+16
    stack_store v101, ss3+32
    brif v5, block1(v75, v75, v75, v75, v75, v75, v75, v75), block2(v75, v75, v75, v0, v75, v75, v75, v75)  ; v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764

block1(v10: f64, v11: f64, v12: f64, v13: f64, v14: f64, v15: f64, v16: f64, v17: f64):
    brif.i8 v104, block2(v17, v17, v17, v102, v17, v17, v17, v17), block8(v17, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v83, v102, v77)  ; v83 = 48, v77 = 0x1.0303030303030p-252

block2(v18: f64, v19: f64, v20: f64, v21: i64, v22: f64, v23: f64, v24: f64, v25: f64):
    v108 -> v21
    jump block3(v25, v25, v105, v106, v106, v106, v106, v106)

block3(v26: f64, v27: f64, v28: f32, v29: i16, v30: i16, v31: i16, v32: i16, v33: i16):
    v107 -> v33
    jump block4(v27)

block4(v34: f64) cold:
    jump block5(v34, v34, v34, v107, v108, v34, v34, v34)

block5(v35: f64, v36: f64, v37: f64, v38: i16, v39: i64, v40: f64, v41: f64, v42: f64):
    v113 -> v38
    v114 -> v39
    jump block6(v42, v42, v42, v42, v42, v109, v109, v42)

block6(v43: f64, v44: f64, v45: f64, v46: f64, v47: f64, v48: i128, v49: i128, v50: f64):
    v120 -> v49
    jump block7(v110, v110, v110, v110, v111, v111, v112, v112)  ; v110 = 0x1.0303030303030p-252, v110 = 0x1.0303030303030p-252, v110 = 0x1.0303030303030p-252, v110 = 0x1.0303030303030p-252, v112 = 48, v112 = 48

block7(v51: f64, v52: f64, v53: f64, v54: f64, v55: i128, v56: i128, v57: i8, v58: i8):
    v115 = rotr.i16 v113, v114
    v116 = ushr v58, v58
    v117 = ishl.i64 v114, v114
    jump block8(v54, v56, v118, v118, v118, v118, v118, v118, v119, v120, v120, v121, v118, v118, v118, v118, v116, v117, v54)

block8(v59: f64, v60: i128, v61: i128, v62: i128, v63: i128, v64: i128, v65: i128, v66: i128, v67: i128, v68: i128, v69: i128, v70: i128, v71: i128, v72: i128, v73: i128, v74: i128, v132: i8, v145: i64, v154: f64):
    v123 = smulhi.i32 v122, v122  ; v122 = -212, v122 = -212
    v124 = smulhi v123, v123
    v125 = smulhi v124, v124
    v126 = smulhi v125, v125
    v127 = smulhi v126, v126
    v128 = smulhi v127, v127
    v131 = ishl.i8 v129, v130
    v133 = ishl v132, v130
    v134 = smulhi v128, v128
    v135 = smulhi v134, v134
    v136 = smulhi v135, v135
    v137 = smulhi v136, v136
    v138 = smulhi v137, v137
    v139 = smulhi v138, v138
    v140 = smulhi v139, v139
    v141 = smulhi v140, v140
    v142 = smulhi v141, v141
    v143 = smulhi v142, v142
    v144 = smulhi v143, v143
    v146 = ishl v145, v145
    v147 = ishl v146, v146
    v148 = ishl v147, v147
    v149 = ishl v148, v148
    v150 = ishl.i64 v130, v130
    v151 = ishl v131, v150
    v152 = ishl v151, v150
    v153 = ishl v152, v149
    nop
    nop
    v178 = fmin v154, v154
    v179 = fcmp ne v178, v178
    v180 = f64const +NaN
    v155 = select v179, v180, v178  ; v180 = +NaN
    v156 = ishl v149, v149
    v157 = stack_addr.i64 ss0+23
    store.i32 v158, v157+2
    v159 = ishl v156, v156
    v160 = ishl v159, v159
    v161 = ishl v160, v150
    v162 = smulhi v144, v144
    v163 = smulhi v162, v162
    v164 = smulhi v163, v163
    v165 = smulhi v164, v164
    v166 = smulhi v165, v165
    return  v133
}

; Note: the results in the below test cases are simply a placeholder and probably will be wrong

; run: %u1(-1446803456761533461, 0, 0, 0, 0, 0, 0, 0.0, 0, -27913787911483233330979948265887236096) == 48

</details>

yields:

$ cargo run -q test ../out.log
 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ../out.log: run

Caused by:
    Failed test: run: %u1(-1446803456761533461, 0, 0, 0, 0, 0, 0, 0.0, 0, -27913787911483233330979948265887236096) == 48, actual: 0
1 tests
Error: 1 failure

but if the test run directive is removed it passes

This is the regression range, so cc @fitzgen

view this post on Zulip Wasmtime GitHub notifications bot (Feb 02 2023 at 20:54):

fitzgen commented on issue #5689:

I'm on it.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 03 2023 at 18:01):

fitzgen commented on issue #5689:

This was also fixed by #5695.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 03 2023 at 18:01):

fitzgen closed issue #5689:

This input:

<details>

;;Output of `std::fmt::Debug`:

;; Fuzzgen test case

test interpret
test run
set opt_level=speed
set regalloc_checker=true
set enable_simd=true
set enable_safepoints=true
set unwind_info=false
set preserve_frame_pointers=true
set machine_code_cfg_info=true
set enable_table_access_spectre_mitigation=false
target aarch64
function %u1(i64, i128 sext, i128 uext, i64, i16 uext, i8 uext, i32 sext, f32, i8, i128 uext) ->   i8 uext system_v {
    ss0 = explicit_slot 48
    ss1 = explicit_slot 48
    ss2 = explicit_slot 48
    ss3 = explicit_slot 48

block0(v0: i64, v1: i128, v2: i128, v3: i64, v4: i16, v5: i8, v6: i32, v7: f32, v8: i8, v9: i128):
    v102 -> v0
    v103 -> v1
    v109 -> v1
    v167 -> v1
    v119 -> v2
    v172 -> v2
    v130 -> v3
    v176 -> v3
    v106 -> v4
    v104 -> v5
    v129 -> v5
    v175 -> v5
    v158 -> v6
    v177 -> v6
    v105 -> v7
    v75 = f64const 0x1.0303030303030p-764
    v76 = f64const 0x1.0303030303030p-252
    v77 = f64const 0x1.0303030303030p-252
    v110 -> v77
    v168 -> v77
    v78 = f64const 0x1.3e83030303030p-188
    v79 = f64const 0x1.d363633323832p-220
    v80 = f64const 0x1.4333634383339p-156
    v81 = iconst.i32 0x3833_3833
    v82 = iconst.i32 0x3330_3830
    v83 = iconst.i8 48
    v112 -> v83
    v170 -> v83
    v84 = iconst.i64 0x362f_3033_3236_3630
    v85 = iconst.i64 0x8989_8904_3334_3535
    v86 = iconcat v85, v84  ; v85 = 0x8989_8904_3334_3535, v84 = 0x362f_3033_3236_3630
    v121 -> v86
    v173 -> v86
    v87 = iconst.i64 0x8989_8989_8989_8989
    v88 = iconst.i64 0x8989_8989_8989_8989
    v89 = iconcat v88, v87  ; v88 = 0x8989_8989_8989_8989, v87 = 0x8989_8989_8989_8989
    v118 -> v89
    v171 -> v89
    v90 = iconst.i64 0x8989_8989_8989_8989
    v91 = iconst.i64 0x8989_8989_8989_8989
    v92 = iconcat v91, v90  ; v91 = 0x8989_8989_8989_8989, v90 = 0x8989_8989_8989_8989
    v111 -> v92
    v169 -> v92
    v93 = iconst.i64 0x012c_80be_8989_8989
    v94 = iconst.i64 0xbe7e_a0f3_008b_0000
    v95 = iconcat v94, v93  ; v94 = 0xbe7e_a0f3_008b_0000, v93 = 0x012c_80be_8989_8989
    v96 = iconst.i32 -212
    v122 -> v96
    v174 -> v96
    v97 = iconst.i8 0
    v98 = iconst.i16 0
    v99 = iconst.i32 0
    v100 = iconst.i64 0
    v101 = uextend.i128 v100  ; v100 = 0
    stack_store v101, ss0
    stack_store v101, ss0+16
    stack_store v101, ss0+32
    stack_store v101, ss1
    stack_store v101, ss1+16
    stack_store v101, ss1+32
    stack_store v101, ss2
    stack_store v101, ss2+16
    stack_store v101, ss2+32
    stack_store v101, ss3
    stack_store v101, ss3+16
    stack_store v101, ss3+32
    brif v5, block1(v75, v75, v75, v75, v75, v75, v75, v75), block2(v75, v75, v75, v0, v75, v75, v75, v75)  ; v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764, v75 = 0x1.0303030303030p-764

block1(v10: f64, v11: f64, v12: f64, v13: f64, v14: f64, v15: f64, v16: f64, v17: f64):
    brif.i8 v104, block2(v17, v17, v17, v102, v17, v17, v17, v17), block8(v17, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v103, v83, v102, v77)  ; v83 = 48, v77 = 0x1.0303030303030p-252

block2(v18: f64, v19: f64, v20: f64, v21: i64, v22: f64, v23: f64, v24: f64, v25: f64):
    v108 -> v21
    jump block3(v25, v25, v105, v106, v106, v106, v106, v106)

block3(v26: f64, v27: f64, v28: f32, v29: i16, v30: i16, v31: i16, v32: i16, v33: i16):
    v107 -> v33
    jump block4(v27)

block4(v34: f64) cold:
    jump block5(v34, v34, v34, v107, v108, v34, v34, v34)

block5(v35: f64, v36: f64, v37: f64, v38: i16, v39: i64, v40: f64, v41: f64, v42: f64):
    v113 -> v38
    v114 -> v39
    jump block6(v42, v42, v42, v42, v42, v109, v109, v42)

block6(v43: f64, v44: f64, v45: f64, v46: f64, v47: f64, v48: i128, v49: i128, v50: f64):
    v120 -> v49
    jump block7(v110, v110, v110, v110, v111, v111, v112, v112)  ; v110 = 0x1.0303030303030p-252, v110 = 0x1.0303030303030p-252, v110 = 0x1.0303030303030p-252, v110 = 0x1.0303030303030p-252, v112 = 48, v112 = 48

block7(v51: f64, v52: f64, v53: f64, v54: f64, v55: i128, v56: i128, v57: i8, v58: i8):
    v115 = rotr.i16 v113, v114
    v116 = ushr v58, v58
    v117 = ishl.i64 v114, v114
    jump block8(v54, v56, v118, v118, v118, v118, v118, v118, v119, v120, v120, v121, v118, v118, v118, v118, v116, v117, v54)

block8(v59: f64, v60: i128, v61: i128, v62: i128, v63: i128, v64: i128, v65: i128, v66: i128, v67: i128, v68: i128, v69: i128, v70: i128, v71: i128, v72: i128, v73: i128, v74: i128, v132: i8, v145: i64, v154: f64):
    v123 = smulhi.i32 v122, v122  ; v122 = -212, v122 = -212
    v124 = smulhi v123, v123
    v125 = smulhi v124, v124
    v126 = smulhi v125, v125
    v127 = smulhi v126, v126
    v128 = smulhi v127, v127
    v131 = ishl.i8 v129, v130
    v133 = ishl v132, v130
    v134 = smulhi v128, v128
    v135 = smulhi v134, v134
    v136 = smulhi v135, v135
    v137 = smulhi v136, v136
    v138 = smulhi v137, v137
    v139 = smulhi v138, v138
    v140 = smulhi v139, v139
    v141 = smulhi v140, v140
    v142 = smulhi v141, v141
    v143 = smulhi v142, v142
    v144 = smulhi v143, v143
    v146 = ishl v145, v145
    v147 = ishl v146, v146
    v148 = ishl v147, v147
    v149 = ishl v148, v148
    v150 = ishl.i64 v130, v130
    v151 = ishl v131, v150
    v152 = ishl v151, v150
    v153 = ishl v152, v149
    nop
    nop
    v178 = fmin v154, v154
    v179 = fcmp ne v178, v178
    v180 = f64const +NaN
    v155 = select v179, v180, v178  ; v180 = +NaN
    v156 = ishl v149, v149
    v157 = stack_addr.i64 ss0+23
    store.i32 v158, v157+2
    v159 = ishl v156, v156
    v160 = ishl v159, v159
    v161 = ishl v160, v150
    v162 = smulhi v144, v144
    v163 = smulhi v162, v162
    v164 = smulhi v163, v163
    v165 = smulhi v164, v164
    v166 = smulhi v165, v165
    return  v133
}

; Note: the results in the below test cases are simply a placeholder and probably will be wrong

; run: %u1(-1446803456761533461, 0, 0, 0, 0, 0, 0, 0.0, 0, -27913787911483233330979948265887236096) == 48

</details>

yields:

$ cargo run -q test ../out.log
 ERROR cranelift_filetests::concurrent > FAIL: run
FAIL ../out.log: run

Caused by:
    Failed test: run: %u1(-1446803456761533461, 0, 0, 0, 0, 0, 0, 0.0, 0, -27913787911483233330979948265887236096) == 48, actual: 0
1 tests
Error: 1 failure

but if the test run directive is removed it passes

This is the regression range, so cc @fitzgen


Last updated: Dec 23 2024 at 12:05 UTC