Remove the non-REX encodings for regmove et al.

regmove, regfill, and regspill have immediates which aren't value
operands, so they aren't in the set of things that can be described by
the existing constraint system. Consequently, constraints saying that
the non-REX encodings only support registers that don't need REX
prefixes don't work. Fow now, just remove the non-REX encodings, so
that they don't get selected when they aren't valid.

This fixes the last known issue with instruction shrinking, so it can
be re-enabled.
This commit is contained in:
Dan Gohman
2018-04-20 08:59:50 -07:00
parent 56b3465ed0
commit 5bcfd47f3f
3 changed files with 20 additions and 7 deletions

View File

@@ -141,12 +141,9 @@ impl Context {
}
self.regalloc(isa)?;
self.prologue_epilogue(isa)?;
// Temporarily disable the shrink_instructions pass, as it causes miscompiles.
/*
if isa.flags().opt_level() == OptLevel::Best {
self.shrink_instructions(isa)?;
}
*/
self.relax_branches(isa)
}