Don't swap the arguments to the select instruction.
Both WebAssembly and Cretonne use true-value, false-value.
This commit is contained in:
@@ -95,7 +95,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
|
|||||||
}
|
}
|
||||||
Operator::Select => {
|
Operator::Select => {
|
||||||
let (arg1, arg2, cond) = state.pop3();
|
let (arg1, arg2, cond) = state.pop3();
|
||||||
state.push1(builder.ins().select(cond, arg2, arg1));
|
state.push1(builder.ins().select(cond, arg1, arg2));
|
||||||
}
|
}
|
||||||
Operator::Nop => {
|
Operator::Nop => {
|
||||||
// We do nothing
|
// We do nothing
|
||||||
|
|||||||
Reference in New Issue
Block a user