1#
2# Copyright (C) 2015 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16.class public LTest;
17
18.super Ljava/lang/Object;
19
20.method public static run()V
21   .registers 3
22   new-instance v2, Ljava/lang/String;
23   invoke-direct {v2}, Ljava/lang/String;-><init>()V
24   const/4 v0, 0
25   move v1, v0
26   :start
27   invoke-static {}, LMain;->blowup()V
28   if-ne v1, v0, :end
29   const/4 v2, 1
30   invoke-static {v2}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
31   move v2, v0
32   # The call makes v2 float type.
33   invoke-static {v2}, Ljava/lang/Float;->isNaN(F)Z
34   const/4 v1, 1
35   goto :start
36   :end
37   return-void
38.end method
39
40.method public static run2()V
41   .registers 4
42   new-instance v2, Ljava/lang/String;
43   invoke-direct {v2}, Ljava/lang/String;-><init>()V
44   const/4 v0, 0
45   move v1, v0
46   :start
47   invoke-static {}, LMain;->blowup()V
48   if-ne v1, v0, :end
49   const/4 v2, 1
50   invoke-static {v2}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
51   move-result-object v3
52   if-nez v3, :skip
53   const/4 v0, 0
54   :skip
55   # The Phi merging 0 with 0 hides the constant from the Quick compiler.
56   move v2, v0
57   # The call makes v2 float type.
58   invoke-static {v2}, Ljava/lang/Float;->isNaN(F)Z
59   const/4 v1, 1
60   goto :start
61   :end
62   return-void
63.end method
64