Add a verifier check that ghost instructions don't have encodings.
This commit is contained in:
committed by
Benjamin Bouvier
parent
88bbbca6cd
commit
26da67b394
@@ -1550,6 +1550,15 @@ impl<'a> Verifier<'a> {
|
|||||||
|
|
||||||
let encoding = self.func.encodings[inst];
|
let encoding = self.func.encodings[inst];
|
||||||
if encoding.is_legal() {
|
if encoding.is_legal() {
|
||||||
|
if self.func.dfg[inst].opcode().is_ghost() {
|
||||||
|
return nonfatal!(
|
||||||
|
errors,
|
||||||
|
inst,
|
||||||
|
"Ghost instruction has an encoding: {}",
|
||||||
|
isa.encoding_info().display(encoding)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
let mut encodings = isa
|
let mut encodings = isa
|
||||||
.legal_encodings(
|
.legal_encodings(
|
||||||
&self.func,
|
&self.func,
|
||||||
|
|||||||
Reference in New Issue
Block a user