use of jdk.vm.ci.code.Architecture in project graal by oracle.
the class BitOpNodesTest method testBitCountIntEmpty.
@Test
public void testBitCountIntEmpty() {
Architecture arch = getBackend().getTarget().arch;
boolean isAmd64WithPopCount = arch instanceof AMD64 && ((AMD64) arch).getFeatures().contains(AMD64.CPUFeature.POPCNT);
boolean isSparc = arch instanceof SPARC;
Assume.assumeTrue("Only works on hardware with popcnt at the moment", isAmd64WithPopCount || isSparc);
ValueNode result = parseAndInline("bitCountIntEmptySnippet");
Assert.assertEquals(StampFactory.forInteger(JavaKind.Int, 0, 24), result.stamp(NodeView.DEFAULT));
}
use of jdk.vm.ci.code.Architecture in project graal by oracle.
the class BitOpNodesTest method testBitCountInt.
@Test
public void testBitCountInt() {
Architecture arch = getBackend().getTarget().arch;
boolean isAmd64WithPopCount = arch instanceof AMD64 && ((AMD64) arch).getFeatures().contains(AMD64.CPUFeature.POPCNT);
boolean isSparc = arch instanceof SPARC;
Assume.assumeTrue("Only works on hardware with popcnt at the moment", isAmd64WithPopCount || isSparc);
ValueNode result = parseAndInline("bitCountIntSnippet");
Assert.assertEquals(StampFactory.forInteger(JavaKind.Int, 8, 24), result.stamp(NodeView.DEFAULT));
}
use of jdk.vm.ci.code.Architecture in project graal by oracle.
the class BitOpNodesTest method testBitCountLongEmpty.
@Test
public void testBitCountLongEmpty() {
Architecture arch = getBackend().getTarget().arch;
boolean isAmd64WithPopCount = arch instanceof AMD64 && ((AMD64) arch).getFeatures().contains(AMD64.CPUFeature.POPCNT);
boolean isSparc = arch instanceof SPARC;
Assume.assumeTrue("Only works on hardware with popcnt at the moment", isAmd64WithPopCount || isSparc);
ValueNode result = parseAndInline("bitCountLongEmptySnippet");
Assert.assertEquals(StampFactory.forInteger(JavaKind.Int, 0, 40), result.stamp(NodeView.DEFAULT));
}
Aggregations