/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 6823354
* @summary These methods can be instrinsified by using bit scan, bit test, and population count instructions.
*
* @run main/othervm -Xcomp -XX:CompileOnly=Test6823354.lzcomp,Test6823354.tzcomp,.dolzcomp,.dotzcomp Test6823354
*/
public class Test6823354 {
// Arrays of corner case values.
// Load the classes and the methods.
lz();
tz();
}
// int
// Test corner cases.
int x = ia[i];
}
// Test all possible return values.
int x = 1 << i;
}
// Test Ideal optimizations (constant values).
}
// Test Ideal optimizations (constant values).
int x = 1 << i;
}
// long
// Test corner cases.
long x = la[i];
}
// Test all possible return values.
long x = 1L << i;
}
classname = "Test6823354$lzconL";
// Test Ideal optimizations (constant values).
}
// Test Ideal optimizations (constant values).
long x = 1L << i;
}
}
// int
// Test corner cases.
int x = ia[i];
}
// Test all possible return values.
int x = 1 << i;
}
// Test Ideal optimizations (constant values).
}
// Test Ideal optimizations (constant values).
int x = 1 << i;
}
// long
// Test corner cases.
long x = la[i];
}
// Test all possible return values.
long x = 1L << i;
}
classname = "Test6823354$tzconL";
// Test Ideal optimizations (constant values).
}
// Test Ideal optimizations (constant values).
long x = 1L << i;
}
}
//System.out.println(value + ": " + result + ", " + expected);
}
//System.out.println(value + ": " + result + ", " + expected);
}
}
}
r.run();
}
static final int VALUE;
static {
int value = 0;
try {
} catch (Throwable e) {}
}
}
static final long VALUE;
static {
long value = 0;
try {
} catch (Throwable e) {}
}
}
static final int VALUE;
static {
int value = 0;
try {
} catch (Throwable e) {}
}
}
static final long VALUE;
static {
long value = 0;
try {
} catch (Throwable e) {}
}
}
}