mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-01 23:41:03 +00:00
The i1 argument is actually named "is_zero_undef" which we want to be false.
Fixes the test failures that showed up on mac.
This commit is contained in:
parent
158db4cee1
commit
9cdfb48d0c
@ -2420,14 +2420,11 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
|||||||
}
|
}
|
||||||
Operator::I32Clz => {
|
Operator::I32Clz => {
|
||||||
let input = state.pop1()?;
|
let input = state.pop1()?;
|
||||||
let ensure_defined_zero = intrinsics
|
let is_zero_undef = intrinsics.i1_zero.as_basic_value_enum();
|
||||||
.i1_ty
|
|
||||||
.const_int(1 as u64, false)
|
|
||||||
.as_basic_value_enum();
|
|
||||||
let res = builder
|
let res = builder
|
||||||
.build_call(
|
.build_call(
|
||||||
intrinsics.ctlz_i32,
|
intrinsics.ctlz_i32,
|
||||||
&[input, ensure_defined_zero],
|
&[input, is_zero_undef],
|
||||||
&state.var_name(),
|
&state.var_name(),
|
||||||
)
|
)
|
||||||
.try_as_basic_value()
|
.try_as_basic_value()
|
||||||
@ -2437,14 +2434,11 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
|||||||
}
|
}
|
||||||
Operator::I64Clz => {
|
Operator::I64Clz => {
|
||||||
let input = state.pop1()?;
|
let input = state.pop1()?;
|
||||||
let ensure_defined_zero = intrinsics
|
let is_zero_undef = intrinsics.i1_zero.as_basic_value_enum();
|
||||||
.i1_ty
|
|
||||||
.const_int(1 as u64, false)
|
|
||||||
.as_basic_value_enum();
|
|
||||||
let res = builder
|
let res = builder
|
||||||
.build_call(
|
.build_call(
|
||||||
intrinsics.ctlz_i64,
|
intrinsics.ctlz_i64,
|
||||||
&[input, ensure_defined_zero],
|
&[input, is_zero_undef],
|
||||||
&state.var_name(),
|
&state.var_name(),
|
||||||
)
|
)
|
||||||
.try_as_basic_value()
|
.try_as_basic_value()
|
||||||
@ -2454,14 +2448,11 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
|||||||
}
|
}
|
||||||
Operator::I32Ctz => {
|
Operator::I32Ctz => {
|
||||||
let input = state.pop1()?;
|
let input = state.pop1()?;
|
||||||
let ensure_defined_zero = intrinsics
|
let is_zero_undef = intrinsics.i1_zero.as_basic_value_enum();
|
||||||
.i1_ty
|
|
||||||
.const_int(1 as u64, false)
|
|
||||||
.as_basic_value_enum();
|
|
||||||
let res = builder
|
let res = builder
|
||||||
.build_call(
|
.build_call(
|
||||||
intrinsics.cttz_i32,
|
intrinsics.cttz_i32,
|
||||||
&[input, ensure_defined_zero],
|
&[input, is_zero_undef],
|
||||||
&state.var_name(),
|
&state.var_name(),
|
||||||
)
|
)
|
||||||
.try_as_basic_value()
|
.try_as_basic_value()
|
||||||
@ -2471,14 +2462,11 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
|||||||
}
|
}
|
||||||
Operator::I64Ctz => {
|
Operator::I64Ctz => {
|
||||||
let input = state.pop1()?;
|
let input = state.pop1()?;
|
||||||
let ensure_defined_zero = intrinsics
|
let is_zero_undef = intrinsics.i1_zero.as_basic_value_enum();
|
||||||
.i1_ty
|
|
||||||
.const_int(1 as u64, false)
|
|
||||||
.as_basic_value_enum();
|
|
||||||
let res = builder
|
let res = builder
|
||||||
.build_call(
|
.build_call(
|
||||||
intrinsics.cttz_i64,
|
intrinsics.cttz_i64,
|
||||||
&[input, ensure_defined_zero],
|
&[input, is_zero_undef],
|
||||||
&state.var_name(),
|
&state.var_name(),
|
||||||
)
|
)
|
||||||
.try_as_basic_value()
|
.try_as_basic_value()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user