changeset 1738:ffdbfdce6b92

2009-03-13 Gary Benson <gbenson@redhat.com> * ports/hotspot/src/share/vm/shark/sharkInliner.cpp (SharkInlinerHelper::is_inlinable): An ior or lor of two known non-zero values creates a known non-zero value. (transplanted from 5a1daec06e6d581f55e5ad7ce38f37a5b7c86d41)
author Gary Benson <gbenson@redhat.com>
date Fri, 13 Mar 2009 09:39:47 -0400
parents f88af1647dad
children ae9230c3f0c5
files ChangeLog ports/hotspot/src/share/vm/shark/sharkInliner.cpp
diffstat 2 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Mar 13 07:41:08 2009 -0400
+++ b/ChangeLog	Fri Mar 13 09:39:47 2009 -0400
@@ -1,3 +1,9 @@
+2009-03-13  Gary Benson  <gbenson@redhat.com>
+
+	* ports/hotspot/src/share/vm/shark/sharkInliner.cpp
+	(SharkInlinerHelper::is_inlinable): An ior or lor of two
+	known non-zero values creates a known non-zero value.
+
 2009-03-13  Gary Benson  <gbenson@redhat.com>
 
 	PR icedtea/296:
--- a/ports/hotspot/src/share/vm/shark/sharkInliner.cpp	Fri Mar 13 07:41:08 2009 -0400
+++ b/ports/hotspot/src/share/vm/shark/sharkInliner.cpp	Fri Mar 13 09:39:47 2009 -0400
@@ -513,7 +513,6 @@
     case Bytecodes::_isub:
     case Bytecodes::_imul:
     case Bytecodes::_iand:
-    case Bytecodes::_ior:
     case Bytecodes::_ixor:
     case Bytecodes::_ishl:
     case Bytecodes::_ishr:
@@ -522,6 +521,11 @@
       pop();
       push(false);
       break;
+    case Bytecodes::_ior:
+      a = pop();
+      b = pop();
+      push(a && b);
+      break;
     case Bytecodes::_idiv:
     case Bytecodes::_irem:
       if (!pop())
@@ -536,7 +540,6 @@
     case Bytecodes::_lsub:
     case Bytecodes::_lmul:
     case Bytecodes::_land:
-    case Bytecodes::_lor:
     case Bytecodes::_lxor:
       pop();
       pop();
@@ -545,6 +548,11 @@
       push(false);
       push(false);
       break;
+    case Bytecodes::_lor:
+      a = pop();
+      b = pop();
+      push(a && b);
+      break;
     case Bytecodes::_ldiv:
     case Bytecodes::_lrem:
       pop();