1 /*
2  * Copyright (C) 2017 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 
17 public class Main {
18 
main(String[] args)19   public static void main(String[] args) {
20     System.out.println("passed");
21   }
22 
23   /// CHECK-START-ARM64: void Main.test() disassembly (after)
24   /// CHECK: InvokeStaticOrDirect method_name:java.lang.System.arraycopy intrinsic:SystemArrayCopy
25   /// CHECK-NOT:    blr
26   /// CHECK: ReturnVoid
27 
test()28   static void test() {
29     Object[] src = new Object[1024];
30     Object[] dst = new Object[2048];
31     // The length of the copied data must not be too large (smaller
32     // than kSystemArrayCopyThreshold = 128) for the call to
33     // System.arraycopy to be intrinsified.
34     System.arraycopy(src, 0, dst, 1024, 64);
35   }
36 
37 }
38