mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-11-26 23:42:05 +00:00
Return result directly if float cmp is called in AOT XIP (#1851)
This commit is contained in:
parent
d309091706
commit
d5aa354d41
|
@ -307,6 +307,14 @@ compile_op_float_min_max(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||||
param_types, 2, left, right)))
|
param_types, 2, left, right)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
/* The result of XIP intrinsic is 0 or 1, should return it directly */
|
||||||
|
|
||||||
|
if (comp_ctx->disable_llvm_intrinsics
|
||||||
|
&& aot_intrinsic_check_capability(comp_ctx,
|
||||||
|
is_f32 ? "f32_cmp" : "f64_cmp")) {
|
||||||
|
return cmp;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(cmp = LLVMBuildSelect(comp_ctx->builder, is_eq, tmp, cmp, "cmp"))) {
|
if (!(cmp = LLVMBuildSelect(comp_ctx->builder, is_eq, tmp, cmp, "cmp"))) {
|
||||||
aot_set_last_error("llvm build select fail.");
|
aot_set_last_error("llvm build select fail.");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user