Update to the rustfmt in rust 1.27, which is now stable. (#377)

This commit is contained in:
Dan Gohman
2018-06-26 13:06:16 -07:00
committed by GitHub
parent 7d2b44289c
commit cc94adca3b
25 changed files with 134 additions and 65 deletions

View File

@@ -33,12 +33,18 @@ pub fn do_nan_canonicalization(func: &mut Function) {
fn is_fp_arith(pos: &mut FuncCursor, inst: Inst) -> bool {
match pos.func.dfg[inst] {
InstructionData::Unary { opcode, .. } => {
opcode == Opcode::Ceil || opcode == Opcode::Floor || opcode == Opcode::Nearest
|| opcode == Opcode::Sqrt || opcode == Opcode::Trunc
opcode == Opcode::Ceil
|| opcode == Opcode::Floor
|| opcode == Opcode::Nearest
|| opcode == Opcode::Sqrt
|| opcode == Opcode::Trunc
}
InstructionData::Binary { opcode, .. } => {
opcode == Opcode::Fadd || opcode == Opcode::Fdiv || opcode == Opcode::Fmax
|| opcode == Opcode::Fmin || opcode == Opcode::Fmul
opcode == Opcode::Fadd
|| opcode == Opcode::Fdiv
|| opcode == Opcode::Fmax
|| opcode == Opcode::Fmin
|| opcode == Opcode::Fmul
|| opcode == Opcode::Fsub
}
InstructionData::Ternary { opcode, .. } => opcode == Opcode::Fma,