Skip to content

Commit

Permalink
Use complex load-extend instructions in optimize_complex_addresses; f…
Browse files Browse the repository at this point in the history
  • Loading branch information
abrown committed Apr 30, 2020
1 parent 9e9250f commit c3d8ded
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 5 deletions.
36 changes: 36 additions & 0 deletions cranelift/codegen/src/postopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,42 @@ fn optimize_complex_addresses(pos: &mut EncCursor, inst: Inst, isa: &dyn TargetI
.replace(inst)
.sload32_complex(info.flags, &args, info.offset);
}
Opcode::Uload8x8 => {
pos.func
.dfg
.replace(inst)
.uload8x8_complex(info.flags, &args, info.offset);
}
Opcode::Sload8x8 => {
pos.func
.dfg
.replace(inst)
.sload8x8_complex(info.flags, &args, info.offset);
}
Opcode::Uload16x4 => {
pos.func
.dfg
.replace(inst)
.uload16x4_complex(info.flags, &args, info.offset);
}
Opcode::Sload16x4 => {
pos.func
.dfg
.replace(inst)
.sload16x4_complex(info.flags, &args, info.offset);
}
Opcode::Uload32x2 => {
pos.func
.dfg
.replace(inst)
.uload32x2_complex(info.flags, &args, info.offset);
}
Opcode::Sload32x2 => {
pos.func
.dfg
.replace(inst)
.sload32x2_complex(info.flags, &args, info.offset);
}
Opcode::Store => {
pos.func.dfg.replace(inst).store_complex(
info.flags,
Expand Down
5 changes: 0 additions & 5 deletions tests/all/wast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ fn run_wast(wast: &str, strategy: Strategy) -> anyhow::Result<()> {
.strategy(strategy)?
.cranelift_debug_verifier(true);

// FIXME: https://github.com/bytecodealliance/wasmtime/issues/1186
if simd {
cfg.cranelift_opt_level(OptLevel::None);
}

let store = Store::new(&Engine::new(&cfg));
let mut wast_context = WastContext::new(store);
wast_context.register_spectest()?;
Expand Down

0 comments on commit c3d8ded

Please sign in to comment.