mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-27 04:00:37 +00:00
!9691 label release bug
Merge pull request !9691 from transparent123123/tzr_label_bug
This commit is contained in:
commit
33dabe0f4f
@ -679,8 +679,9 @@ GateRef TypedNativeInlineLowering::BuildDoubleAbs(GateRef value)
|
||||
GateRef TypedNativeInlineLowering::BuildTNumberAbs(GateRef param)
|
||||
{
|
||||
ASSERT(!acc_.GetGateType(param).IsNJSValueType());
|
||||
Label entry(&builder_);
|
||||
builder_.SubCfgEntry(&entry);
|
||||
DEFVALUE(result, (&builder_), VariableType::JS_ANY(), builder_.HoleConstant());
|
||||
|
||||
Label exit(&builder_);
|
||||
Label isInt(&builder_);
|
||||
Label notInt(&builder_);
|
||||
@ -713,7 +714,9 @@ GateRef TypedNativeInlineLowering::BuildTNumberAbs(GateRef param)
|
||||
builder_.Jump(&exit);
|
||||
}
|
||||
builder_.Bind(&exit);
|
||||
return *result;
|
||||
GateRef res = *result;
|
||||
builder_.SubCfgExit();
|
||||
return res;
|
||||
}
|
||||
|
||||
void TypedNativeInlineLowering::LowerAbs(GateRef gate)
|
||||
|
@ -346,6 +346,7 @@ group("ark_aot_ts_test") {
|
||||
"sendable",
|
||||
"webkit_call_convention",
|
||||
"retype_isnan",
|
||||
"inline_abs",
|
||||
]
|
||||
|
||||
if (!is_debug) {
|
||||
|
20
test/aottest/inline_abs/BUILD.gn
Normal file
20
test/aottest/inline_abs/BUILD.gn
Normal file
@ -0,0 +1,20 @@
|
||||
# Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//arkcompiler/ets_runtime/test/test_helper.gni")
|
||||
|
||||
host_aot_test_action("inline_abs") {
|
||||
deps = []
|
||||
is_enable_pgo = true
|
||||
is_enable_opt_inlining = true
|
||||
}
|
14
test/aottest/inline_abs/expect_output.txt
Normal file
14
test/aottest/inline_abs/expect_output.txt
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
true
|
29
test/aottest/inline_abs/inline_abs.ts
Normal file
29
test/aottest/inline_abs/inline_abs.ts
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
declare interface ArkTools {
|
||||
isAOTCompiled(args: any): boolean;
|
||||
}
|
||||
|
||||
declare function print(arg:any):string;
|
||||
function test(x, y): void {
|
||||
var ret = Math.sqrt(Math.abs(x));
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (var i = 0; i < 100000; i++) {
|
||||
test(3, 5);
|
||||
}
|
||||
print(ArkTools.isAOTCompiled(test));
|
14
test/aottest/inline_abs/pgo_expect_output.txt
Normal file
14
test/aottest/inline_abs/pgo_expect_output.txt
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
false
|
Loading…
Reference in New Issue
Block a user