diff --git a/lib/cretonne/src/abi.rs b/lib/cretonne/src/abi.rs index 7eb459fe6b..5c121824aa 100644 --- a/lib/cretonne/src/abi.rs +++ b/lib/cretonne/src/abi.rs @@ -61,7 +61,7 @@ impl ValueConversion { ValueConversion::IntSplit => ty.half_width().expect("Integer type too small to split"), ValueConversion::VectorSplit => ty.half_vector().expect("Not a vector"), ValueConversion::IntBits => Type::int(ty.bits()).expect("Bad integer size"), - ValueConversion::Sext(nty) => nty, + ValueConversion::Sext(nty) | ValueConversion::Uext(nty) => nty, } } @@ -69,7 +69,7 @@ impl ValueConversion { /// Is this a split conversion that results in two arguments? pub fn is_split(self) -> bool { match self { - ValueConversion::IntSplit => true, + ValueConversion::IntSplit | ValueConversion::VectorSplit => true, _ => false, } diff --git a/lib/cretonne/src/ir/instructions.rs b/lib/cretonne/src/ir/instructions.rs index 0cb9234ed6..2a8d5cdf2d 100644 --- a/lib/cretonne/src/ir/instructions.rs +++ b/lib/cretonne/src/ir/instructions.rs @@ -356,8 +356,8 @@ impl InstructionData { /// Multi-destination branches like `br_table` return `None`. pub fn branch_destination(&self) -> Option { match *self { - InstructionData::Jump { destination, .. } => Some(destination), - InstructionData::Branch { destination, .. } => Some(destination), + InstructionData::Jump { destination, .. } | + InstructionData::Branch { destination, .. } | InstructionData::BranchIcmp { destination, .. } => Some(destination), _ => None, } @@ -369,8 +369,8 @@ impl InstructionData { /// Multi-destination branches like `br_table` return `None`. pub fn branch_destination_mut(&mut self) -> Option<&mut Ebb> { match *self { - InstructionData::Jump { ref mut destination, .. } => Some(destination), - InstructionData::Branch { ref mut destination, .. } => Some(destination), + InstructionData::Jump { ref mut destination, .. } | + InstructionData::Branch { ref mut destination, .. } | InstructionData::BranchIcmp { ref mut destination, .. } => Some(destination), _ => None, } diff --git a/lib/cretonne/src/verifier/locations.rs b/lib/cretonne/src/verifier/locations.rs index bb80507baa..94958c2f89 100644 --- a/lib/cretonne/src/verifier/locations.rs +++ b/lib/cretonne/src/verifier/locations.rs @@ -233,7 +233,7 @@ impl<'a> LocationVerifier<'a> { /// Update diversions to reflect the current instruction and check their consistency. fn update_diversions(&self, inst: ir::Inst, divert: &mut RegDiversions) -> Result { let (arg, src) = match self.func.dfg[inst] { - ir::InstructionData::RegMove { arg, src, .. } => (arg, ir::ValueLoc::Reg(src)), + ir::InstructionData::RegMove { arg, src, .. } | ir::InstructionData::RegSpill { arg, src, .. } => (arg, ir::ValueLoc::Reg(src)), ir::InstructionData::RegFill { arg, src, .. } => (arg, ir::ValueLoc::Stack(src)), _ => return Ok(()), diff --git a/lib/filecheck/src/error.rs b/lib/filecheck/src/error.rs index 1cc17001fc..5580cc4c3c 100644 --- a/lib/filecheck/src/error.rs +++ b/lib/filecheck/src/error.rs @@ -39,9 +39,9 @@ impl StdError for Error { fn description(&self) -> &str { use Error::*; match *self { - Syntax(ref s) => s, - UndefVariable(ref s) => s, - Backref(ref s) => s, + Syntax(ref s) | + UndefVariable(ref s) | + Backref(ref s) | DuplicateDef(ref s) => s, Regex(ref err) => err.description(), } diff --git a/lib/filecheck/src/pattern.rs b/lib/filecheck/src/pattern.rs index 0d1da57f12..7969bc00ec 100644 --- a/lib/filecheck/src/pattern.rs +++ b/lib/filecheck/src/pattern.rs @@ -45,7 +45,7 @@ impl Part { /// Get the variabled referenced by this part, if any. pub fn ref_var(&self) -> Option<&str> { match *self { - Part::Var(ref var) => Some(var), + Part::Var(ref var) | Part::DefVar { ref var, .. } => Some(var), _ => None, } diff --git a/lib/reader/src/parser.rs b/lib/reader/src/parser.rs index dd08b0ddcb..0a63f19029 100644 --- a/lib/reader/src/parser.rs +++ b/lib/reader/src/parser.rs @@ -1387,9 +1387,9 @@ impl<'a> Parser<'a> { // extended-basic-block ::= ebb-header * { instruction } while match self.token() { - Some(Token::Value(_)) => true, - Some(Token::Identifier(_)) => true, - Some(Token::LBracket) => true, + Some(Token::Value(_)) | + Some(Token::Identifier(_)) | + Some(Token::LBracket) | Some(Token::SourceLoc(_)) => true, _ => false, }