1# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14#! CHECKER Check float zero 15#! RUN force_jit: true, options: "", entry: "_GLOBAL::main" 16#! EVENT /Compilation,_GLOBAL::__noinline__call_foo,.*COMPILED/ 17#! METHOD "_GLOBAL::__noinline__call_foo" 18#! PASS_AFTER "IrBuilder" 19#! INST "Constant" 20#! INST "Return" 21#! INST_NOT "ReturnI" 22#! PASS_AFTER "Codegen" 23#! INST "ReturnI" 24#! INST_NOT "Constant" 25#! INST_NOT "Return " 26 27.function f64 __noinline__call_foo(f64 a0) { 28 fldai.64 0.0 29 return.64 30} 31 32.function u1 main() { 33 fmovi.64 v0, 1.0 34 # the parameter isn't used but we need redefine d0 register 35 call __noinline__call_foo, v0 36 fmovi.64 v0, 0.0 37 fcmpl.64 v0 38 return 39} 40