1 # Copyright 2018 The Android Open Source Project 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 .class LMain2; 16 .super Ljava/lang/Object; 17 .source "Main2.java" 18 19 20 # direct methods 21 .method constructor <init>()V 22 .registers 1 23 24 .prologue 25 .line 17 26 invoke-direct {p0}, Ljava/lang/Object;-><init>()V 27 28 return-void 29 .end method 30 31 ## CHECK-START: void Main2.testArraySimpleRemove() instruction_simplifier (before) 32 ## CHECK: CheckCast 33 34 ## CHECK-START: void Main2.testArraySimpleRemove() instruction_simplifier (after) 35 ## CHECK-NOT: CheckCast 36 37 .method static testArraySimpleRemove()V 38 .registers 3 39 40 .prologue 41 .line 19 42 const/16 v2, 0xa 43 44 new-array v0, v2, [LSubclassA; 45 46 .local v0, "b":[LSuper; 47 move-object v1, v0 48 49 .line 20 50 check-cast v1, [LSubclassA; 51 52 .line 21 53 .local v1, "c":[LSubclassA; 54 return-void 55 .end method 56