# HG changeset patch # User Doug Simon # Date 1363008514 -3600 # Node ID 5619aa66aec1b5734d2a6ad568064d1d44cd21c5 # Parent 75e8020ed0f5bc75e6b80c493b303517c20f1e09 added probabilities to Convert snippets diff -r 75e8020ed0f5 -r 5619aa66aec1 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/snippets/AMD64ConvertSnippets.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/snippets/AMD64ConvertSnippets.java Mon Mar 11 12:07:28 2013 +0100 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/snippets/AMD64ConvertSnippets.java Mon Mar 11 14:28:34 2013 +0100 @@ -24,6 +24,7 @@ import static com.oracle.graal.snippets.SnippetTemplate.*; import static com.oracle.graal.snippets.SnippetTemplate.Arguments.*; +import static com.oracle.graal.snippets.nodes.BranchProbabilityNode.*; import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; @@ -58,6 +59,7 @@ @Snippet public static int f2i(@Parameter("input") float input, @Parameter("result") int result) { if (result == Integer.MIN_VALUE) { + probability(NOT_FREQUENT_PROBABILITY); if (Float.isNaN(input)) { // input is NaN -> return 0 return 0; @@ -83,6 +85,7 @@ @Snippet public static long f2l(@Parameter("input") float input, @Parameter("result") long result) { if (result == Long.MIN_VALUE) { + probability(NOT_FREQUENT_PROBABILITY); if (Float.isNaN(input)) { // input is NaN -> return 0 return 0; @@ -108,6 +111,7 @@ @Snippet public static int d2i(@Parameter("input") double input, @Parameter("result") int result) { if (result == Integer.MIN_VALUE) { + probability(NOT_FREQUENT_PROBABILITY); if (Double.isNaN(input)) { // input is NaN -> return 0 return 0; @@ -133,6 +137,7 @@ @Snippet public static long d2l(@Parameter("input") double input, @Parameter("result") long result) { if (result == Long.MIN_VALUE) { + probability(NOT_FREQUENT_PROBABILITY); if (Double.isNaN(input)) { // input is NaN -> return 0 return 0;