Files
wasmtime/cranelift/filetests/filetests/regalloc/solver-fixedconflict-var-2.clif
Benjamin Bouvier a3f55cdf1f Regalloc solver: check that a variable doesn't exist to test if it can be added (fixes #1123);
This situation could be triggered that can_add_var would return true
while a variable was already added for the given register.

For instance, when we have a reassignment (because of a fixed register
input requirement) and a fixed input conflict on the same fixed
register, this register will not be available in the regs_in set after
inputs_done (because of the fixed input conflict diversion) but will
have its own variable.
2019-10-17 08:42:08 -07:00

101 lines
2.4 KiB
Plaintext

test compile
set opt_level=speed
set enable_pinned_reg=true
target x86_64 haswell
function u0:0(i32, i32, i32, i64 vmctx) -> i64 uext system_v {
ebb0(v0: i32, v1: i32, v2: i32, v3: i64):
v236 = iconst.i32 0x4de9_bd37
v424 = iconst.i32 0
jump ebb37(v424)
ebb37(v65: i32):
v433 = iconst.i32 0
jump ebb40(v433)
ebb40(v70: i32):
v75 = iconst.i32 0
v259 = iconst.i32 0
v78 -> v259
v449 = iconst.i32 0
v450, v451 = x86_sdivmodx v75, v449, v259
v79 -> v450
v269 = iconst.i32 0
v270 = ushr_imm v269, 31
v271 = iadd v269, v270
v98 -> v271
v100 = iconst.i32 -31
v272 = iconst.i32 0x4de9_bd37
v490, v273 = x86_smulx v100, v272
v493 = iconst.i32 0
jump ebb61(v493)
ebb61(v103: i32):
v104 = iconst.i32 -23
v105 = iconst.i32 -23
v106 = popcnt v105
v500 = sshr_imm v104, 31
v501 = iconst.i32 0
jump ebb64(v501)
ebb64(v107: i32):
v108 = iconst.i32 0
v109 = iconst.i32 0
v278 = iconst.i32 0
v507, v279 = x86_smulx v109, v278
v280 = isub v279, v109
v281 = sshr_imm v280, 11
v282 = iconst.i32 0
v283 = iadd v281, v282
v111 -> v283
v112 = rotr v108, v283
jump ebb65
ebb65:
v509 = iconst.i32 0
v510, v511 = x86_sdivmodx v107, v509, v112
v113 -> v510
v114 = iconst.i32 0
v517 = iconst.i32 0
v518, v519 = x86_sdivmodx v103, v517, v114
v115 -> v518
v534 = iconst.i32 0
v122 -> v534
v541 = iconst.i32 0
v542, v543 = x86_sdivmodx v271, v541, v122
v123 -> v542
v289 = iconst.i32 0
v125 -> v289
v550 = iconst.i32 0
v551, v552 = x86_sdivmodx v79, v550, v289
v126 -> v551
v130 = iconst.i32 0
v558 = iconst.i32 0
v559, v560 = x86_sdivmodx v70, v558, v130
v131 -> v559
v305 = iconst.i32 0
v140 -> v305
v577 = iconst.i32 0
v578, v579 = x86_sdivmodx v65, v577, v305
v141 -> v578
v166 = iconst.i32 0
v167 = iconst.i32 -31
v318 = iconst.i32 0x4de9_bd37
v650, v319 = x86_smulx v167, v318
v320 = isub v319, v167
v321 = sshr_imm v320, 4
v322 = iconst.i32 0
v323 = iadd v321, v322
v169 -> v323
v652 = iconst.i32 0
v653, v654 = x86_sdivmodx v166, v652, v323
v170 -> v653
v171 = iconst.i32 -23
v172 = iconst.i32 -23
v173 = popcnt v172
v174 = popcnt v173
v660 = sshr_imm v171, 31
v661, v662 = x86_sdivmodx v171, v660, v174
trap user0
}