# Copyright (c) 2021-2022 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. #! CHECKER Check float zero #! RUN force_jit: true, options: "", entry: "_GLOBAL::main" #! EVENT /Compilation,_GLOBAL::__noinline__call_foo,.*COMPILED/ #! METHOD "_GLOBAL::__noinline__call_foo" #! PASS_AFTER "IrBuilder" #! INST "Constant" #! INST "Return" #! INST_NOT "ReturnI" #! PASS_AFTER "Codegen" #! INST "ReturnI" #! INST_NOT "Constant" #! INST_NOT "Return " .function f64 __noinline__call_foo(f64 a0) { fldai.64 0.0 return.64 } .function u1 main() { fmovi.64 v0, 1.0 # the parameter isn't used but we need redefine d0 register call __noinline__call_foo, v0 fmovi.64 v0, 0.0 fcmpl.64 v0 return }