Skip to content

Commit c9809bf

Browse files
committed
8289127: Apache Lucene triggers: DEBUG MESSAGE: duplicated predicate failed which is impossible
Backport-of: 4f3f74c14121d0a80f0dcf1d593b4cf1c3e4a64c
1 parent f5ee315 commit c9809bf

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* Copyright (c) 2022, Red Hat, Inc. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation.
8+
*
9+
* This code is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
* version 2 for more details (a copy is included in the LICENSE file that
13+
* accompanied this code).
14+
*
15+
* You should have received a copy of the GNU General Public License version
16+
* 2 along with this work; if not, write to the Free Software Foundation,
17+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18+
*
19+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20+
* or visit www.oracle.com if you need additional information or have any
21+
* questions.
22+
*/
23+
24+
/*
25+
* @test
26+
* @bug 8289127
27+
* @summary Apache Lucene triggers: DEBUG MESSAGE: duplicated predicate failed which is impossible
28+
* @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:-TieredCompilation TestMissedOpaqueInPredicate
29+
*/
30+
31+
public class TestMissedOpaqueInPredicate {
32+
public static void main(String[] args) {
33+
long[] tmp = new long[28];
34+
long[] longs = new long[32];
35+
for (int i = 0; i < 20_000; i++) {
36+
test(tmp, longs);
37+
}
38+
}
39+
40+
private static void test(long[] tmp, long[] longs) {
41+
for (int iter = 0, tmpIdx = 0, longsIdx = 28; iter < 4; ++iter, tmpIdx += 7, longsIdx += 1) {
42+
long l0 = tmp[tmpIdx + 0] << 12;
43+
l0 |= tmp[tmpIdx + 1] << 10;
44+
l0 |= tmp[tmpIdx + 2] << 8;
45+
l0 |= tmp[tmpIdx + 3] << 6;
46+
l0 |= tmp[tmpIdx + 4] << 4;
47+
l0 |= tmp[tmpIdx + 5] << 2;
48+
l0 |= tmp[tmpIdx + 6] << 0;
49+
longs[longsIdx + 0] = l0;
50+
}
51+
}
52+
}

0 commit comments

Comments
 (0)