Mercurial > hg > graal-compiler
annotate test/compiler/6875866/Test.java @ 13986:bad45cad79ae
Truffle: Cleaned depracated API usage.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 20 Feb 2014 01:52:58 +0100 |
parents | c18cbe5936b8 |
children |
rev | line source |
---|---|
986
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
1 /* |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
986
diff
changeset
|
2 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. |
986
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
4 * |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
8 * |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
13 * accompanied this code). |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
14 * |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
18 * |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
986
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
986
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
986
diff
changeset
|
21 * questions. |
986
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
22 */ |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
23 |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
24 /** |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
25 * @test |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
26 * @bug 6875866 |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
27 * @summary Intrinsic for String.indexOf() is broken on x86 with SSE4.2 |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
28 * |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
29 * @run main/othervm -Xcomp Test |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
30 */ |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
31 |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
32 public class Test { |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
33 |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
34 static int IndexOfTest(String str) { |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
35 return str.indexOf("11111xx1x"); |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
36 } |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
37 |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
38 public static void main(String args[]) { |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
39 String str = "11111xx11111xx1x"; |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
40 int idx = IndexOfTest(str); |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
41 System.out.println("IndexOf = " + idx); |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
42 if (idx != 7) { |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
43 System.exit(97); |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
44 } |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
45 } |
62001a362ce9
6827605: new String intrinsics may prevent EA scalar replacement
kvn
parents:
diff
changeset
|
46 } |