changeset 8200:4508b693afa6

Merge.
author Doug Simon <doug.simon@oracle.com>
date Mon, 11 Mar 2013 15:39:41 +0100
parents a68310b2b8b8 (current diff) 5619aa66aec1 (diff)
children 1c82ddf25b20
files
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/snippets/AMD64ConvertSnippets.java	Mon Mar 11 15:39:20 2013 +0100
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/snippets/AMD64ConvertSnippets.java	Mon Mar 11 15:39:41 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;