changeset 7451:214d70baa4db

Merge
author drchase
date Wed, 26 Nov 2014 20:38:10 -0500
parents a5040fddd180 c13eb14ebf5c
children 742c0430bb20 674657ff61c6 b6fe66681496 9cc45ff7c3cc
files src/share/vm/prims/whitebox.cpp test/compiler/5057225/Test5057225.java test/compiler/5091921/Test5091921.java test/compiler/5091921/Test6186134.java test/compiler/5091921/Test6196102.java test/compiler/5091921/Test6357214.java test/compiler/5091921/Test6559156.java test/compiler/5091921/Test6753639.java test/compiler/5091921/Test6850611.java test/compiler/5091921/Test6890943.java test/compiler/5091921/Test6897150.java test/compiler/5091921/Test6905845.java test/compiler/5091921/Test6931567.java test/compiler/5091921/Test6935022.java test/compiler/5091921/Test6959129.java test/compiler/5091921/Test6985295.java test/compiler/5091921/Test6992759.java test/compiler/5091921/Test7005594.java test/compiler/5091921/Test7005594.sh test/compiler/5091921/Test7020614.java test/compiler/5091921/input6890943.txt test/compiler/5091921/output6890943.txt test/compiler/6340864/TestByteVect.java test/compiler/6340864/TestDoubleVect.java test/compiler/6340864/TestFloatVect.java test/compiler/6340864/TestIntVect.java test/compiler/6340864/TestLongVect.java test/compiler/6340864/TestShortVect.java test/compiler/6378821/Test6378821.java test/compiler/6431242/Test.java test/compiler/6443505/Test6443505.java test/compiler/6478991/NullCheckTest.java test/compiler/6539464/Test.java test/compiler/6579789/Test6579789.java test/compiler/6589834/InlinedArrayCloneTestCase.java test/compiler/6589834/Test_ia32.java test/compiler/6603011/Test.java test/compiler/6636138/Test1.java test/compiler/6636138/Test2.java test/compiler/6646019/Test.java test/compiler/6646020/Tester.java test/compiler/6659207/Test.java test/compiler/6661247/Test.java test/compiler/6663621/IVTest.java test/compiler/6663848/Tester.java test/compiler/6663854/Test6663854.java test/compiler/6689060/Test.java test/compiler/6695810/Test.java test/compiler/6700047/Test6700047.java test/compiler/6711100/Test.java test/compiler/6711117/Test.java test/compiler/6712835/Test6712835.java test/compiler/6714694/Tester.java test/compiler/6716441/Tester.java test/compiler/6724218/Test.java test/compiler/6726999/Test.java test/compiler/6732154/Test6732154.java test/compiler/6741738/Tester.java test/compiler/6756768/Test6756768.java test/compiler/6756768/Test6756768_2.java test/compiler/6757316/Test6757316.java test/compiler/6758234/Test6758234.java test/compiler/6769124/TestArrayCopy6769124.java test/compiler/6769124/TestDeoptInt6769124.java test/compiler/6769124/TestUnalignedLoad6769124.java test/compiler/6772683/InterruptedTest.java test/compiler/6775880/Test.java test/compiler/6778657/Test.java test/compiler/6792161/Test6792161.java test/compiler/6795161/Test.java test/compiler/6795362/Test6795362.java test/compiler/6795465/Test6795465.java test/compiler/6796786/Test6796786.java test/compiler/6797305/Test6797305.java test/compiler/6799693/Test.java test/compiler/6800154/Test6800154.java test/compiler/6805724/Test6805724.java test/compiler/6814842/Test6814842.java test/compiler/6823354/Test6823354.java test/compiler/6823453/Test.java test/compiler/6826736/Test.java test/compiler/6832293/Test.java test/compiler/6833129/Test.java test/compiler/6837011/Test6837011.java test/compiler/6837094/Test.java test/compiler/6843752/Test.java test/compiler/6849574/Test.java test/compiler/6851282/Test.java test/compiler/6852078/Test6852078.java test/compiler/6855164/Test.java test/compiler/6855215/Test6855215.java test/compiler/6857159/Test6857159.java test/compiler/6857159/Test6857159.sh test/compiler/6859338/Test6859338.java test/compiler/6860469/Test.java test/compiler/6863155/Test6863155.java test/compiler/6863420/Test.java test/compiler/6865031/Test.java test/compiler/6865265/StackOverflowBug.java test/compiler/6866651/Test.java test/compiler/6875866/Test.java test/compiler/6877254/Test.java test/compiler/6879902/Test6879902.java test/compiler/6880034/Test6880034.java test/compiler/6885584/Test6885584.java test/compiler/6891750/Test6891750.java test/compiler/6892265/Test.java test/compiler/6894807/IsInstanceTest.java test/compiler/6894807/Test6894807.sh test/compiler/6895383/Test.java test/compiler/6896617/Test6896617.java test/compiler/6896727/Test.java test/compiler/6901572/Test.java test/compiler/6909839/Test6909839.java test/compiler/6910484/Test.java test/compiler/6910605/Test.java test/compiler/6910618/Test.java test/compiler/6912517/Test.java test/compiler/6916644/Test6916644.java test/compiler/6921969/TestMultiplyLongHiZero.java test/compiler/6930043/Test6930043.java test/compiler/6932496/Test6932496.java test/compiler/6934604/TestByteBoxing.java test/compiler/6934604/TestDoubleBoxing.java test/compiler/6934604/TestFloatBoxing.java test/compiler/6934604/TestIntBoxing.java test/compiler/6934604/TestLongBoxing.java test/compiler/6934604/TestShortBoxing.java test/compiler/6935535/Test.java test/compiler/6942326/Test.java test/compiler/6946040/TestCharShortByteSwap.java test/compiler/6956668/Test6956668.java test/compiler/6958485/Test.java test/compiler/6968348/Test6968348.java test/compiler/6973329/Test.java test/compiler/6982370/Test6982370.java test/compiler/6990212/Test6990212.java test/compiler/7002666/Test7002666.java test/compiler/7009231/Test7009231.java test/compiler/7009359/Test7009359.java test/compiler/7017746/Test.java test/compiler/7024475/Test7024475.java test/compiler/7029152/Test.java test/compiler/7041100/Test7041100.java test/compiler/7042153/Test7042153.java test/compiler/7044738/Test7044738.java test/compiler/7046096/Test7046096.java test/compiler/7047069/Test7047069.java test/compiler/7048332/Test7048332.java test/compiler/7052494/Test7052494.java test/compiler/7068051/Test7068051.java test/compiler/7070134/Stemmer.java test/compiler/7070134/Test7070134.sh test/compiler/7070134/words test/compiler/7082949/Test7082949.java test/compiler/7088020/Test7088020.java test/compiler/7088419/CRCTest.java test/compiler/7090976/Test7090976.java test/compiler/7100757/Test7100757.java test/compiler/7103261/Test7103261.java test/compiler/7110586/Test7110586.java test/compiler/7116216/LargeFrame.java test/compiler/7116216/StackOverflow.java test/compiler/7119644/TestBooleanVect.java test/compiler/7119644/TestByteDoubleVect.java test/compiler/7119644/TestByteFloatVect.java test/compiler/7119644/TestByteIntVect.java test/compiler/7119644/TestByteLongVect.java test/compiler/7119644/TestByteShortVect.java test/compiler/7119644/TestByteVect.java test/compiler/7119644/TestCharShortVect.java test/compiler/7119644/TestCharVect.java test/compiler/7119644/TestDoubleVect.java test/compiler/7119644/TestFloatDoubleVect.java test/compiler/7119644/TestFloatVect.java test/compiler/7119644/TestIntDoubleVect.java test/compiler/7119644/TestIntFloatVect.java test/compiler/7119644/TestIntLongVect.java test/compiler/7119644/TestIntVect.java test/compiler/7119644/TestLongDoubleVect.java test/compiler/7119644/TestLongFloatVect.java test/compiler/7119644/TestLongVect.java test/compiler/7119644/TestShortDoubleVect.java test/compiler/7119644/TestShortFloatVect.java test/compiler/7119644/TestShortIntVect.java test/compiler/7119644/TestShortLongVect.java test/compiler/7119644/TestShortVect.java test/compiler/7123108/Test7123108.java test/compiler/7125879/Test7125879.java test/compiler/7141637/SpreadNullArg.java test/compiler/7160610/Test7160610.java test/compiler/7169782/Test7169782.java test/compiler/7174363/Test7174363.java test/compiler/7177917/Test7177917.java test/compiler/7179138/Test7179138_1.java test/compiler/7179138/Test7179138_2.java test/compiler/7184394/TestAESBase.java test/compiler/7184394/TestAESDecode.java test/compiler/7184394/TestAESEncode.java test/compiler/7184394/TestAESMain.java test/compiler/7190310/Test7190310.java test/compiler/7190310/Test7190310_unsafe.java test/compiler/7192963/TestByteVect.java test/compiler/7192963/TestDoubleVect.java test/compiler/7192963/TestFloatVect.java test/compiler/7192963/TestIntVect.java test/compiler/7192963/TestLongVect.java test/compiler/7192963/TestShortVect.java test/compiler/7196199/Test7196199.java test/compiler/7199742/Test7199742.java test/compiler/7200264/Test7200264.sh test/compiler/7200264/TestIntVect.java test/compiler/8000805/Test8000805.java test/compiler/8001183/TestCharVect.java test/compiler/8002069/Test8002069.java test/compiler/8004051/Test8004051.java test/compiler/8004741/Test8004741.java test/compiler/8004867/TestIntAtomicCAS.java test/compiler/8004867/TestIntAtomicOrdered.java test/compiler/8004867/TestIntAtomicVolatile.java test/compiler/8004867/TestIntUnsafeCAS.java test/compiler/8004867/TestIntUnsafeOrdered.java test/compiler/8004867/TestIntUnsafeVolatile.java test/compiler/8005033/Test8005033.java test/compiler/8005419/Test8005419.java test/compiler/8005956/PolynomialRoot.java test/compiler/8007294/Test8007294.java test/compiler/8007722/Test8007722.java test/compiler/8009761/Test8009761.java test/compiler/8010927/Test8010927.java test/compiler/8011706/Test8011706.java test/compiler/8011771/Test8011771.java test/compiler/8011901/Test8011901.java test/compiler/8015436/Test8015436.java test/compiler/EliminateAutoBox/UnsignedLoads.java test/compiler/EscapeAnalysis/Test8020215.java test/compiler/EscapeAnalysis/TestAllocatedEscapesPtrComparison.java test/compiler/EscapeAnalysis/TestUnsafePutAddressNullObjMustNotEscape.java test/compiler/IntegerArithmetic/TestIntegerComparison.java test/testlibrary/whitebox/sun/hotspot/WhiteBox.java
diffstat 516 files changed, 164123 insertions(+), 163707 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/ci/ciEnv.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/ci/ciEnv.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -53,6 +53,7 @@
 #include "runtime/reflection.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/thread.inline.hpp"
+#include "trace/tracing.hpp"
 #include "utilities/dtrace.hpp"
 #include "utilities/macros.hpp"
 #ifdef COMPILER1
@@ -1141,6 +1142,16 @@
   }
 }
 
+void ciEnv::report_failure(const char* reason) {
+  // Create and fire JFR event
+  EventCompilerFailure event;
+  if (event.should_commit()) {
+    event.set_compileID(compile_id());
+    event.set_failure(reason);
+    event.commit();
+  }
+}
+
 // ------------------------------------------------------------------
 // ciEnv::record_method_not_compilable()
 void ciEnv::record_method_not_compilable(const char* reason, bool all_tiers) {
--- a/src/share/vm/ci/ciEnv.hpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/ci/ciEnv.hpp	Wed Nov 26 20:38:10 2014 -0500
@@ -450,7 +450,8 @@
   // Check for changes to the system dictionary during compilation
   bool system_dictionary_modification_counter_changed();
 
-  void record_failure(const char* reason);
+  void record_failure(const char* reason);      // Record failure and report later
+  void report_failure(const char* reason);      // Report failure immediately
   void record_method_not_compilable(const char* reason, bool all_tiers = true);
   void record_out_of_memory_failure();
 
--- a/src/share/vm/ci/ciTypeFlow.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/ci/ciTypeFlow.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -35,6 +35,7 @@
 #include "interpreter/bytecode.hpp"
 #include "interpreter/bytecodes.hpp"
 #include "memory/allocation.inline.hpp"
+#include "opto/compile.hpp"
 #include "runtime/deoptimization.hpp"
 #include "utilities/growableArray.hpp"
 
@@ -2646,7 +2647,7 @@
       assert (!blk->has_pre_order(), "");
       blk->set_next_pre_order();
 
-      if (_next_pre_order >= MaxNodeLimit / 2) {
+      if (_next_pre_order >= (int)Compile::current()->max_node_limit() / 2) {
         // Too many basic blocks.  Bail out.
         // This can happen when try/finally constructs are nested to depth N,
         // and there is O(2**N) cloning of jsr bodies.  See bug 4697245!
--- a/src/share/vm/code/dependencies.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/code/dependencies.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -912,6 +912,8 @@
   bool is_witness(Klass* k) {
     if (doing_subtype_search()) {
       return Dependencies::is_concrete_klass(k);
+    } else if (!k->oop_is_instance()) {
+      return false; // no methods to find in an array type
     } else {
       Method* m = InstanceKlass::cast(k)->find_method(_name, _signature);
       if (m == NULL || !Dependencies::is_concrete_method(m))  return false;
@@ -1118,7 +1120,7 @@
   Klass* chain;       // scratch variable
 #define ADD_SUBCLASS_CHAIN(k)                     {  \
     assert(chaini < CHAINMAX, "oob");                \
-    chain = InstanceKlass::cast(k)->subklass();      \
+    chain = k->subklass();                           \
     if (chain != NULL)  chains[chaini++] = chain;    }
 
   // Look for non-abstract subclasses.
@@ -1129,35 +1131,37 @@
   // (Their subclasses are additional indirect implementors.
   // See InstanceKlass::add_implementor.)
   // (Note:  nof_implementors is always zero for non-interfaces.)
-  int nof_impls = InstanceKlass::cast(context_type)->nof_implementors();
-  if (nof_impls > 1) {
-    // Avoid this case: *I.m > { A.m, C }; B.m > C
-    // Here, I.m has 2 concrete implementations, but m appears unique
-    // as A.m, because the search misses B.m when checking C.
-    // The inherited method B.m was getting missed by the walker
-    // when interface 'I' was the starting point.
-    // %%% Until this is fixed more systematically, bail out.
-    // (Old CHA had the same limitation.)
-    return context_type;
-  }
-  if (nof_impls > 0) {
-    Klass* impl = InstanceKlass::cast(context_type)->implementor();
-    assert(impl != NULL, "just checking");
-    // If impl is the same as the context_type, then more than one
-    // implementor has seen. No exact info in this case.
-    if (impl == context_type) {
-      return context_type;  // report an inexact witness to this sad affair
+  if (top_level_call) {
+    int nof_impls = InstanceKlass::cast(context_type)->nof_implementors();
+    if (nof_impls > 1) {
+      // Avoid this case: *I.m > { A.m, C }; B.m > C
+      // Here, I.m has 2 concrete implementations, but m appears unique
+      // as A.m, because the search misses B.m when checking C.
+      // The inherited method B.m was getting missed by the walker
+      // when interface 'I' was the starting point.
+      // %%% Until this is fixed more systematically, bail out.
+      // (Old CHA had the same limitation.)
+      return context_type;
     }
-    if (do_counts)
-      { NOT_PRODUCT(deps_find_witness_steps++); }
-    if (is_participant(impl)) {
-      if (!participants_hide_witnesses) {
+    if (nof_impls > 0) {
+      Klass* impl = InstanceKlass::cast(context_type)->implementor();
+      assert(impl != NULL, "just checking");
+      // If impl is the same as the context_type, then more than one
+      // implementor has seen. No exact info in this case.
+      if (impl == context_type) {
+        return context_type;  // report an inexact witness to this sad affair
+      }
+      if (do_counts)
+        { NOT_PRODUCT(deps_find_witness_steps++); }
+      if (is_participant(impl)) {
+        if (!participants_hide_witnesses) {
+          ADD_SUBCLASS_CHAIN(impl);
+        }
+      } else if (is_witness(impl) && !ignore_witness(impl)) {
+        return impl;
+      } else {
         ADD_SUBCLASS_CHAIN(impl);
       }
-    } else if (is_witness(impl) && !ignore_witness(impl)) {
-      return impl;
-    } else {
-      ADD_SUBCLASS_CHAIN(impl);
     }
   }
 
--- a/src/share/vm/compiler/compileBroker.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/compiler/compileBroker.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -594,7 +594,7 @@
  * Add a CompileTask to a CompileQueue.
  */
 void CompileQueue::add(CompileTask* task) {
-  assert(lock()->owned_by_self(), "must own lock");
+  assert(MethodCompileQueue_lock->owned_by_self(), "must own lock");
 
   task->set_next(NULL);
   task->set_prev(NULL);
@@ -625,7 +625,7 @@
   }
 
   // Notify CompilerThreads that a task is available.
-  lock()->notify_all();
+  MethodCompileQueue_lock->notify_all();
 }
 
 /**
@@ -635,7 +635,7 @@
  * compilation is disabled.
  */
 void CompileQueue::free_all() {
-  MutexLocker mu(lock());
+  MutexLocker mu(MethodCompileQueue_lock);
   CompileTask* next = _first;
 
   // Iterate over all tasks in the compile queue
@@ -653,14 +653,14 @@
   _first = NULL;
 
   // Wake up all threads that block on the queue.
-  lock()->notify_all();
+  MethodCompileQueue_lock->notify_all();
 }
 
 /**
  * Get the next CompileTask from a CompileQueue
  */
 CompileTask* CompileQueue::get() {
-  MutexLocker locker(lock());
+  MutexLocker locker(MethodCompileQueue_lock);
   // If _first is NULL we have no more compile jobs. There are two reasons for
   // having no compile jobs: First, we compiled everything we wanted. Second,
   // we ran out of code cache so compilation has been disabled. In the latter
@@ -681,7 +681,7 @@
     // We need a timed wait here, since compiler threads can exit if compilation
     // is disabled forever. We use 5 seconds wait time; the exiting of compiler threads
     // is not critical and we do not want idle compiler threads to wake up too often.
-    lock()->wait(!Mutex::_no_safepoint_check_flag, 5*1000);
+    MethodCompileQueue_lock->wait(!Mutex::_no_safepoint_check_flag, 5*1000);
   }
 
   if (CompileBroker::is_compilation_disabled_forever()) {
@@ -701,7 +701,7 @@
 // Clean & deallocate stale compile tasks.
 // Temporarily releases MethodCompileQueue lock.
 void CompileQueue::purge_stale_tasks() {
-  assert(lock()->owned_by_self(), "must own lock");
+  assert(MethodCompileQueue_lock->owned_by_self(), "must own lock");
   if (_first_stale != NULL) {
     // Stale tasks are purged when MCQ lock is released,
     // but _first_stale updates are protected by MCQ lock.
@@ -710,7 +710,7 @@
     CompileTask* head = _first_stale;
     _first_stale = NULL;
     {
-      MutexUnlocker ul(lock());
+      MutexUnlocker ul(MethodCompileQueue_lock);
       for (CompileTask* task = head; task != NULL; ) {
         CompileTask* next_task = task->next();
         CompileTaskWrapper ctw(task); // Frees the task
@@ -722,7 +722,7 @@
 }
 
 void CompileQueue::remove(CompileTask* task) {
-   assert(lock()->owned_by_self(), "must own lock");
+   assert(MethodCompileQueue_lock->owned_by_self(), "must own lock");
   if (task->prev() != NULL) {
     task->prev()->set_next(task->next());
   } else {
@@ -742,7 +742,7 @@
 }
 
 void CompileQueue::remove_and_mark_stale(CompileTask* task) {
-  assert(lock()->owned_by_self(), "must own lock");
+  assert(MethodCompileQueue_lock->owned_by_self(), "must own lock");
   remove(task);
 
   // Enqueue the task for reclamation (should be done outside MCQ lock)
@@ -780,7 +780,7 @@
 }
 
 void CompileQueue::print(outputStream* st) {
-  assert(lock()->owned_by_self(), "must own lock");
+  assert(MethodCompileQueue_lock->owned_by_self(), "must own lock");
   st->print_cr("Contents of %s", name());
   st->print_cr("----------------------------");
   CompileTask* task = _first;
@@ -1066,11 +1066,11 @@
 #endif // !ZERO && !SHARK
   // Initialize the compilation queue
   if (c2_compiler_count > 0) {
-    _c2_compile_queue  = new CompileQueue("C2 compile queue",  MethodCompileQueue_lock);
+    _c2_compile_queue  = new CompileQueue("C2 compile queue");
     _compilers[1]->set_num_compiler_threads(c2_compiler_count);
   }
   if (c1_compiler_count > 0) {
-    _c1_compile_queue  = new CompileQueue("C1 compile queue",  MethodCompileQueue_lock);
+    _c1_compile_queue  = new CompileQueue("C1 compile queue");
     _compilers[0]->set_num_compiler_threads(c1_compiler_count);
   }
 
@@ -1214,7 +1214,7 @@
 
   // Acquire our lock.
   {
-    MutexLocker locker(queue->lock(), thread);
+    MutexLocker locker(MethodCompileQueue_lock, thread);
 
     // Make sure the method has not slipped into the queues since
     // last we checked; note that those checks were "fast bail-outs".
@@ -1807,7 +1807,7 @@
                      os::file_separator(), thread_id, os::current_process_id());
       }
 
-      fp = fopen(file_name, "at");
+      fp = fopen(file_name, "wt");
       if (fp != NULL) {
         if (LogCompilation && Verbose) {
           tty->print_cr("Opening compilation log %s", file_name);
@@ -1985,6 +1985,7 @@
 
     if (ci_env.failing()) {
       task->set_failure_reason(ci_env.failure_reason());
+      ci_env.report_failure(ci_env.failure_reason());
       const char* retry_message = ci_env.retry_message();
       if (_compilation_log != NULL) {
         _compilation_log->log_failure(thread, task, ci_env.failure_reason(), retry_message);
--- a/src/share/vm/compiler/compileBroker.hpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/compiler/compileBroker.hpp	Wed Nov 26 20:38:10 2014 -0500
@@ -195,7 +195,6 @@
 class CompileQueue : public CHeapObj<mtCompiler> {
  private:
   const char* _name;
-  Monitor*    _lock;
 
   CompileTask* _first;
   CompileTask* _last;
@@ -206,9 +205,8 @@
 
   void purge_stale_tasks();
  public:
-  CompileQueue(const char* name, Monitor* lock) {
+  CompileQueue(const char* name) {
     _name = name;
-    _lock = lock;
     _first = NULL;
     _last = NULL;
     _size = 0;
@@ -216,7 +214,6 @@
   }
 
   const char*  name() const                      { return _name; }
-  Monitor*     lock() const                      { return _lock; }
 
   void         add(CompileTask* task);
   void         remove(CompileTask* task);
@@ -418,6 +415,7 @@
     shutdown_compilaton = 2
   };
 
+  static jint get_compilation_activity_mode() { return _should_compile_new_jobs; }
   static bool should_compile_new_jobs() { return UseCompiler && (_should_compile_new_jobs == run_compilation); }
   static bool set_should_compile_new_jobs(jint new_state) {
     // Return success if the current caller set it
--- a/src/share/vm/compiler/compileLog.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/compiler/compileLog.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -56,8 +56,10 @@
 }
 
 CompileLog::~CompileLog() {
-  delete _out;
+  delete _out; // Close fd in fileStream::~fileStream()
   _out = NULL;
+  // Remove partial file after merging in CompileLog::finish_log_on_error
+  unlink(_file);
   FREE_C_HEAP_ARRAY(char, _identities, mtCompiler);
   FREE_C_HEAP_ARRAY(char, _file, mtCompiler);
 }
@@ -278,10 +280,9 @@
       }
       file->print_raw_cr("</compilation_log>");
       close(partial_fd);
-      unlink(partial_file);
     }
     CompileLog* next_log = log->_next;
-    delete log;
+    delete log; // Removes partial file
     log = next_log;
   }
   _first = NULL;
--- a/src/share/vm/opto/c2_globals.hpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/c2_globals.hpp	Wed Nov 26 20:38:10 2014 -0500
@@ -647,7 +647,7 @@
   develop(bool, AlwaysIncrementalInline, false,                             \
           "do all inlining incrementally")                                  \
                                                                             \
-  product(intx, LiveNodeCountInliningCutoff, 20000,                         \
+  product(intx, LiveNodeCountInliningCutoff, 40000,                         \
           "max number of live nodes in a method")                           \
                                                                             \
   diagnostic(bool, OptimizeExpensiveOps, true,                              \
--- a/src/share/vm/opto/c2compiler.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/c2compiler.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -102,23 +102,25 @@
     // Attempt to compile while subsuming loads into machine instructions.
     Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis, eliminate_boxing);
 
-
     // Check result and retry if appropriate.
     if (C.failure_reason() != NULL) {
       if (C.failure_reason_is(retry_no_subsuming_loads())) {
         assert(subsume_loads, "must make progress");
         subsume_loads = false;
+        env->report_failure(C.failure_reason());
         continue;  // retry
       }
       if (C.failure_reason_is(retry_no_escape_analysis())) {
         assert(do_escape_analysis, "must make progress");
         do_escape_analysis = false;
+        env->report_failure(C.failure_reason());
         continue;  // retry
       }
       if (C.has_boxed_value()) {
         // Recompile without boxing elimination regardless failure reason.
         assert(eliminate_boxing, "must make progress");
         eliminate_boxing = false;
+        env->report_failure(C.failure_reason());
         continue;  // retry
       }
       // Pass any other failure reason up to the ciEnv.
--- a/src/share/vm/opto/castnode.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/castnode.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -83,6 +83,101 @@
   return this;
 }
 
+uint CastIINode::size_of() const {
+  return sizeof(*this);
+}
+
+uint CastIINode::cmp(const Node &n) const {
+  return TypeNode::cmp(n) && ((CastIINode&)n)._carry_dependency == _carry_dependency;
+}
+
+Node *CastIINode::Identity(PhaseTransform *phase) {
+  if (_carry_dependency) {
+    return this;
+  }
+  return ConstraintCastNode::Identity(phase);
+}
+
+const Type *CastIINode::Value(PhaseTransform *phase) const {
+  const Type *res = ConstraintCastNode::Value(phase);
+
+  // Try to improve the type of the CastII if we recognize a CmpI/If
+  // pattern.
+  if (_carry_dependency) {
+    if (in(0) != NULL && (in(0)->is_IfFalse() || in(0)->is_IfTrue())) {
+      Node* proj = in(0);
+      if (proj->in(0)->in(1)->is_Bool()) {
+        Node* b = proj->in(0)->in(1);
+        if (b->in(1)->Opcode() == Op_CmpI) {
+          Node* cmp = b->in(1);
+          if (cmp->in(1) == in(1) && phase->type(cmp->in(2))->isa_int()) {
+            const TypeInt* in2_t = phase->type(cmp->in(2))->is_int();
+            const Type* t = TypeInt::INT;
+            BoolTest test = b->as_Bool()->_test;
+            if (proj->is_IfFalse()) {
+              test = test.negate();
+            }
+            BoolTest::mask m = test._test;
+            jlong lo_long = min_jint;
+            jlong hi_long = max_jint;
+            if (m == BoolTest::le || m == BoolTest::lt) {
+              hi_long = in2_t->_hi;
+              if (m == BoolTest::lt) {
+                hi_long -= 1;
+              }
+            } else if (m == BoolTest::ge || m == BoolTest::gt) {
+              lo_long = in2_t->_lo;
+              if (m == BoolTest::gt) {
+                lo_long += 1;
+              }
+            } else if (m == BoolTest::eq) {
+              lo_long = in2_t->_lo;
+              hi_long = in2_t->_hi;
+            } else if (m == BoolTest::ne) {
+              // can't do any better
+            } else {
+              stringStream ss;
+              test.dump_on(&ss);
+              fatal(err_msg_res("unexpected comparison %s", ss.as_string()));
+            }
+            int lo_int = (int)lo_long;
+            int hi_int = (int)hi_long;
+
+            if (lo_long != (jlong)lo_int) {
+              lo_int = min_jint;
+            }
+            if (hi_long != (jlong)hi_int) {
+              hi_int = max_jint;
+            }
+
+            t = TypeInt::make(lo_int, hi_int, Type::WidenMax);
+
+            res = res->filter_speculative(t);
+
+            return res;
+          }
+        }
+      }
+    }
+  }
+  return res;
+}
+
+Node *CastIINode::Ideal_DU_postCCP(PhaseCCP *ccp) {
+  if (_carry_dependency) {
+    return NULL;
+  }
+  return ConstraintCastNode::Ideal_DU_postCCP(ccp);
+}
+
+#ifndef PRODUCT
+void CastIINode::dump_spec(outputStream *st) const {
+  TypeNode::dump_spec(st);
+  if (_carry_dependency) {
+    st->print(" carry dependency");
+  }
+}
+#endif
 
 //=============================================================================
 
--- a/src/share/vm/opto/castnode.hpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/castnode.hpp	Wed Nov 26 20:38:10 2014 -0500
@@ -48,10 +48,25 @@
 //------------------------------CastIINode-------------------------------------
 // cast integer to integer (different range)
 class CastIINode: public ConstraintCastNode {
+  private:
+  // Can this node be removed post CCP or does it carry a required dependency?
+  const bool _carry_dependency;
+
+  protected:
+  virtual uint cmp( const Node &n ) const;
+  virtual uint size_of() const;
+
   public:
-  CastIINode (Node *n, const Type *t ): ConstraintCastNode(n,t) {}
+  CastIINode(Node *n, const Type *t, bool carry_dependency = false)
+    : ConstraintCastNode(n,t), _carry_dependency(carry_dependency) {}
   virtual int Opcode() const;
   virtual uint ideal_reg() const { return Op_RegI; }
+  virtual Node *Identity( PhaseTransform *phase );
+  virtual const Type *Value( PhaseTransform *phase ) const;
+  virtual Node *Ideal_DU_postCCP( PhaseCCP * );
+#ifndef PRODUCT
+  virtual void dump_spec(outputStream *st) const;
+#endif
 };
 
 //------------------------------CastPPNode-------------------------------------
--- a/src/share/vm/opto/compile.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/compile.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -67,7 +67,6 @@
 #include "runtime/signature.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "runtime/timer.hpp"
-#include "trace/tracing.hpp"
 #include "utilities/copy.hpp"
 
 
@@ -662,7 +661,8 @@
                   _print_inlining_stream(NULL),
                   _print_inlining_idx(0),
                   _print_inlining_output(NULL),
-                  _interpreter_frame_size(0) {
+                  _interpreter_frame_size(0),
+                  _max_node_limit(MaxNodeLimit) {
   C = this;
 
   CompileWrapper cw(this);
@@ -975,7 +975,8 @@
     _print_inlining_idx(0),
     _print_inlining_output(NULL),
     _allowed_reasons(0),
-    _interpreter_frame_size(0) {
+    _interpreter_frame_size(0),
+    _max_node_limit(MaxNodeLimit) {
   C = this;
 
   TraceTime t1(NULL, &_t_totalCompilation, CITime, false);
@@ -1088,6 +1089,7 @@
   set_do_method_data_update(false);
   set_age_code(has_method() && method()->profile_aging());
   set_rtm_state(NoRTM); // No RTM lock eliding by default
+  method_has_option_value("MaxNodeLimit", _max_node_limit);
 #if INCLUDE_RTM_OPT
   if (UseRTMLocking && has_method() && (method()->method_data_or_null() != NULL)) {
     int rtm_state = method()->method_data()->rtm_state();
@@ -3542,13 +3544,6 @@
     _failure_reason = reason;
   }
 
-  EventCompilerFailure event;
-  if (event.should_commit()) {
-    event.set_compileID(Compile::compile_id());
-    event.set_failure(reason);
-    event.commit();
-  }
-
   if (!C->failure_reason_is(C2Compiler::retry_no_subsuming_loads())) {
     C->print_method(PHASE_FAILURE);
   }
--- a/src/share/vm/opto/compile.hpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/compile.hpp	Wed Nov 26 20:38:10 2014 -0500
@@ -289,6 +289,7 @@
   int                   _freq_inline_size;      // Max hot method inline size for this compilation
   int                   _fixed_slots;           // count of frame slots not allocated by the register
                                                 // allocator i.e. locks, original deopt pc, etc.
+  uintx                 _max_node_limit;        // Max unique node count during a single compilation.
   // For deopt
   int                   _orig_pc_slot;
   int                   _orig_pc_slot_offset_in_bytes;
@@ -597,6 +598,9 @@
   void          set_rtm_state(RTMState s)        { _rtm_state = s; }
   bool              use_rtm() const              { return (_rtm_state & NoRTM) == 0; }
   bool          profile_rtm() const              { return _rtm_state == ProfileRTM; }
+  uint              max_node_limit() const       { return (uint)_max_node_limit; }
+  void          set_max_node_limit(uint n)       { _max_node_limit = n; }
+
   // check the CompilerOracle for special behaviours for this compile
   bool          method_has_option(const char * option) {
     return method() != NULL && method()->has_option(option);
@@ -735,7 +739,7 @@
     record_method_not_compilable(reason, true);
   }
   bool check_node_count(uint margin, const char* reason) {
-    if (live_nodes() + margin > (uint)MaxNodeLimit) {
+    if (live_nodes() + margin > max_node_limit()) {
       record_method_not_compilable(reason);
       return true;
     } else {
--- a/src/share/vm/opto/doCall.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/doCall.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -418,6 +418,11 @@
   ciInstanceKlass* klass = ciEnv::get_instance_klass_for_declared_method_holder(holder);
   assert(declared_signature != NULL, "cannot be null");
 
+  // Bump max node limit for JSR292 users
+  if (bc() == Bytecodes::_invokedynamic || orig_callee->is_method_handle_intrinsic()) {
+    C->set_max_node_limit(3*MaxNodeLimit);
+  }
+
   // uncommon-trap when callee is unloaded, uninitialized or will not link
   // bailout when too many arguments for register representation
   if (!will_link || can_not_compile_call_site(orig_callee, klass)) {
--- a/src/share/vm/opto/escape.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/escape.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -2417,7 +2417,7 @@
       }
     }
   }
-  if ((int) (C->live_nodes() + 2*NodeLimitFudgeFactor) > MaxNodeLimit) {
+  if (C->live_nodes() + 2*NodeLimitFudgeFactor > C->max_node_limit()) {
     if (C->do_escape_analysis() == true && !C->failing()) {
       // Retry compilation without escape analysis.
       // If this is the first failure, the sentinel string will "stick"
--- a/src/share/vm/opto/ifg.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/ifg.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -527,6 +527,22 @@
   Node* def = n->in(0);
   if (!n->is_Proj() ||
       (_lrg_map.live_range_id(def) && !liveout->member(_lrg_map.live_range_id(def)))) {
+    if (n->is_MachProj()) {
+      // Don't remove KILL projections if their "defining" nodes have
+      // memory effects (have SCMemProj projection node) -
+      // they are not dead even when their result is not used.
+      // For example, compareAndSwapL (and other CAS) and EncodeISOArray nodes.
+      // The method add_input_to_liveout() keeps such nodes alive (put them on liveout list)
+      // when it sees SCMemProj node in a block. Unfortunately SCMemProj node could be placed
+      // in block in such order that KILL MachProj nodes are processed first.
+      uint cnt = def->outcnt();
+      for (uint i = 0; i < cnt; i++) {
+        Node* proj = def->raw_out(i);
+        if (proj->Opcode() == Op_SCMemProj) {
+          return false;
+        }
+      }
+    }
     b->remove_node(location);
     LRG& lrg = lrgs(lid);
     if (lrg._def == n) {
--- a/src/share/vm/opto/loopTransform.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/loopTransform.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -27,6 +27,7 @@
 #include "memory/allocation.inline.hpp"
 #include "opto/addnode.hpp"
 #include "opto/callnode.hpp"
+#include "opto/castnode.hpp"
 #include "opto/connode.hpp"
 #include "opto/convertnode.hpp"
 #include "opto/divnode.hpp"
@@ -272,10 +273,9 @@
 bool IdealLoopTree::policy_peeling( PhaseIdealLoop *phase ) const {
   Node *test = ((IdealLoopTree*)this)->tail();
   int  body_size = ((IdealLoopTree*)this)->_body.size();
-  int  live_node_count = phase->C->live_nodes();
   // Peeling does loop cloning which can result in O(N^2) node construction
   if( body_size > 255 /* Prevent overflow for large body_size */
-      || (body_size * body_size + live_node_count > MaxNodeLimit) ) {
+      || (body_size * body_size + phase->C->live_nodes()) > phase->C->max_node_limit() ) {
     return false;           // too large to safely clone
   }
   while( test != _head ) {      // Scan till run off top of loop
@@ -604,7 +604,7 @@
     return false;
   if (new_body_size > unroll_limit ||
       // Unrolling can result in a large amount of node construction
-      new_body_size >= MaxNodeLimit - (uint) phase->C->live_nodes()) {
+      new_body_size >= phase->C->max_node_limit() - phase->C->live_nodes()) {
     return false;
   }
 
@@ -885,6 +885,20 @@
   return n;
 }
 
+bool PhaseIdealLoop::cast_incr_before_loop(Node* incr, Node* ctrl, Node* loop) {
+  Node* castii = new CastIINode(incr, TypeInt::INT, true);
+  castii->set_req(0, ctrl);
+  register_new_node(castii, ctrl);
+  for (DUIterator_Fast imax, i = incr->fast_outs(imax); i < imax; i++) {
+    Node* n = incr->fast_out(i);
+    if (n->is_Phi() && n->in(0) == loop) {
+      int nrep = n->replace_edge(incr, castii);
+      return true;
+    }
+  }
+  return false;
+}
+
 //------------------------------insert_pre_post_loops--------------------------
 // Insert pre and post loops.  If peel_only is set, the pre-loop can not have
 // more iterations added.  It acts as a 'peel' only, no lower-bound RCE, no
@@ -1081,6 +1095,24 @@
     }
   }
 
+  // Nodes inside the loop may be control dependent on a predicate
+  // that was moved before the preloop. If the back branch of the main
+  // or post loops becomes dead, those nodes won't be dependent on the
+  // test that guards that loop nest anymore which could lead to an
+  // incorrect array access because it executes independently of the
+  // test that was guarding the loop nest. We add a special CastII on
+  // the if branch that enters the loop, between the input induction
+  // variable value and the induction variable Phi to preserve correct
+  // dependencies.
+
+  // CastII for the post loop:
+  bool inserted = cast_incr_before_loop(zer_opaq->in(1), zer_taken, post_head);
+  assert(inserted, "no castII inserted");
+
+  // CastII for the main loop:
+  inserted = cast_incr_before_loop(pre_incr, min_taken, main_head);
+  assert(inserted, "no castII inserted");
+
   // Step B4: Shorten the pre-loop to run only 1 iteration (for now).
   // RCE and alignment may change this later.
   Node *cmp_end = pre_end->cmp_node();
@@ -2281,8 +2313,8 @@
 
   // Skip next optimizations if running low on nodes. Note that
   // policy_unswitching and policy_maximally_unroll have this check.
-  uint nodes_left = MaxNodeLimit - (uint) phase->C->live_nodes();
-  if ((2 * _body.size()) > nodes_left) {
+  int nodes_left = phase->C->max_node_limit() - phase->C->live_nodes();
+  if ((int)(2 * _body.size()) > nodes_left) {
     return true;
   }
 
--- a/src/share/vm/opto/loopUnswitch.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/loopUnswitch.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -61,8 +61,8 @@
   if (!_head->is_Loop()) {
     return false;
   }
-  uint nodes_left = MaxNodeLimit - phase->C->live_nodes();
-  if (2 * _body.size() > nodes_left) {
+  int nodes_left = phase->C->max_node_limit() - phase->C->live_nodes();
+  if ((int)(2 * _body.size()) > nodes_left) {
     return false; // Too speculative if running low on nodes.
   }
   LoopNode* head = _head->as_Loop();
--- a/src/share/vm/opto/loopnode.hpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/loopnode.hpp	Wed Nov 26 20:38:10 2014 -0500
@@ -602,6 +602,8 @@
     return ctrl;
   }
 
+  bool cast_incr_before_loop(Node* incr, Node* ctrl, Node* loop);
+
 public:
   bool has_node( Node* n ) const {
     guarantee(n != NULL, "No Node.");
--- a/src/share/vm/opto/loopopts.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/loopopts.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -736,7 +736,7 @@
   for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
     weight += region->fast_out(i)->outcnt();
   }
-  int nodes_left = MaxNodeLimit - C->live_nodes();
+  int nodes_left = C->max_node_limit() - C->live_nodes();
   if (weight * 8 > nodes_left) {
 #ifndef PRODUCT
     if (PrintOpto)
--- a/src/share/vm/opto/machnode.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/machnode.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -561,7 +561,9 @@
 const TypePtr *MachProjNode::adr_type() const {
   if (bottom_type() == Type::MEMORY) {
     // in(0) might be a narrow MemBar; otherwise we will report TypePtr::BOTTOM
-    const TypePtr* adr_type = in(0)->adr_type();
+    Node* ctrl = in(0);
+    if (ctrl == NULL)  return NULL; // node is dead
+    const TypePtr* adr_type = ctrl->adr_type();
     #ifdef ASSERT
     if (!is_error_reported() && !Node::in_dump())
       assert(adr_type != NULL, "source must have adr_type");
--- a/src/share/vm/opto/memnode.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/memnode.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -52,6 +52,7 @@
 
 const TypePtr *MemNode::adr_type() const {
   Node* adr = in(Address);
+  if (adr == NULL)  return NULL; // node is dead
   const TypePtr* cross_check = NULL;
   DEBUG_ONLY(cross_check = _adr_type);
   return calculate_adr_type(adr->bottom_type(), cross_check);
@@ -2741,6 +2742,7 @@
 // Do we Match on this edge index or not?  Do not match memory
 const TypePtr* ClearArrayNode::adr_type() const {
   Node *adr = in(3);
+  if (adr == NULL)  return NULL; // node is dead
   return MemNode::calculate_adr_type(adr->bottom_type());
 }
 
--- a/src/share/vm/opto/memnode.hpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/memnode.hpp	Wed Nov 26 20:38:10 2014 -0500
@@ -730,7 +730,11 @@
   virtual int Opcode() const;
   virtual bool      is_CFG() const  { return false; }
   virtual const Type *bottom_type() const {return Type::MEMORY;}
-  virtual const TypePtr *adr_type() const { return in(0)->in(MemNode::Memory)->adr_type();}
+  virtual const TypePtr *adr_type() const {
+    Node* ctrl = in(0);
+    if (ctrl == NULL)  return NULL; // node is dead
+    return ctrl->in(MemNode::Memory)->adr_type();
+  }
   virtual uint ideal_reg() const { return 0;} // memory projections don't have a register
   virtual const Type *Value( PhaseTransform *phase ) const;
 #ifndef PRODUCT
--- a/src/share/vm/opto/multnode.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/multnode.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -102,7 +102,9 @@
 const TypePtr *ProjNode::adr_type() const {
   if (bottom_type() == Type::MEMORY) {
     // in(0) might be a narrow MemBar; otherwise we will report TypePtr::BOTTOM
-    const TypePtr* adr_type = in(0)->adr_type();
+    Node* ctrl = in(0);
+    if (ctrl == NULL)  return NULL; // node is dead
+    const TypePtr* adr_type = ctrl->adr_type();
     #ifdef ASSERT
     if (!is_error_reported() && !Node::in_dump())
       assert(adr_type != NULL, "source must have adr_type");
--- a/src/share/vm/opto/node.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/node.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -69,7 +69,7 @@
   Compile::set_debug_idx(new_debug_idx);
   set_debug_idx( new_debug_idx );
   assert(Compile::current()->unique() < (INT_MAX - 1), "Node limit exceeded INT_MAX");
-  assert(Compile::current()->live_nodes() < (uint)MaxNodeLimit, "Live Node limit exceeded limit");
+  assert(Compile::current()->live_nodes() < Compile::current()->max_node_limit(), "Live Node limit exceeded limit");
   if (BreakAtNode != 0 && (_debug_idx == BreakAtNode || (int)_idx == BreakAtNode)) {
     tty->print_cr("BreakAtNode: _idx=%d _debug_idx=%d", _idx, _debug_idx);
     BREAKPOINT;
@@ -313,7 +313,7 @@
 Node::Node(uint req)
   : _idx(Init(req))
 {
-  assert( req < (uint)(MaxNodeLimit - NodeLimitFudgeFactor), "Input limit exceeded" );
+  assert( req < Compile::current()->max_node_limit() - NodeLimitFudgeFactor, "Input limit exceeded" );
   debug_only( verify_construction() );
   NOT_PRODUCT(nodes_created++);
   if (req == 0) {
--- a/src/share/vm/opto/phaseX.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/phaseX.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -1392,15 +1392,27 @@
       }
     }
 
-    if( use->is_Cmp() ) {       // Enable CMP/BOOL optimization
+    uint use_op = use->Opcode();
+    if(use->is_Cmp()) {       // Enable CMP/BOOL optimization
       add_users_to_worklist(use); // Put Bool on worklist
-      // Look for the 'is_x2logic' pattern: "x ? : 0 : 1" and put the
-      // phi merging either 0 or 1 onto the worklist
       if (use->outcnt() > 0) {
         Node* bol = use->raw_out(0);
         if (bol->outcnt() > 0) {
           Node* iff = bol->raw_out(0);
-          if (iff->outcnt() == 2) {
+          if (use_op == Op_CmpI &&
+              iff->is_CountedLoopEnd()) {
+            CountedLoopEndNode* cle = iff->as_CountedLoopEnd();
+            if (cle->limit() == n && cle->phi() != NULL) {
+              // If an opaque node feeds into the limit condition of a
+              // CountedLoop, we need to process the Phi node for the
+              // induction variable when the opaque node is removed:
+              // the range of values taken by the Phi is now known and
+              // so its type is also known.
+              _worklist.push(cle->phi());
+            }
+          } else if (iff->outcnt() == 2) {
+            // Look for the 'is_x2logic' pattern: "x ? : 0 : 1" and put the
+            // phi merging either 0 or 1 onto the worklist
             Node* ifproj0 = iff->raw_out(0);
             Node* ifproj1 = iff->raw_out(1);
             if (ifproj0->outcnt() > 0 && ifproj1->outcnt() > 0) {
@@ -1412,9 +1424,26 @@
           }
         }
       }
+      if (use_op == Op_CmpI) {
+        Node* in1 = use->in(1);
+        for (uint i = 0; i < in1->outcnt(); i++) {
+          if (in1->raw_out(i)->Opcode() == Op_CastII) {
+            Node* castii = in1->raw_out(i);
+            if (castii->in(0) != NULL && castii->in(0)->in(0) != NULL && castii->in(0)->in(0)->is_If()) {
+              Node* ifnode = castii->in(0)->in(0);
+              if (ifnode->in(1) != NULL && ifnode->in(1)->in(1) == use) {
+                // Reprocess a CastII node that may depend on an
+                // opaque node value when the opaque node is
+                // removed. In case it carries a dependency we can do
+                // a better job of computing its type.
+                _worklist.push(castii);
+              }
+            }
+          }
+        }
+      }
     }
 
-    uint use_op = use->Opcode();
     // If changed Cast input, check Phi users for simple cycles
     if( use->is_ConstraintCast() || use->is_CheckCastPP() ) {
       for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
--- a/src/share/vm/opto/subnode.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/subnode.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -1147,12 +1147,10 @@
 
 //------------------------------dump_spec-------------------------------------
 // Print special per-node info
-#ifndef PRODUCT
 void BoolTest::dump_on(outputStream *st) const {
   const char *msg[] = {"eq","gt","of","lt","ne","le","nof","ge"};
   st->print("%s", msg[_test]);
 }
-#endif
 
 //=============================================================================
 uint BoolNode::hash() const { return (Node::hash() << 3)|(_test._test+1); }
--- a/src/share/vm/opto/subnode.hpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/opto/subnode.hpp	Wed Nov 26 20:38:10 2014 -0500
@@ -275,9 +275,7 @@
   mask commute( ) const { return mask("032147658"[_test]-'0'); }
   mask negate( ) const { return mask(_test^4); }
   bool is_canonical( ) const { return (_test == BoolTest::ne || _test == BoolTest::lt || _test == BoolTest::le || _test == BoolTest::overflow); }
-#ifndef PRODUCT
   void dump_on(outputStream *st) const;
-#endif
 };
 
 //------------------------------BoolNode---------------------------------------
--- a/src/share/vm/prims/whitebox.cpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/prims/whitebox.cpp	Wed Nov 26 20:38:10 2014 -0500
@@ -961,6 +961,16 @@
   return result;
 WB_END
 
+WB_ENTRY(jint, WB_GetCompilationActivityMode(JNIEnv* env, jobject o))
+  return CompileBroker::get_compilation_activity_mode();
+WB_END
+
+WB_ENTRY(jobjectArray, WB_GetCodeBlob(JNIEnv* env, jobject o, jlong addr))
+    ThreadToNativeFromVM ttn(thread);
+    CodeBlobStub stub((CodeBlob*) addr);
+    return codeBlob2objectArray(thread, env, &stub);
+WB_END
+
 WB_ENTRY(jlong, WB_GetThreadStackSize(JNIEnv* env, jobject o))
   return (jlong) Thread::current()->stack_size();
 WB_END
@@ -1215,6 +1225,9 @@
   {CC"allocateCodeBlob",   CC"(II)J",                 (void*)&WB_AllocateCodeBlob   },
   {CC"freeCodeBlob",       CC"(J)V",                  (void*)&WB_FreeCodeBlob       },
   {CC"getCodeHeapEntries", CC"(I)[Ljava/lang/Object;",(void*)&WB_GetCodeHeapEntries },
+  {CC"getCompilationActivityMode",
+                           CC"()I",                   (void*)&WB_GetCompilationActivityMode},
+  {CC"getCodeBlob",        CC"(J)[Ljava/lang/Object;",(void*)&WB_GetCodeBlob        },
   {CC"getThreadStackSize", CC"()J",                   (void*)&WB_GetThreadStackSize },
   {CC"getThreadRemainingStackSize", CC"()J",          (void*)&WB_GetThreadRemainingStackSize },
 };
--- a/src/share/vm/runtime/vm_operations.hpp	Wed Nov 26 18:01:10 2014 +0100
+++ b/src/share/vm/runtime/vm_operations.hpp	Wed Nov 26 20:38:10 2014 -0500
@@ -432,6 +432,7 @@
  public:
   VM_PrintCompileQueue(outputStream* st) : _out(st) {}
   VMOp_Type type() const { return VMOp_PrintCompileQueue; }
+  Mode evaluation_mode() const { return _no_safepoint; }
   void doit();
 };
 
--- a/test/Makefile	Wed Nov 26 18:01:10 2014 +0100
+++ b/test/Makefile	Wed Nov 26 20:38:10 2014 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
 # Makefile to run various hotspot tests
 #
 
+ALT_MAKE ?= closed
+
+-include $(ALT_MAKE)/Makefile
+
 GETMIXEDPATH=echo
 
 # Utilities used
@@ -305,14 +309,27 @@
 
 PHONY_LIST += jtreg_tests
 
+# flags used to execute java in test targets
+TEST_FLAGS += -version -Xinternalversion -X -help 
+
+sanitytest: prep $(PRODUCT_HOME)
+	@for flag in $(TEST_FLAGS);                                             \
+	do                                                                      \
+	    echo Executing java $(JAVA_OPTIONS) $$flag;                         \
+	    $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) $$flag;                    \
+	    res=$$?;                                                            \
+	    if [ $$res -ne 0 ]; then                                            \
+	        exit $$res;                                                     \
+	    fi;                                                                 \
+	done
+
+PHONY_LIST += sanitytest
+
 ################################################################
 
 # clienttest (make sure various basic java client options work)
 
-hotspot_clienttest clienttest: prep $(PRODUCT_HOME)
-	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version
-	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help
-	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X
+hotspot_clienttest clienttest: sanitytest
 	$(RM) $(PRODUCT_HOME)/jre/lib/*/client/classes.jsa
 	$(RM) $(PRODUCT_HOME)/jre/bin/client/classes.jsa
 	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -Xshare:dump
@@ -323,10 +340,7 @@
 
 # minimaltest (make sure various basic java minimal options work)
 
-hotspot_minimaltest minimaltest: prep $(PRODUCT_HOME)
-	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version
-	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help
-	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X
+hotspot_minimaltest minimaltest: sanitytest
 
 PHONY_LIST += hotspot_minimaltest minimaltest
 
@@ -334,10 +348,7 @@
 
 # servertest (make sure various basic java server options work)
 
-hotspot_servertest servertest: prep $(PRODUCT_HOME)
-	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version
-	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help
-	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X
+hotspot_servertest servertest: sanitytest
 
 PHONY_LIST += hotspot_servertest servertest
 
--- a/test/TEST.groups	Wed Nov 26 18:01:10 2014 +0100
+++ b/test/TEST.groups	Wed Nov 26 20:38:10 2014 -0500
@@ -107,8 +107,8 @@
 # Tests that require the full JRE
 #
 needs_jre = \
-  compiler/6852078/Test6852078.java \
-  compiler/7047069/Test7047069.java \
+  compiler/c2/6852078/Test6852078.java \
+  compiler/c2/7047069/Test7047069.java \
   runtime/6294277/SourceDebugExtension.java \
   runtime/ClassFile/JsrRewriting.java \
   runtime/ClassFile/OomWhileParsingRepeatedJsr.java
@@ -325,245 +325,85 @@
   sanity/
 
 hotspot_compiler_1 = \
-  compiler/5057225/Test5057225.java \
-  compiler/5091921/Test5091921.java \
-  compiler/5091921/Test6186134.java \
-  compiler/5091921/Test6196102.java \
-  compiler/5091921/Test6357214.java \
-  compiler/5091921/Test6559156.java \
-  compiler/5091921/Test6753639.java \
-  compiler/5091921/Test6935022.java \
-  compiler/5091921/Test6959129.java \
-  compiler/5091921/Test6985295.java \
-  compiler/5091921/Test6992759.java \
-  compiler/5091921/Test7005594.java \
-  compiler/5091921/Test7020614.java \
-  compiler/6378821/Test6378821.java \
-  compiler/6431242/Test.java \
-  compiler/6443505/Test6443505.java \
-  compiler/6478991/NullCheckTest.java \
-  compiler/6539464/Test.java \
-  compiler/6579789/Test6579789.java \
-  compiler/6636138/ \
-  compiler/6646019/Test.java \
-  compiler/6659207/Test.java \
-  compiler/6661247/Test.java \
-  compiler/6663621/IVTest.java \
-  compiler/6689060/Test.java \
-  compiler/6695810/Test.java \
-  compiler/6700047/Test6700047.java \
-  compiler/6711100/Test.java \
-  compiler/6724218/Test.java \
-  compiler/6732154/Test6732154.java \
-  compiler/6758234/Test6758234.java \
-  compiler/6769124/ \
-  compiler/6772683/InterruptedTest.java \
-  compiler/6778657/Test.java \
-  compiler/6795161/Test.java \
-  compiler/6795362/Test6795362.java \
-  compiler/6795465/Test6795465.java \
-  compiler/6796786/Test6796786.java \
-  compiler/6799693/Test.java \
-  compiler/6805724/Test6805724.java \
-  compiler/6814842/Test6814842.java \
-  compiler/6823453/Test.java \
-  compiler/6833129/Test.java \
-  compiler/6837011/Test6837011.java \
-  compiler/6843752/Test.java \
-  compiler/6849574/Test.java \
-  compiler/6855164/Test.java \
-  compiler/6855215/Test6855215.java \
-  compiler/6857159/Test6857159.java \
-  compiler/6860469/Test.java \
-  compiler/6863155/Test6863155.java \
-  compiler/6863420/Test.java \
-  compiler/6865265/StackOverflowBug.java \
-  compiler/6879902/Test6879902.java \
-  compiler/6880034/Test6880034.java \
-  compiler/6891750/Test6891750.java \
-  compiler/6892265/Test.java \
-  compiler/6894807/IsInstanceTest.java \
-  compiler/6901572/Test.java \
-  compiler/6909839/Test6909839.java \
-  compiler/6910484/Test.java \
-  compiler/6910605/Test.java \
-  compiler/6910618/Test.java \
-  compiler/6916644/Test6916644.java \
-  compiler/6921969/TestMultiplyLongHiZero.java \
-  compiler/6930043/Test6930043.java \
-  compiler/6932496/Test6932496.java \
-  compiler/6956668/Test6956668.java \
-  compiler/6968348/Test6968348.java \
-  compiler/6973329/Test.java
-
+  compiler/arraycopy/ \
+  compiler/c1/ \
+  compiler/c2/ \
+  -compiler/c2/5091921/Test6850611.java \
+  -compiler/c2/5091921/Test6890943.java \
+  -compiler/c2/5091921/Test6905845.java \
+  -compiler/c2/6340864 \
+  -compiler/c2/6589834 \
+  -compiler/c2/6603011 \
+  -compiler/c2/6912517 \
+  -compiler/c2/6792161 \
+  -compiler/c2/7070134 \
+  -compiler/c2/8004867
+  
 hotspot_compiler_2 = \
-  compiler/6982370/Test6982370.java \
-  compiler/7009231/Test7009231.java \
-  compiler/7009359/Test7009359.java \
-  compiler/7017746/Test.java \
-  compiler/7024475/Test7024475.java \
-  compiler/7041100/Test7041100.java \
-  compiler/7044738/Test7044738.java \
-  compiler/7046096/Test7046096.java \
-  compiler/7048332/Test7048332.java \
-  compiler/7068051/Test7068051.java \
-  compiler/7082949/Test7082949.java \
-  compiler/7088020/Test7088020.java \
-  compiler/7090976/Test7090976.java \
-  compiler/7103261/Test7103261.java \
-  compiler/7110586/Test7110586.java \
-  compiler/7119644/ \
-  compiler/7141637/SpreadNullArg.java \
-  compiler/7169782/Test7169782.java \
-  compiler/7174363/Test7174363.java \
-  compiler/7179138/ \
-  compiler/7190310/ \
-  compiler/7192963/ \
-  compiler/7200264/TestIntVect.java \
-  compiler/8000805/Test8000805.java \
-  compiler/8002069/Test8002069.java \
-  compiler/8004741/Test8004741.java \
-  compiler/8005033/Test8005033.java \
-  compiler/8005419/Test8005419.java \
-  compiler/8005956/PolynomialRoot.java \
-  compiler/8007294/Test8007294.java \
-  compiler/EliminateAutoBox/UnsignedLoads.java
-
+  compiler/classUnloading/ \
+  compiler/codecache/ \
+  compiler/codegen/ \
+  compiler/cpuflags/ \
+  compiler/dependencies/ \
+  compiler/eliminateAutobox/ \
+  compiler/escapeAnalysis/ \
+  compiler/exceptions/ \
+  compiler/floatingpoint/ \
+  compiler/gcbarriers/ \
+  compiler/inlining/ \
+  compiler/integerArithmetic/ \
+  compiler/interpreter/ \
+  -compiler/codegen/7184394
+  
 hotspot_compiler_3 = \
-  compiler/8007722/Test8007722.java \
-  compiler/8009761/Test8009761.java \
-  compiler/8010927/Test8010927.java \
-  compiler/8011706/Test8011706.java \
-  compiler/8011771/Test8011771.java \
-  compiler/8011901/Test8011901.java \
-  compiler/arraycopy/TestMissingControl.java \
-  compiler/ciReplay/TestVM_no_comp_level.sh \
-  compiler/classUnloading/anonymousClass/TestAnonymousClassUnloading.java \
-  compiler/codecache/CheckSegmentedCodeCache.java \
-  compiler/codecache/CheckUpperLimit.java \
-  compiler/codegen/ \
-  compiler/cpuflags/RestoreMXCSR.java \
-  compiler/EscapeAnalysis/ \
-  compiler/exceptions/ \
-  compiler/floatingpoint/ModNaN.java \
-  compiler/gcbarriers/G1CrashTest.java \
-  compiler/inlining/ \
-  compiler/IntegerArithmetic/TestIntegerComparison.java \
-  compiler/intrinsics/bmi/TestAndnI.java \
-  compiler/intrinsics/bmi/TestAndnI.java \
-  compiler/intrinsics/bmi/TestAndnL.java \
-  compiler/intrinsics/bmi/TestBlsiI.java \
-  compiler/intrinsics/bmi/TestBlsiL.java \
-  compiler/intrinsics/bmi/TestBlsmskI.java \
-  compiler/intrinsics/bmi/TestBlsmskL.java \
-  compiler/intrinsics/bmi/TestBlsrI.java \
-  compiler/intrinsics/bmi/TestBlsrL.java \
-  compiler/intrinsics/bmi/TestLzcntI.java \
-  compiler/intrinsics/bmi/TestLzcntL.java \
-  compiler/intrinsics/bmi/TestTzcntI.java \
-  compiler/intrinsics/bmi/TestTzcntL.java \
-  compiler/intrinsics/clone/TestObjectClone.java \
-  compiler/intrinsics/hashcode/TestHashCode.java \
-  compiler/intrinsics/mathexact/CompareTest.java \
-  compiler/intrinsics/mathexact/GVNTest.java \
-  compiler/intrinsics/mathexact/NegExactILoadTest.java \
-  compiler/intrinsics/mathexact/NegExactILoopDependentTest.java \
-  compiler/intrinsics/mathexact/NegExactINonConstantTest.java \
-  compiler/intrinsics/mathexact/SubExactICondTest.java \
-  compiler/intrinsics/mathexact/SubExactILoadTest.java \
-  compiler/intrinsics/mathexact/SubExactILoopDependentTest.java \
-  compiler/intrinsics/stringequals/TestStringEqualsBadLength.java \
-  compiler/intrinsics/unsafe/UnsafeGetAddressTest.java \
-  compiler/intrinsics/classcast/NullCheckDroppingsTest.java \
-  compiler/jsr292/ConcurrentClassLoadingTest.java \
-  compiler/jsr292/CreatesInterfaceDotEqualsCallInfo.java \
-  compiler/loopopts/TestLogSum.java \
-  compiler/macronodes/TestEliminateAllocationPhi.java \
-  compiler/membars/TestMemBarAcquire.java \
-  compiler/osr/TestOSRWithNonEmptyStack.java \
-  compiler/profiling/TestMethodHandleInvokesIntrinsic.java \
-  compiler/profiling/TestSpecTrapClassUnloading.java \
-  compiler/profiling/TestUnexpectedProfilingMismatch.java \
-  compiler/regalloc/C1ObjectSpillInLogicOp.java \
-  compiler/startup/NumCompilerThreadsCheck.java \
-  compiler/startup/SmallCodeCacheStartup.java \
-  compiler/types/TestSpeculationFailedHigherEqual.java \
-  compiler/types/TypeSpeculation.java \
-  compiler/uncommontrap/StackOverflowGuardPagesOff.java \
-  compiler/uncommontrap/TestStackBangMonitorOwned.java \
-  compiler/uncommontrap/TestStackBangRbp.java \
-  compiler/unsafe/GetUnsafeObjectG1PreBarrier.java
-  
+  compiler/intrinsics/ \
+  compiler/jsr292/ \
+  compiler/loopopts/ \
+  compiler/macronodes/ \
+  compiler/osr/ \
+  compiler/regalloc/ \
+  compiler/runtime/ \
+  compiler/startup/ \
+  compiler/types/ \
+  compiler/uncommontrap/ \
+  compiler/unsafe/ \
+  -compiler/intrinsics/bmi/verifycode \
+  -compiler/intrinsics/mathexact \
+  -compiler/intrinsics/multiplytolen \
+  -compiler/intrinsics/sha \
+  -compiler/loopopts/7052494 \
+  -compiler/runtime/6826736
 
 hotspot_compiler_closed = \
-  closed/compiler/4292742/Test.java \
-  closed/compiler/4474154/Test4474154.java \
-  closed/compiler/4482613/Test4482613.java \
-  closed/compiler/4490177/tctest.java \
-  closed/compiler/4495990/Application.java \
-  closed/compiler/4522874/Test4522874.sh \
-  closed/compiler/4629512/Test4629512.java \
-  closed/compiler/4647299/Looper.java \
-  closed/compiler/4655758/TestClass.java \
-  closed/compiler/4671453/LongCompTest.java \
-  closed/compiler/4671460/CharArrTest.java \
-  closed/compiler/4709105/StringTest2.java \
-  closed/compiler/4732721/Bug.java \
-  closed/compiler/4750681/ReadTest.java \
-  closed/compiler/4787943/LongCrash.java \
-  closed/compiler/4819903/Base64Test.java \
-  closed/compiler/4903383/Test.java \
-  closed/compiler/4906393/Test.java \
-  closed/compiler/4907999/Uidtest.java \
-  closed/compiler/4917709/Tester.java \
-  closed/compiler/4957832/Test.java \
-  closed/compiler/4965430/LoopTest.java \
-  closed/compiler/4979449/T4979449.java \
-  closed/compiler/5031274/Test.java \
-  closed/compiler/5043395/T5043395.java \
-  closed/compiler/5049410/Test.java \
-  closed/compiler/5098422/Test.java \
-  closed/compiler/6173783/Test.java \
-  closed/compiler/6272923/Test6272923.sh \
-  closed/compiler/6290963/Test.java \
-  closed/compiler/6305546/Test.java \
-  closed/compiler/6309806/Test.java \
-  closed/compiler/6311859/Test.java \
-  closed/compiler/6321689/Test.java \
-  closed/compiler/6326935/Test.java \
-  closed/compiler/6367889/Test.java \
-  closed/compiler/6371167/Test.java \
-  closed/compiler/6389127/Test.java \
-  closed/compiler/6397650/Test.java \
-  closed/compiler/6414932/Test.java \
-  closed/compiler/6421619/Test_6421619.java \
-  closed/compiler/6427750/UnsafeVolatile.java \
-  closed/compiler/6431243/Test.java \
-  closed/compiler/6433572/TestSyncJSR.java \
-  closed/compiler/6433840/clinit.java \
-  closed/compiler/6457854/Test.java \
-  closed/compiler/6476804/Test.java \
-  closed/compiler/6512111/CorruptFinalLong.java \
-  closed/compiler/6551887/Test.java \
-  closed/compiler/6571539/Test.java \
-  closed/compiler/6587132/Test.java \
-  closed/compiler/6588045/Test.java \
-  closed/compiler/6588598/etype.java \
-  closed/compiler/6661918/Test6661918.java \
-  closed/compiler/6707044/Test.java \
-  closed/compiler/6730716/Test.java \
-  closed/compiler/6772368/Test6772368.sh \
-  closed/compiler/6897150/Test6897150.java \
-  closed/compiler/6931567/Test6931567.java \
-  closed/compiler/7196857/Test7196857.java \
-  closed/compiler/8009699/Test8009699.java \
-  closed/compiler/8009699/Test8009699B.java \
-  closed/compiler/8014811/Test8014811.java \
-  closed/compiler/8029507/InvokePrivate.java \
-  closed/compiler/callingConvention/Arg9Double.java \
-  closed/compiler/deoptimization/DeoptArithmetic.java \
-  closed/compiler/deoptimization/TestDoubleLocals.java \
-  closed/compiler/deoptimization/TestDoubleMerge.java
+  closed/compiler/c1/ \
+  closed/compiler/c2/ \
+  closed/compiler/codegen/ \
+  closed/compiler/escapeAnalysis/ \
+  closed/compiler/interpreter/ \
+  closed/compiler/jsr292/ \
+  closed/compiler/loopopts/ \
+  closed/compiler/oracle/ \
+  closed/compiler/runtime/ \
+  closed/compiler/symantec/ \
+  -closed/compiler/c1/4477197 \
+  -closed/compiler/c1/5040872 \
+  -closed/compiler/c1/6507107 \
+  -closed/compiler/c2/4344895 \
+  -closed/compiler/c2/4485006 \
+  -closed/compiler/c2/4523683 \
+  -closed/compiler/c2/4620290 \
+  -closed/compiler/c2/4998314 \
+  -closed/compiler/c2/6329104 \
+  -closed/compiler/c2/6434117 \
+  -closed/compiler/c2/6547163 \
+  -closed/compiler/c2/6563987 \
+  -closed/compiler/c2/6595044 \
+  -closed/compiler/codegen/6440479 \
+  -closed/compiler/codegen/6603011 \
+  -closed/compiler/interpreter/5034475 \
+  -closed/compiler/jsr292/LongLambdaFormDynamicStackDepth.java \
+  -closed/compiler/loopopts/4463485 \
+  -closed/compiler/loopopts/8021898
 
 hotspot_gc = \
   sanity/ExecuteInternalVMTests.java
@@ -609,4 +449,4 @@
 #
 not_needs_nashorn = \
   :jdk \
-  -:needs_nashorh
+  -:needs_nashorn
--- a/test/compiler/5057225/Test5057225.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 5057225
- * @summary Remove useless I2L conversions
- *
- * @run main/othervm -Xcomp -XX:CompileOnly=Test5057225.doload Test5057225
- */
-
-import java.net.URLClassLoader;
-
-public class Test5057225 {
-    static byte[]  ba = new byte[]  { -1 };
-    static short[] sa = new short[] { -1 };
-    static int[]   ia = new int[]   { -1 };
-
-    static final long[] BYTE_MASKS = {
-         0x0FL,
-         0x7FL,  // 7-bit
-         0xFFL,
-    };
-
-    static final long[] SHORT_MASKS = {
-        0x000FL,
-        0x007FL,  // 7-bit
-        0x00FFL,
-        0x0FFFL,
-        0x3FFFL,  // 14-bit
-        0x7FFFL,  // 15-bit
-        0xFFFFL,
-    };
-
-    static final long[] INT_MASKS = {
-        0x0000000FL,
-        0x0000007FL,  // 7-bit
-        0x000000FFL,
-        0x00000FFFL,
-        0x00003FFFL,  // 14-bit
-        0x00007FFFL,  // 15-bit
-        0x0000FFFFL,
-        0x00FFFFFFL,
-        0x7FFFFFFFL,  // 31-bit
-        0xFFFFFFFFL,
-    };
-
-    public static void main(String[] args) throws Exception {
-        for (int i = 0; i < BYTE_MASKS.length; i++) {
-            System.setProperty("value", "" + BYTE_MASKS[i]);
-            loadAndRunClass("Test5057225$loadUB2L");
-        }
-
-        for (int i = 0; i < SHORT_MASKS.length; i++) {
-            System.setProperty("value", "" + SHORT_MASKS[i]);
-            loadAndRunClass("Test5057225$loadUS2L");
-        }
-
-        for (int i = 0; i < INT_MASKS.length; i++) {
-            System.setProperty("value", "" + INT_MASKS[i]);
-            loadAndRunClass("Test5057225$loadUI2L");
-        }
-    }
-
-    static void check(long result, long expected) {
-        if (result != expected)
-            throw new InternalError(result + " != " + expected);
-    }
-
-    static void loadAndRunClass(String classname) throws Exception {
-        Class cl = Class.forName(classname);
-        URLClassLoader apploader = (URLClassLoader) cl.getClassLoader();
-        ClassLoader loader = new URLClassLoader(apploader.getURLs(), apploader.getParent());
-        Class c = loader.loadClass(classname);
-        Runnable r = (Runnable) c.newInstance();
-        r.run();
-    }
-
-    public static class loadUB2L implements Runnable {
-        static final long MASK;
-        static {
-            long value = 0;
-            try {
-                value = Long.decode(System.getProperty("value"));
-            } catch (Throwable e) {}
-            MASK = value;
-        }
-
-        public void run() { check(doload(ba), MASK); }
-        static long doload(byte[] ba) { return ba[0] & MASK; }
-    }
-
-    public static class loadUS2L implements Runnable {
-        static final long MASK;
-        static {
-            long value = 0;
-            try {
-                value = Long.decode(System.getProperty("value"));
-            } catch (Throwable e) {}
-            MASK = value;
-        }
-
-        public void run() { check(doload(sa), MASK); }
-        static long doload(short[] sa) { return sa[0] & MASK; }
-    }
-
-    public static class loadUI2L implements Runnable {
-        static final long MASK;
-        static {
-            long value = 0;
-            try {
-                value = Long.decode(System.getProperty("value"));
-            } catch (Throwable e) {}
-            MASK = value;
-        }
-
-        public void run() { check(doload(ia), MASK); }
-        static long doload(int[] ia) { return ia[0] & MASK; }
-    }
-}
--- a/test/compiler/5091921/Test5091921.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,309 +0,0 @@
-/*
- * Copyright (c) 2011 Hewlett-Packard Company. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 5091921
- * @summary Sign flip issues in loop optimizer
- *
- * @run main/othervm -Xcomp -XX:CompileOnly=Test5091921 -XX:MaxInlineSize=1 Test5091921
- */
-
-public class Test5091921 {
-  private static int result = 0;
-
-
-  /* Test for the bug of transforming indx >= MININT to indx > MININT-1 */
-  public static int test_ge1(int limit) {
-    int indx;
-    int sum = 0;
-    for (indx = 500; indx >= limit; indx -= 2) {
-      sum += 2000 / indx;
-      result = sum;
-    }
-    return sum;
-  }
-
-  /* Test for the bug of transforming indx <= MAXINT to indx < MAXINT+1 */
-  public static int test_le1(int limit) {
-    int indx;
-    int sum = 0;
-    for (indx = -500; indx <= limit; indx += 2)
-    {
-      sum += 3000 / indx;
-      result = sum;
-    }
-    return sum;
-  }
-
-  /* Run with -Xcomp -XX:CompileOnly=wrap1.test1 -XX:MaxInlineSize=1 */
-  /* limit reset to ((limit-init+stride-1)/stride)*stride+init */
-  /* Calculation may overflow */
-  public static volatile int c = 1;
-  public static int test_wrap1(int limit)
-  {
-    int indx;
-    int sum = 0;
-    for (indx = 0xffffffff; indx < limit; indx += 0x20000000)
-    {
-      sum += c;
-    }
-    return sum;
-  }
-
-  /* Test for range check elimination with bit flip issue for
-     scale*i+offset<limit where offset is not 0 */
-  static int[] box5 = {1,2,3,4,5,6,7,8,9};
-  public static int test_rce5(int[] b, int limit)
-  {
-    int indx;
-    int sum = b[1];
-    result = sum;
-    for (indx = 0x80000000; indx < limit; ++indx)
-    {
-      if (indx > 0x80000000)
-      {
-        // this test is not issued in pre-loop but issued in main loop
-        // trick rce into thinking expression is false when indx >= 0
-        // in fact it is false when indx==0x80000001
-        if (indx - 9 < -9)
-        {
-          sum += indx;
-          result = sum;
-          sum ^= b[indx & 7];
-          result = sum;
-        }
-        else
-          break;
-      }
-      else
-      {
-        sum += b[indx & 3];
-        result = sum;
-      }
-    }
-    return sum;
-  }
-
-  /* Test for range check elimination with bit flip issue for
-     scale*i<limit where scale > 1 */
-  static int[] box6 = {1,2,3,4,5,6,7,8,9};
-  public static int test_rce6(int[] b, int limit)
-  {
-    int indx;
-    int sum = b[1];
-    result = sum;
-    for (indx = 0x80000000; indx < limit; ++indx)
-    {
-      if (indx > 0x80000000)
-      {
-        // harmless rce target
-        if (indx < 0)
-        {
-          sum += result;
-          result = sum;
-        }
-        else
-          break;
-        // this test is not issued in pre-loop but issued in main loop
-        // trick rce into thinking expression is false when indx >= 0
-        // in fact it is false when indx==0x80000001
-        // In compilers that transform mulI to shiftI may mask this issue.
-        if (indx * 28 + 1 < 0)
-        {
-          sum += indx;
-          result = sum;
-          sum ^= b[indx & 7];
-          result = sum;
-        }
-        else
-          break;
-      }
-      else
-      {
-        sum += b[indx & 3];
-        result = sum;
-      }
-    }
-    return sum;
-  }
-
-  /* Test for range check elimination with i <= limit */
-  static int[] box7 = {1,2,3,4,5,6,7,8,9,0x7fffffff};
-  public static int test_rce7(int[] b)
-  {
-    int indx;
-    int max = b[9];
-    int sum = b[7];
-    result = sum;
-    for (indx = 0; indx < b.length; ++indx)
-    {
-      if (indx <= max)
-      {
-        sum += (indx ^ 15) + ((result != 0) ? 0 : sum);
-        result = sum;
-      }
-      else
-        throw new RuntimeException();
-    }
-    for (indx = -7; indx < b.length; ++indx)
-    {
-      if (indx <= 9)
-      {
-        sum += (sum ^ 15) + ((result != 0) ? 0 : sum);
-        result = sum;
-      }
-      else
-        throw new RuntimeException();
-    }
-    return sum;
-  }
-
-  /* Test for range check elimination with i >= limit */
-  static int[] box8 = {-1,0,1,2,3,4,5,6,7,8,0x80000000};
-  public static int test_rce8(int[] b)
-  {
-    int indx;
-    int sum = b[5];
-    int min = b[10];
-    result = sum;
-    for (indx = b.length-1; indx >= 0; --indx)
-    {
-      if (indx >= min)
-      {
-        sum += (sum ^ 9) + ((result != 0) ? 0 :sum);
-        result = sum;
-      }
-      else
-        throw new RuntimeException();
-    }
-    return sum;
-  }
-
-  public static void main(String[] args)
-  {
-    result=1;
-    int r = 0;
-    try {
-      r = test_ge1(0x80000000);
-      System.out.println(result);
-      System.out.println("test_ge1 FAILED");
-      System.exit(1);
-    }
-    catch (ArithmeticException e1) {
-      System.out.println("test_ge1: Expected exception caught");
-      if (result != 5986) {
-        System.out.println(result);
-        System.out.println("test_ge1 FAILED");
-        System.exit(97);
-      }
-    }
-    System.out.println("test_ge1 WORKED");
-
-    result=0;
-    try
-    {
-      r = test_le1(0x7fffffff);
-      System.out.println(result);
-      System.out.println("test_le1 FAILED");
-      System.exit(1);
-    }
-    catch (ArithmeticException e1)
-    {
-      System.out.println("test_le1: Expected exception caught");
-      if (result != -9039)
-      {
-        System.out.println(result);
-        System.out.println("test_le1 FAILED");
-        System.exit(97);
-      }
-    }
-    System.out.println("test_le1 WORKED");
-
-    result=0;
-    r = test_wrap1(0x7fffffff);
-    if (r != 4)
-    {
-      System.out.println(result);
-      System.out.println("test_wrap1 FAILED");
-      System.exit(97);
-    }
-    else
-    {
-      System.out.println("test_wrap1 WORKED");
-    }
-
-    result=0;
-    r = test_rce5(box5,0x80000100);
-    if (result != 3)
-    {
-      System.out.println(result);
-      System.out.println("test_rce5 FAILED");
-      System.exit(97);
-    }
-    else
-    {
-      System.out.println("test_rce5 WORKED");
-    }
-
-    result=0;
-    r = test_rce6(box6,0x80000100);
-    if (result != 6)
-    {
-      System.out.println(result);
-      System.out.println("test_rce6 FAILED");
-      System.exit(97);
-    }
-    else
-    {
-      System.out.println("test_rce6 WORKED");
-    }
-
-    result=0;
-    r = test_rce7(box7);
-    if (result != 14680079)
-    {
-      System.out.println(result);
-      System.out.println("test_rce7 FAILED");
-      System.exit(97);
-    }
-    else
-    {
-      System.out.println("test_rce7 WORKED");
-    }
-
-    result=0;
-    r = test_rce8(box8);
-    if (result != 16393)
-    {
-      System.out.println(result);
-      System.out.println("test_rce8 FAILED");
-      System.exit(97);
-    }
-    else
-    {
-      System.out.println("test_rce8 WORKED");
-    }
-  }
-}
--- a/test/compiler/5091921/Test6186134.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6186134
- * @summary Server virtual machine produces/exeutes incorrect code.
- *
- * @run main Test6186134 100000
- */
-import java.util.ArrayList;
-
-public class Test6186134 {
-
-  int num = 0;
-
-  public Test6186134(int n) {
-    num = n;
-  }
-
-  public boolean more() {
-    return num-- > 0;
-  }
-
-  public ArrayList test1() {
-    ArrayList res = new ArrayList();
-    int maxResults = Integer.MAX_VALUE;
-    int n = 0;
-    boolean more = more();
-    while ((n++ < maxResults) && more) {
-      res.add(new Object());
-      more = more();
-    }
-    return res;
-  }
-
-  public static void main(String[] pars) {
-    int n = Integer.parseInt(pars[0]);
-    for (int i=0; i<n; i++) {
-      Test6186134 t = new Test6186134(10);
-      int size = t.test1().size();
-      if (size != 10) {
-        System.out.println("wrong size: " + size +", should be 10");
-        System.exit(97);
-      }
-    }
-    System.out.println("Passed");
-  }
-}
-
--- a/test/compiler/5091921/Test6196102.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6196102
- * @summary Integer seems to be greater than Integer.MAX_VALUE
- *
- * @run main Test6196102
- */
-
-public class Test6196102 {
-    static public void main(String[] args) {
-        int i1 = 0;
-        int i2 = Integer.MAX_VALUE;
-
-        while (i1 >= 0) {
-            i1++;
-            if (i1 > i2) {
-                System.out.println("E R R O R: " + i1);
-                System.exit(97);
-            }
-        }
-    }
-}
-
--- a/test/compiler/5091921/Test6357214.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,179 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6357214
- * @summary Hotspot server compiler gets integer comparison wrong
- *
- * @run main/othervm/timeout=60 -DshowAll=ffo -DeventID=444 Test6357214
- */
-
-// The test hangs after few iterations before the fix. So it fails if timeout.
-class MyResult {
-        public boolean next() {
-                return true;
-        }
-
-        public String getString(String in) {
-                if (in.equals("id"))
-                        return "idFoo";
-                if (in.equals("contentKey"))
-                        return "ckFoo";
-                return "Foo";
-        }
-
-        public int getInt(String in) {
-                if (in.equals("processingComplete"))
-                        return 0;
-                return 1;
-        }
-
-        public byte[] getBytes(String in) {
-                byte[] arr = null;
-                if (in.equals("content")) {
-                        arr = new byte[65536];
-                        byte j = 32;
-                        for (int i=0; i<65536; i++) {
-                                arr[i] = j;
-                                if (++j == 127)
-                                        j=32;
-                        }
-                }
-                return arr;
-        }
-}
-
-public class Test6357214 {
-        public static volatile boolean bollocks = true;
-    public String create(String context) throws Exception {
-
-        //
-        // Extract HTTP parameters
-        //
-
-        boolean showAll = System.getProperty("showAll") != null;
-          String eventID = System.getProperty("eventID");
-          String eventContentKey = System.getProperty("cKey");
-        //
-        // Build ContentStaging query based on eventID or eventContentKey
-        //
-
-        String sql = "select id, processingComplete, contentKey, content "
-                   + "from   ContentStaging cs, ContentStagingKey csk "
-                   + "where  cs.eventContentKey = csk.eventContentKey ";
-
-        if (eventID != null) {
-            sql += "and id = " + eventID;
-        }
-        else if (eventContentKey != null) {
-            sql += "and cs.eventContentKey = '"
-                +  eventContentKey
-                +  "' having id = max(id)";
-        }
-        else {
-            throw new Exception("Need eventID or eventContentKey");
-        }
-
-        //
-        // This factory builds a static panel, there is no JSP
-        //
-
-        StringBuffer html = new StringBuffer();
-
-        try {
-
-                MyResult result = new MyResult();
-            if (result.next()) {
-
-                eventID = result.getString("id");
-                int processingComplete = result.getInt("processingComplete");
-                String contentKey = result.getString("contentKey");
-                byte[] bytes = result.getBytes("content");
-
-                //
-                // Print content status and associated controls
-                //
-
-                html.append("<br/><font class=\"small\">");
-                html.append("Status: ");
-                switch (processingComplete) {
-                    case  0 :
-                    case  1 : html.append("PENDING"); break;
-                    case  2 : html.append(contentKey); break;
-                    case  3 : html.append(eventID); break;
-                    default : html.append("UNKNONW");
-                }
-                html.append("</font><br/>");
-
-                //
-                // Print at most 20Kb of content unless "showAll" is set
-                //
-
-                int limit = showAll ? Integer.MAX_VALUE : 1024 * 20;
-                System.out.println(limit);
-                html.append("<pre>");
-                for (int i = 0; bytes != null && i < bytes.length; i++) {
-                    char c = (char) bytes[i];
-                    switch (c) {
-                        case '<' : html.append("&lt;");  break;
-                        case '>' : html.append("&gt;");  break;
-                        case '&' : html.append("&amp;"); break;
-                        default  : html.append(c);
-                    }
-
-                    if (i > limit) {
-                        while (bollocks);
-                        // System.out.println("i is " + i);
-                        // System.out.println("limit is " + limit);
-                        html.append("...\n</pre>");
-                        html.append(eventID);
-                        html.append("<pre>");
-                        break;
-                    }
-                }
-                html.append("</pre>");
-            }
-        }
-        catch (Exception exception) {
-            throw exception;
-        }
-        finally {
-            html.append("Oof!!");
-        }
-        String ret = html.toString();
-        System.out.println("Returning string length = "+ ret.length());
-        return ret;
-    }
-
-    public static void main(String[] args) throws Exception {
-                int length=0;
-
-                for (int i = 0; i < 100; i++) {
-                        length = new Test6357214().create("boo").length();
-                        System.out.println(length);
-                }
-    }
-}
-
--- a/test/compiler/5091921/Test6559156.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6559156
- * @summary Server compiler generates bad code for "<= Integer.MAX_VALUE" expression
- *
- * @run main Test6559156
- */
-
-public class Test6559156 {
-
-    static final int N_TESTS = 1000000;
-
-    public static void main(String[] args) throws Exception {
-
-        /*
-         * If MAX_VALUE is changed to MAX_VALUE - 1 below, the test passes
-         * because (apparently) bad code is only generated when comparing
-         * <= MAX_VALUE in the doTest method.
-         */
-        Test6559156 test = new Test6559156();
-        for (int i = 0; i < N_TESTS; i += 1) {
-            test.doTest1(10, Integer.MAX_VALUE, i);
-            test.doTest2(10, Integer.MAX_VALUE, i);
-        }
-        System.out.println("No failure");
-    }
-
-    void doTest1(int expected, int max, int i) {
-        int counted;
-        for (counted = 0;
-             (counted <= max) && (counted < expected);
-             counted += 1) {
-        }
-        if (counted != expected) {
-            throw new RuntimeException("Failed test1 iteration=" + i +
-                                       " max=" + max +
-                                       " counted=" + counted +
-                                       " expected=" + expected);
-        }
-    }
-
-    void doTest2(int expected, int max, int i) {
-        int counted;
-        for (counted = 0;
-             // change test sequence.
-             (counted < expected) && (counted <= max);
-             counted += 1) {
-        }
-        if (counted != expected) {
-            throw new RuntimeException("Failed test1 iteration=" + i +
-                                       " max=" + max +
-                                       " counted=" + counted +
-                                       " expected=" + expected);
-        }
-    }
-}
-
--- a/test/compiler/5091921/Test6753639.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6753639
- * @summary Strange optimisation in for loop with cyclic integer condition
- *
- * @run main/othervm -Xbatch Test6753639
- */
-
-public class Test6753639 {
-    public static void main(String[] args) throws InterruptedException {
-        int END = Integer.MAX_VALUE;
-        int count = 0;
-        for(int i = Integer.MAX_VALUE - 5; i <= END; i++) {
-            count++;
-            if (count > 100000) {
-                System.out.println("Passed");
-                System.exit(95);
-            }
-        }
-        System.out.println("broken " + count);
-        System.out.println("FAILED");
-        System.exit(97);
-    }
-}
-
-
--- a/test/compiler/5091921/Test6850611.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6850611
- * @summary int / long arithmetic seems to be broken in 1.6.0_14 HotSpot Server VM (Win XP)
- *
- * @run main/timeout=480 Test6850611
- */
-
-public class Test6850611 {
-
-    public static void main(String[] args) {
-        test();
-    }
-
-    private static void test() {
-        for (int j = 0; j < 5; ++j) {
-            long x = 0;
-            for (int i = Integer.MIN_VALUE; i < Integer.MAX_VALUE; ++i) {
-                x += i;
-            }
-            System.out.println("sum: " + x);
-            if (x != -4294967295l) {
-                System.out.println("FAILED");
-                System.exit(97);
-            }
-        }
-    }
-}
-
--- a/test/compiler/5091921/Test6890943.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +0,0 @@
-/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6890943
- * @summary JVM mysteriously gives wrong result on 64-bit 1.6 VMs in hotspot mode.
- *
- * @run main/othervm/timeout=240 Test6890943
- */
-
-import java.io.*;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Scanner;
-
-public class Test6890943 {
-    public static final boolean AIR = true, ROCK = false;
-    private static final Path PATH = Paths.get(System.getProperty("test.src", "."));
-    private static final Path INPUT_FILE = PATH.resolve("input6890943.txt");
-    private static final Path GOLDEN_FILE = PATH.resolve("output6890943.txt");
-
-    public static void main(String[] args) {
-        new Test6890943().go();
-    }
-
-    int r, c, f, t;
-    boolean[][] grid;
-
-    public void go() {
-        Scanner in, golden;
-        try {
-            in = new Scanner(new FileInputStream(INPUT_FILE.toFile()));
-            golden = new Scanner(new FileInputStream(GOLDEN_FILE.toFile()));
-        } catch (FileNotFoundException e) {
-            throw new RuntimeException("TEST failure: can't open test file", e);
-        }
-        in.useDelimiter("\\s+");
-        golden.useDelimiter("\\s+");
-
-        int T = in.nextInt();
-        for (t = 0; t < T; t++) {
-            r = in.nextInt();
-            c = in.nextInt();
-            f = in.nextInt();
-            grid = new boolean[r][c];
-            for (int x = 0; x < r; x++) {
-                String line = in.next();
-                for (int y = 0; y < c; y++) {
-                    grid[x][y] = line.charAt(y) == '.';
-                }
-            }
-            int digs = solve();
-            String result = "Case #" + (t + 1) + ": " + (digs == -1 ? "No" : "Yes " + digs);
-            System.out.println(result);
-            // Compare with golden string from the file
-            String goldenStr = golden.nextLine();
-            if (!result.equals(goldenStr)) {
-                System.err.println("FAIL: strings are not equal\n"
-                        + "-- Result: " + result + "\n"
-                        + "-- Golden: " + goldenStr);
-                throw new RuntimeException("FAIL: Result string is not equal to the golden");
-            }
-        }
-    }
-
-    Map<Integer, Integer> M = new HashMap<Integer, Integer>();
-
-    private int solve() {
-        M = new HashMap<Integer, Integer>();
-        M.put(calcWalkingRange(0, 0), 0);
-        for (int digDown = 0; digDown < r; digDown++) {
-            Map<Integer, Integer> tries = new HashMap<Integer, Integer>();
-            for (Map.Entry<Integer, Integer> m : M.entrySet()) {
-                int q = m.getKey();
-                if (depth(q) != (digDown)) continue;
-                if (stuck(q)) continue;
-                tries.put(q, m.getValue());
-            }
-
-            for (Map.Entry<Integer, Integer> m : tries.entrySet()) {
-                int q = m.getKey();
-                int fallLeftDelta = 0, fallRightDelta = 0;
-                //fall left
-                int fallLeft = fall(digDown, start(q));
-                if (fallLeft > 0) {
-                    fallLeftDelta = 1;
-                    if (fallLeft <= f) addToM(calcWalkingRange(digDown + fallLeft, start(q)), m.getValue());
-                }
-
-                //fall right
-                int fallRight = fall(digDown, end(q));
-                if (fallRight > 0) {
-                    fallRightDelta = 1;
-
-                    if (fallRight <= f) addToM(calcWalkingRange(digDown + fallRight, end(q)), m.getValue());
-                }
-
-                for (int p = start(q) + fallLeftDelta; p <= end(q) - fallRightDelta; p++) {
-                    //goLeft
-                    for (int digSpot = p; digSpot > start(q) + fallLeftDelta; digSpot--) {
-                        int fallDown = 1 + fall(digDown + 1, digSpot);
-                        if (fallDown <= f) {
-                            if (fallDown == 1) {
-                                addToM(calcWalkingRange(digDown + 1, digSpot, digSpot, p),
-                                        m.getValue() + Math.abs(digSpot - p) + 1);
-                            } else {
-                                addToM(calcWalkingRange(digDown + fallDown, digSpot),
-                                        m.getValue() + Math.abs(digSpot - p) + 1);
-                            }
-                        }
-                    }
-
-                    //goRight
-                    for (int digSpot = p; digSpot < end(q) - fallRightDelta; digSpot++) {
-                        int fallDown = 1 + fall(digDown + 1, digSpot);
-                        if (fallDown <= f) {
-                            if (fallDown == 1) {
-                                addToM(calcWalkingRange(digDown + 1, digSpot, p, digSpot),
-                                        m.getValue() + Math.abs(digSpot - p) + 1);
-                            } else {
-                                addToM(calcWalkingRange(digDown + fallDown, digSpot),
-                                        m.getValue() + Math.abs(digSpot - p) + 1);
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        int result = Integer.MAX_VALUE;
-        for (Map.Entry<Integer, Integer> m : M.entrySet()) {
-            if (depth(m.getKey()) == r - 1) result = Math.min(m.getValue(), result);
-        }
-
-        if (result == Integer.MAX_VALUE) return -1;
-        return result;
-    }
-
-    private void addToM(int q, int i) {
-        Integer original = M.get(q);
-        if (original == null) M.put(q, i);
-        else M.put(q, Math.min(original, i));
-    }
-
-    private int fall(int row, int column) {
-        int res = 0;
-        for (int p = row + 1; p < r; p++) {
-            if (grid[p][column] == AIR) res++;
-            else break;
-        }
-        return res;
-    }
-
-    private boolean stuck(int q) {
-        return start(q) == end(q);
-    }
-
-    private int depth(int q) {
-        return q % 50;
-    }
-
-    private int start(int q) {
-        return q / (50 * 50);
-    }
-
-    private int end(int q) {
-        return (q / 50) % 50;
-    }
-
-    private int calcWalkingRange(int depth, int pos) {
-        return calcWalkingRange(depth, pos, Integer.MAX_VALUE, Integer.MIN_VALUE);
-    }
-
-    private int calcWalkingRange(int depth, int pos, int airOverrideStart, int airOverrideEnd) {
-        int left = pos, right = pos;
-        if (depth >= r) return (c - 1) * 50 + depth;
-
-        while (left > 0) {
-            if (grid[depth][left - 1] == ROCK && (left - 1 < airOverrideStart || left - 1 > airOverrideEnd)) break;
-            if (depth < r - 1 && grid[depth + 1][left - 1] == AIR) {
-                left--;
-                break;
-            }
-            left--;
-        }
-        while (right < c - 1) {
-            if (grid[depth][right + 1] == ROCK && (right + 1 < airOverrideStart || right + 1 > airOverrideEnd)) break;
-            if (depth < r - 1 && grid[depth + 1][right + 1] == AIR) {
-                right++;
-                break;
-            }
-            right++;
-        }
-
-        return left * 50 * 50 + right * 50 + depth;
-    }
-}
--- a/test/compiler/5091921/Test6897150.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6897150
- * @summary Hotspot optimises away a valid loop
- *
- * @run main Test6897150
- */
-
-// Should be compiled with javac from JDK1.3 to get bytecode which shows the problem.
-public class Test6897150 {
-    public static void main(String[] args) {
-        // This works
-        loopAndPrint(Integer.MAX_VALUE -1);
-        // This doesn't
-        loopAndPrint(Integer.MAX_VALUE);
-    }
-
-    static void verify(int max, int a) {
-        if ( a != (max - 1)) {
-            System.out.println("Expected: " + (max - 1));
-            System.out.println("Actual  : " + a);
-            System.exit(97);
-        }
-    }
-    static void loopAndPrint(int max) {
-        int a = -1;
-        int i = 1;
-        for (; i < max; i++) {
-            a = i;
-        }
-        verify(max, a);
-    }
-}
-
--- a/test/compiler/5091921/Test6905845.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6905845
- * @summary Server VM improperly optimizing away loop.
- *
- * @run main/timeout=480 Test6905845
- */
-
-public class Test6905845 {
-
-   public static void main(String[] args){
-      for (int asdf = 0; asdf < 5; asdf++){
-         //test block
-         {
-            StringBuilder strBuf1 = new StringBuilder(65);
-            long          start   = System.currentTimeMillis();
-            int           count   = 0;
-
-            for (int i = Integer.MIN_VALUE; i < (Integer.MAX_VALUE - 80); i += 79){
-               strBuf1.append(i);
-               count++;
-               strBuf1.delete(0, 65);
-            }
-
-            System.out.println(count);
-            if (count != 54366674) {
-              System.out.println("wrong count: " + count +", should be 54366674");
-              System.exit(97);
-            }
-         }
-         //test block
-         {
-            StringBuilder strBuf1 = new StringBuilder(65);
-            long          start   = System.currentTimeMillis();
-            int           count   = 0;
-
-            for (int i = Integer.MIN_VALUE; i < (Integer.MAX_VALUE - 80); i += 79){
-               strBuf1.append(i);
-               count++;
-               strBuf1.delete(0, 65);
-            }
-
-            System.out.println(count);
-            if (count != 54366674) {
-              System.out.println("wrong count: " + count +", should be 54366674");
-              System.exit(97);
-            }
-         }
-      }
-   }
-}
-
--- a/test/compiler/5091921/Test6931567.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6931567
- * @summary JIT Error (on class file compiled with eclipse) on JVM x64 (but not on x32!).
- *
- * @run main Test6931567
- */
-
-// Should be compiled with javac from JDK1.3 to get bytecode which shows the problem.
-public class Test6931567 {
-
-    public static void main(final String[] args) {
-        booleanInvert(Integer.MAX_VALUE);
-        booleanInvert(Integer.MAX_VALUE - 1);
-    }
-
-    private static void booleanInvert(final int max) {
-        boolean test1 = false;
-        boolean test2 = false;
-
-        for (int i = 0; i < max; i++) {
-            test1 = !test1;
-        }
-
-        for (int i = 0; i < max; i++) {
-            test2 ^= true;
-        }
-
-        if (test1 != test2) {
-            System.out.println("ERROR: Boolean invert\n\ttest1=" + test1
-                    + "\n\ttest2=" + test2);
-            System.exit(97);
-        } else {
-            System.out.println("Passed!");
-        }
-    }
-}
-
--- a/test/compiler/5091921/Test6935022.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6935022
- * @summary Server VM incorrectly breaks out of while loop
- *
- * @run main Test6935022
- */
-
-public class Test6935022 {
-    public static final void main(String[] args) throws Exception {
-        Test6935022 test = new Test6935022();
-
-        int cnt = 0;
-
-        while (cnt < 10000) {
-            try {
-                ++cnt;
-                if ((cnt&1023) == 0)
-                  System.out.println("Thread="+Thread.currentThread().getName() + " iteration: " + cnt);
-                test.loop(2147483647, (cnt&1023));
-            }
-
-            catch (Exception e) {
-                System.out.println("Caught on iteration " + cnt);
-                e.printStackTrace();
-                System.exit(97);
-            }
-        }
-    }
-
-    private void loop(int endingRow, int mask) throws Exception {
-        int rows = 1;
-        boolean next = true;
-
-        while(rows <= endingRow && next) {
-            rows++;
-            if (rows == mask)
-              System.out.println("Rows="+rows+", end="+endingRow+", next="+next);
-            next = next(rows);
-        }
-
-        if (next)
-            throw new Exception("Ended on rows(no rs): " + rows);
-    }
-
-    private boolean next(int rows) {
-        return rows < 12;
-    }
-}
-
--- a/test/compiler/5091921/Test6959129.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6959129
- * @summary COMPARISON WITH INTEGER.MAX_INT DOES NOT WORK CORRECTLY IN THE CLIENT VM.
- *
- * @run main/othervm -ea Test6959129
- */
-
-public class Test6959129 {
-
-  public static void main(String[] args) {
-    long start  = System.currentTimeMillis();
-    int min = Integer.MAX_VALUE-30000;
-    int max = Integer.MAX_VALUE;
-    long maxmoves = 0;
-    try {
-      maxmoves = maxMoves(min, max);
-    } catch (AssertionError e) {
-      System.out.println("Passed");
-      System.exit(95);
-    }
-    System.out.println("maxMove:" + maxmoves);
-    System.out.println("FAILED");
-    System.exit(97);
-  }
-  /**
-   * Imperative implementation that returns the length hailstone moves
-   * for a given number.
-   */
-  public static long hailstoneLengthImp(long n) {
-    long moves = 0;
-    while (n != 1) {
-      assert n > 1;
-      if (isEven(n)) {
-        n = n / 2;
-      } else {
-        n = 3 * n + 1;
-      }
-      ++moves;
-    }
-    return moves;
-  }
-
-  private static boolean isEven(long n) {
-    return n % 2 == 0;
-  }
-
-  /**
-   * Returns the maximum length of the hailstone sequence for numbers
-   * between min to max.
-   *
-   * For rec1 - Assume that min is bigger than max.
-   */
-  public static long maxMoves(int min, int max) {
-    long maxmoves = 0;
-    for (int n = min; n <= max; n++) {
-      if ((n & 1023) == 0) System.out.println(n);
-      long moves = hailstoneLengthImp(n);
-      if (moves > maxmoves) {
-        maxmoves = moves;
-      }
-    }
-    return maxmoves;
-  }
-}
-
--- a/test/compiler/5091921/Test6985295.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6985295
- * @summary JVM fails to evaluate condition randomly
- *
- * @run main/othervm -Xbatch Test6985295
- */
-
-public class Test6985295 {
-
-    public static void main(String[] args) {
-        int min = Integer.MAX_VALUE-50000;
-        int max = Integer.MAX_VALUE;
-        System.out.println("max = " + max);
-        long counter = 0;
-        int i;
-        for(i = min; i <= max; i++) {
-            counter++;
-            if (counter > 1000000) {
-              System.out.println("Passed");
-              System.exit(95);
-            }
-        }
-        System.out.println("iteration went " + counter + " times (" + i + ")");
-        System.out.println("FAILED");
-        System.exit(97);
-    }
-}
-
--- a/test/compiler/5091921/Test6992759.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6992759
- * @summary Bad code generated for integer <= comparison, fails for Integer.MAX_VALUE
- *
- * @run main/timeout=240 Test6992759
- */
-
-public class Test6992759 {
-
-    static final int N_TESTS = 1000000000;
-
-    public static void main(String[] args) throws Exception {
-
-        /*
-         * If MAX_VALUE is changed to MAX_VALUE - 1 below, the test passes
-         * because (apparently) bad code is only generated when comparing
-         * <= MAX_VALUE in the doTest method.
-         */
-        Test6992759 test = new Test6992759();
-        for (int i = 0; i < N_TESTS; i += 1) {
-            test.doTest(10, Integer.MAX_VALUE, i);
-            //test.doTest(10, Integer.MAX_VALUE - 1, i);
-        }
-        System.out.println("No failure");
-    }
-
-    void doTest(int expected, int max, int i) {
-        int counted;
-        for (counted = 0;
-             (counted <= max) && (counted < expected);
-             counted += 1) {
-        }
-        if (counted != expected) {
-            throw new RuntimeException("Failed test iteration=" + i +
-                                       " max=" + max +
-                                       " counted=" + counted +
-                                       " expected=" + expected);
-        }
-    }
-}
-
--- a/test/compiler/5091921/Test7005594.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 7005594
- * @summary Array overflow not handled correctly with loop optimzations
- *
- * @run shell Test7005594.sh
- */
-
-public class Test7005594 {
-
-      static int test(byte a[]){
-          int result=0;
-          for( int i=0; i<a.length; i+=((0x7fffffff>>1)+1) ){
-              result += a[i];
-          }
-          return result;
-      }
-
-      public static void main(String [] args){
-          byte a[]=new byte[(0x7fffffff>>1)+2];
-          int result = 0;
-          try {
-              result = test(a);
-          } catch (ArrayIndexOutOfBoundsException e) {
-              e.printStackTrace(System.out);
-              System.out.println("Passed");
-              System.exit(95);
-          }
-          System.out.println(result);
-          System.out.println("FAILED");
-          System.exit(97);
-      }
-
-}
-
--- a/test/compiler/5091921/Test7005594.sh	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-#!/bin/sh
-# 
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-# 
-# This code is free software; you can redistribute it and/or modify it
-# 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.
-# 
-# 
-## some tests require path to find test source dir
-if [ "${TESTSRC}" = "" ]
-then
-  TESTSRC=${PWD}
-  echo "TESTSRC not set.  Using "${TESTSRC}" as default"
-fi
-echo "TESTSRC=${TESTSRC}"
-## Adding common setup Variables for running shell tests.
-. ${TESTSRC}/../../test_env.sh
-
-# Amount of physical memory in megabytes
-MEM=0
-if [ -f "/proc/meminfo" ]; then
-  # Linux, Windows/Cygwin
-  MEM=`cat /proc/meminfo |grep ^MemTotal: | awk '{print $2}'`
-  MEM="$(($MEM / 1024))"
-elif [ -x "/usr/sbin/prtconf" ]; then
-  # Solaris
-  MEM=`/usr/sbin/prtconf | grep "^Memory size" | awk '{print $3}'`
-elif [ -x "/usr/sbin/system_profiler" ]; then
-  # MacOS
-  MEMo=`/usr/sbin/system_profiler SPHardwareDataType | grep Memory:`
-  MEM=`echo "$MEMo" | awk '{print $2}'`
-  MEMu=`echo "$MEMo" | awk '{print $3}'`
-  case $MEMu in
-  GB)
-    MEM="$(($MEM * 1024))"
-    ;;
-  MB)
-    ;;
-  *)
-    echo "Unknown memory unit in system_profile output: $MEMu"
-    ;;
-  esac
-elif [ -n "$ROOTDIR" -a -x "$ROOTDIR/mksnt/sysinf" ]; then
-  # Windows/MKS
-  MEM=`"$ROOTDIR/mksnt/sysinf" memory -v | grep "Total Physical Memory: " | sed 's/Total Physical Memory: *//g'`
-  MEM="$(($machine_memory / 1024))"
-else
-  echo "Unable to determine amount of physical memory on the machine"
-fi
-
-if [ $MEM -lt 2000 ]; then
-  echo "Test skipped due to low (or unknown) memory on the system: $MEM Mb"
-  exit 0
-fi
-
-echo "MEMORY=$MEM Mb"
-
-set -x
-
-cp ${TESTSRC}/Test7005594.java .
-cp ${TESTSRC}/Test7005594.sh .
-
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} -d . Test7005594.java
-
-${TESTJAVA}/bin/java ${TESTOPTS} -Xmx1600m -Xms1600m -XX:+IgnoreUnrecognizedVMOptions -XX:-ZapUnusedHeapArea -Xcomp -XX:CompileOnly=Test7005594.test Test7005594 > test.out 2>&1
-
-result=$?
-
-cat test.out
-
-if [ $result -eq 95 ]
-then
-  echo "Passed"
-  exit 0
-fi
-
-if [ $result -eq 97 ]
-then
-  echo "Failed"
-  exit 1
-fi
-
-# The test should pass when no enough space for object heap
-grep "Could not reserve enough space for .*object heap" test.out
-if [ $? = 0 ]
-then
-  echo "Passed"
-  exit 0
-else
-  echo "Failed"
-  exit 1
-fi
--- a/test/compiler/5091921/Test7020614.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 7020614
- * @summary "-server" mode optimizer makes code hang
- *
- * @run main/othervm/timeout=30 -Xbatch Test7020614
- */
-
-public class Test7020614 {
-
-    private static final int ITERATIONS = 1000;
-    private static int doNotOptimizeOut = 0;
-
-    public static long bitCountShort() {
-        long t0 = System.currentTimeMillis();
-        int sum = 0;
-        for (int it = 0; it < ITERATIONS; ++it) {
-            short value = 0;
-            do {
-                sum += Integer.bitCount(value);
-            } while (++value != 0);
-        }
-        doNotOptimizeOut += sum;
-        return System.currentTimeMillis() - t0;
-    }
-
-    public static void main(String[] args) {
-        for (int i = 0; i < 4; ++i) {
-            System.out.println((i + 1) + ": " + bitCountShort());
-        }
-        System.out.println("doNotOptimizeOut value: " + doNotOptimizeOut);
-    }
-}
-
--- a/test/compiler/5091921/input6890943.txt	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1543 +0,0 @@
-50
-4 5 1
-.....
-#####
-..###
-.#...
-4 5 1
-.....
-#####
-###..
-...#.
-5 4 2
-....
-####
-..##
-.###
-.#.#
-6 10 5
-..........
-####.#####
-####.#####
-####.#####
-####.#####
-####.#####
-6 10 4
-..........
-#....#####
-#....#####
-#....#####
-#....#####
-#....#####
-6 10 1
-..........
-####.#####
-####.#####
-####.#####
-####.#####
-####.#####
-6 10 2
-..........
-####.#####
-####.#####
-####.#####
-####.#####
-####.#####
-6 11 2
-.....######
-###########
-###.......#
-###.#.#...#
-###.#.##..#
-###.#.###.#
-6 11 1
-.....######
-###########
-###.......#
-###.#.#...#
-###.#.##..#
-###.#.###.#
-6 11 2
-.......####
-###########
-###.......#
-###.#.#...#
-###.#.##..#
-###.#.###.#
-7 11 1
-..#........
-##.#.......
-###.#......
-####.#.....
-#####.#....
-######.#...
-#########..
-13 16 2
-................
-#.#.#.#.#.#.#.#.
-................
-.#.#.#.#.#.#.#.#
-................
-#.#.#.#.#.#.#.#.
-................
-.#.#.#.#.#.#.#.#
-................
-#.#.#.#.#.#.#.#.
-................
-.#.#.#.#.#.#.#.#
-................
-4 16 3
-................
-#.#.#.#.#.#.#.#.
-.#.#.#.#.#.#.#.#
-................
-50 50 1
-..................................................
-################################################.#
-.#............#....#.......................#....##
-..#.....#......#....#.....................#....#..
-...#.......#....#....#...................#....#...
-#...#....#.......#....#.................#....#....
-##...#.......#....#....#...............#....#.....
-###...#....#.......#....#.............#....#......
-####...#.......#....#....#...........#....#.......
-.####...#....#.......#....#.........#....#........
-..####...#.......#....#....#.......#....#.........
-...####...#....#.......#....#.....#....#..........
-....####...#.......#....#....#...#....#...###.....
-.....####...#....#.......#....#.#....#..##..###...
-......####...#.......#....#....#.............##...
-.......####...#....#.......#...............##.....
-........####...#.......#....#............##.......
-.........####...#....#.......#.........#######....
-..###.....####...#.......#....#...................
-.#..###....####...#....#.......#.........####.....
-##...###....####...#.......#....#.......##..##....
-##...........####...#....#.......#......##..##....
-##..####......####...#.......#....##....##..##....
-##....##.......####...#....#......##....##..##....
-.###.##.........####.............##.....##..##....
-..###............#######........##.......####.....
-.........###......######.......##.................
-.......##..##..........#......##.........####.....
-......##....##........#......##.........##..##....
-......##.............#......##..........##..##....
-......##............#......##...........##..##....
-......##....#......#......##............##..##....
-.......##..##.....#....########.........##..##....
-........####.....#.....###.#...#.........####.....
-.#####..........#.....#..##.#...#.................
-...##..........#.....#....##.#...#.........####...
-...##.........#.....#..#...##.#...#.......##..##..
-...##........#.....#..##....##.#...#......##..##..
-...##.......#.....#....##....##.#...#.....##..##..
-##.##......#.....#...###......##.#...#.....#####..
-.###......#.....#..##..........##.#...#.......##..
-.........#.....#...##..####.....##.#...#.....##...
-........#.....#...###..#.##......##.#...#...##....
-.......#.....#....##.....###......##.#...#........
-......#.....#..#.##...###..........##.#...#.......
-.....#.....#...##..#..#..##.##.#....##.#...#......
-....#.....#........###.....##........##.#...#.....
-...#.....#.......##...####..###.......##.#...#....
-..#.....#......##.#.#..#.#..##.........##.#...#...
-.#..............#.#.#.#.#.#.#...........##.#...#..
-50 50 13
-..................................................
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-##################################################
-20 49 5
-.................................................
-#################################################
-#################################################
-##################################.##############
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-############################.####################
-#################################################
-######.##########################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-49 49 48
-.................................................
-#################################################
-################################################.
-#################################################
-####################################.############
-#################################################
-##########.######################################
-#######.#########################################
-#################################################
-#################################################
-#################################################
-#######################################.#########
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-###########################################.#####
-#################################################
-#################################################
-###.#############################################
-###############.#################################
-#################################################
-##.##############################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#####################################.###########
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#####.###########################################
-#####################.###########################
-#################################################
-###.#############################################
-#################################################
-#################################################
-#################################################
-#############.###########.#######################
-###.##############.####.#########################
-#########################################.#######
-#################################################
-########################################.########
-40 49 10
-.................................................
-#################################################
-..#..............#...............................
-.......................#.......................#.
-..#....#...................#.................#...
-..........#...............................#......
-............#..................#.......#.........
-........#............#............#..............
-...................#.....#.......................
-....#..........#........................#........
-....#.................................#......#...
-...........#.....................................
-....................#............................
-.##........#................#....................
-..............#..................................
-........#......................................#.
-.................................#....#........#.
-.................................................
-.............................#..##...............
-...........................................#.#...
-........#..........#........#.............#.....#
-..........#.#....................................
-.............................#............#......
-.......#.......................#.........#.......
-..............................#..................
-......#..........................................
-.............#................#..................
-......#.............................#............
-#.................#..................#......#....
-..............#..................................
-...........#...........................#.....#...
-............#............#...#...................
-.......................#.......................#.
-............................#....................
-..........................#......................
-...........................#.............#...#...
-.#...............................................
-..................#..............................
-...#..............................#..............
-.....#..................#........................
-49 49 20
-.........................................##..#..#
-########################################.##...#.#
-#.##..#....#####..####...#..#.##.###.#..#..#.....
-..#...#.##...##.#....#...##..#.#..###...###......
-..#..##.#.###......#.....##.....#.......##.#.#.#.
-..##......###.#.##.....##.#..#.##.###..##.#.#####
-#.#.##....#..#..#.....#.#.##.#.#.##.#.....###.#.#
-..###.#..#..###...###..#.#.....#..######.#.#....#
-..#...#...##.#..##.#.#.#..###.#..#..#...#....##..
-.#..#.#..##.#...##........##.##..#..........#.#..
-#.#.###.####...#.#...#..###..#.##....#...........
-#..#.#######.#....#.#.##...#.#.............##....
-###..###....#..#....#.#.###...#..##.#.#..##.#####
-....####...#.#...........##.#.#.#..#.#.#.##.#.#..
-##.#...##..#..#...#..##..####.##.#...#.....#...#.
-...###.##.#..##.....#.#.##..#..###.#.###.#.#..#.#
-###....##...#.#.##.##..#.#...#...##....#.###.....
-##..#....###..#.....#..#....#.#.#.##.......##.###
-.#.#....#.....####..##....##...##...#.##..##.#...
-##....#....#.#.###.##...#..##.##...##....#.######
-..#....#..##.....##.##.#.........##..##...#.#....
-#..#..#.#....##.#.#...#.###..#...#..#.##.#.#....#
-.....#..#...###.....##...###....###.##.....#...#.
-#..#.#...###..#....#..####....#.#......#..##....#
-.....#.#...###...###.#..#.#.#.........#.#.#..#.##
-.#..##..##..#..#.#....##.........#..#.##.#..##...
-##.#.#.....##.##..###...#.#.#..#.#.####.#.###.#..
-..#.#.......#.#.#...#####..#.##.#....#...#.#.....
-..########.####.....#..#.........#..#####.##.#...
-.#......##.####..###..#.####........#....#....#.#
-#.....#....#...#...#..###......#.##..#..#...#.###
-...#..###.....#....#..#..#......#.....#.#.#.#..##
-....#.##..####.#..###...#...#...#######..#..#....
-.#..#...##...#...#......##...#####.##...#..##....
-..#.#.#######.#....#.#.###....#.##...#..#.##..#..
-#..#.##.#.#.##..###....#.##.#..#..#...##....##..#
-.###.#.#..##.###...#..##.#.#...#.#.####....#..###
-#.#......#...##.##...#.#.....##..#..##....#.##...
-#.#...#.#.##...##.###.#..##..##..####..##.#.#...#
-....#....#..####.##.....#.#....#..##..##....#..#.
-....#...###.....##..#..###....#........###..##..#
-.###....##...........#....#........####.#.####..#
-.#........##...#.###..###.#...##.##..###..###..##
-#.#######.#....###...#..##..#...#....##....#....#
-#....#..#......#..#...##.....##.#.#.#..#......##.
-#.##.##.#.#.##..#..##..######.##.###.#.#..#....#.
-.###.##.....#.##.#..###....###..##....#.#..#.....
-#####..#.#....#.#......##..##.#...........####.#.
-..#..#.#..#...##....###.##.#.#...#..#..#....#..##
-49 49 5
-.........................................#....###
-#########################################..#.....
-.....#.###...#...#...........##...#...#....#...#.
-....#.....#..#....#....##...#..###.#...#..##.#.##
-....#...###.##...........#.#.##.......#.#.#.#..#.
-...........#..###..#..##.....#.........#.....#...
-.....#......#.##.#..##.###.....#...###.#....#...#
-.#......##.#.......##...##.....###..#......#.##..
-#.....#.#..#.#...#####...#.###.##.....#..#.......
-........##....#....#....#.#.#....####....#.##.###
-....#.#......#.##.....#..........##.............#
-#..##....#.#....#..#.....#.#.#....#.#.#....##...#
-...#..##..#...#....#.#....#..#....#..#..#.......#
-......#...##.#.####.....####.###.#..#........####
-##..........#...........#..#.##......##......#.##
-....###....##...#.####.....#............#..#.....
-...#....#....##.....##.....#.#.....#..#.#..#..#..
-...........#...#.##..##..##.#......#..#.#..##....
-.#........##......#.........##..#..........#.#...
-#....##.#.##..#.....#.....##.....##....#.........
-.#.......###.......#..#.....#.....#..##.##...#..#
-###......##.....##...##..#.#....#...####.##......
-....#..#....##...#.##.##.#.#...#...#.#..#.##.#..#
-..........#.#..#####..####....##..#.#.#.........#
-........##.#.###..###....#...#........##.#......#
-...........##.##..#.....#.#.#..#....#.###..#.###.
-#.#....#.#...##............#.#.....#....#...#.#..
-..###.#.##...#....#..##.##...#........#..........
-...........#...##...#..#..##.....#..#.......#..#.
-#.#.#......##.#.....#...#.#.#.#...#..#######.#.##
-...##..#.......###..#..#.##....#......####.#.....
-....##......#.#......#....##..#...##.......#..#..
-#..###.##....##..##.#..#.###.##.....#...#........
-#......#....####....#.........#.........#.##.##..
-.#.#..###......#...##.#.##..#.#.....#...#.#......
-......#.#...##.#....#..#.#.......#.#.....#.#.###.
-###..#.....#....#.#...##..#.#.....#.#.....#.#.#..
-..........#........#....#...#..#...#...#.#.#.#...
-#..##..#...###....#.#..#....##....#...#..##....#.
-.#.#.#....#..##.#...#.....#.##..#....##........#.
-..#.##....###...#...#..#..#.....#..#..###..#...#.
-##....#........#..#..#..#......#...#.##....#.#.##
-....#.............#..#...#...#.#.#...##....#..#.#
-...#.........#....###.....#.#..#..#...#..#...#...
-.#.#.###..###..##.#.##...#...#..#................
-.#......#..#..#.#.#...#.....................#..#.
-..#.....#.......#..##.......#...#...##.#.....#.#.
-#..####.#....#......#.........#.#...###...#....#.
-#.#.#.#....#......#..#.#........###..#....##.....
-31 47 7
-.........................#.#..##.#..#...#.#...#
-#########################.#.#...#...#.#........
-...#...........#...#...#...##...#..#.#.#...#.##
-.#........#.......#.#.....#......#........#....
-#.#....###...#...#....#....#......##...#.......
-#.#......##..##...#.....#.##.#.........#.......
-.......#.....##........#..#.......#.##...#.....
-..#.......##.#...#.#..#.#..#....#......#......#
-#.##.........#####..###.......#........#......#
-.#..#.#.#...#....####...#...........#....#.....
-##..##..#..###..###....##......#....#..##...#.#
-#......#........##...#.#.#..#..#....#..#...##.#
-.#.#.##..........#.#..#...##.##................
-##.##.#...#....#.............#.#.....###...#.#.
-..#..#.#..#..#.#....#....#............#.##..#..
-......###......#..##..#.#...##.........#.#.###.
-..#.##.#..#......##....#.#........#....##..#..#
-.........#.#.#.....##...#.#...#.##.....##.##...
-.#........#...#.###.........#.#.#..............
-....##........#.....#....###....###.#..#....##.
-..#..#....#....#.#.......#.#.#..........###....
-.#..###.#...#.###...##...#....#...#............
-##.....#..##.#.##.##.......#.##.....###...##.#.
-.###.......#...#.....#.....###.........#...#...
-#.....#..####.....##...#........####..........#
-#..#...........##.#.#.#..............#....##...
-..#.#..........#..##.#.##...##..##.#.#..##..#..
-#..........................###......#....##....
-.....#..........#..#......#...#.#..#....#...#..
-#......#....##.........#..#.......#..#.......#.
-.#......#...###...##....##.#..........#...#..#.
-44 35 13
-...........................##..####
-############################.....##
-..###.#.##.#...#.##.####.###.###.##
-#.##.#.#.#.#..###.#..#...###.##..##
-.#.##.#.##..#.###.###.##.#.#...#.#.
-##....##.#..#####.#.####..##.##...#
-####.##..##.###.##.#.#...#.##.###.#
-#.#######.#.#.#..#.#..#..#...###.#.
-##.###.#..#.####.##.#.#########.##.
-#.##.#######..#.#.####.#..#..######
-.#.##..########...##.###..#..##.##.
-#.#######.###...##.#...#.####.#..#.
-.###..###....#.#.##.###..##.##.##.#
-...#.###.#.##.#.####.##.####.#.#...
-#..#......##....#.##.#.#.###.#..#..
-...##.###.###.#.####..#.#.#..###.#.
-.#####.#..#..##.#.#...##.#.#.##...#
-..##..#.#....##.#.#.###.##.##...#..
-###.#..###....#######..#.#.###.##.#
-##.##.#.#.##..#.#.#.#.#..##.####...
-##.###...#.###.#.#.#..#####.###.#..
-...#.#...##......#.##..##.##.#.#.##
-##..#..####..###...###.#........###
-##..#....#..#.#..##.#####..###.#...
-##...#.#####.###.##....###...####..
-#.####.#..#.##.#.#...#.###.#...##..
-####.#####.###.#.##...##...#...#.##
-#..##.##....###..#..####.##..#.#.##
-..#.###.##....####.##.#..###.#....#
-#.#.###.#..#.##.##...###.##..######
-##.#.##.###.#..#...###.####..##.###
-.########.#....#..#........#..##..#
-####..#.##.#.##.####..#.###...#####
-#..##..#..##.###....####.#.#...#.#.
-.#...##.##.###.###...##..##..###...
-###.##...#.##...####.#.#.##..#.####
-##.###..##.#....#.###..##.#...###.#
-##..##.###..#..#.####.#.....##.####
-.#....##...#####.....####...#.##.#.
-##.#.#.....##...#..#...#....#....##
-#..#.#..#####.##..###.#.###########
-.#.###.#..###.##.###.#.###.##.#.###
-.###..####.#..##......#..##.######.
-...##..###.#.....##.#.#..##......#.
-6 10 2
-.......#..
-##########
-##.#...#..
-.#..###...
-#.##.#####
-.####..#.#
-7 9 4
-......##.
-#########
-.#.###.##
-..#...#..
-.....##.#
-####...##
-.#..#.#.#
-10 9 2
-.........
-#########
-..###.###
-#..###.##
-.....#.#.
-..##.....
-###.#....
-.##..#...
-##...#..#
-#..##..##
-10 7 1
-....#..
-####..#
-####..#
-..#.#..
-...##.#
-#....##
-..#..##
-#.#....
-.##.#..
-###...#
-6 10 2
-.......#..
-#######.#.
-..##.#.##.
-..#..#....
-.#.#....##
-..#....#..
-40 40 5
-........................................
-###############################..#######
-#..##############.....##################
-........................................
-...........................##########...
-#####...################..##############
-##################.#####################
-.............................#####......
-#.............................##########
-...............................####.....
-.........#################..............
-..........................###...........
-........................................
-....................#####...............
-##########....................##########
-.......##################...............
-########........###############..#######
-........................................
-..........#########################.....
-#####...................................
-.........................####...........
-......................#####...######....
-######..................################
-........#########.......................
-############.........................###
-........####################............
-......................##################
-....................######......#.......
-............################............
-........................................
-......................#########.........
-#######............#####################
-........###############.................
-........................................
-.........###################............
-.............................#..........
-######................................##
-........................#############...
-......##................................
-........................................
-30 20 11
-....................
-####################
-......##.##.........
-#.....####....######
-...##...............
-........#######.###.
-.......##...........
-....#####..##.......
-........##.#........
-.....###...........#
-..##########.....##.
-..#........#.#......
-......##...##.......
-....##...###..###...
-.####...#####...####
-###.................
-.......##...........
-..........###..####.
-..####..#####.#####.
-..###....#.......##.
-......##....##......
-....##.###..........
-.##.....#####..#....
-....................
-......###...........
-####..###.#########.
-.......#######......
-....###.............
-.........###.#####..
-................####
-50 20 17
-....................
-###################.
-#..##...............
-....................
-............####....
-........#####.......
-..............#..#..
-.........####...####
-.............####...
-.....#....###.......
-####...............#
-....................
-.....######.........
-......#.............
-.####......#####....
-.............##.....
-#####....#####......
-..#####.............
-##..####....###..###
-....................
-....................
-........######.###..
-....####....#####...
-....########........
-...#####............
-.###................
-...............###..
-.......#########....
-..................##
-.......####.........
-..#####.............
-...####.............
-.##..........#####..
-....................
-...#.##.......###...
-######.....##......#
-......####..........
-......#.............
-....................
-....................
-....................
-.....#..............
-.....####....###....
-......#.........####
-.......######...###.
-....................
-....................
-##...........###...#
-.###................
-......#######.......
-45 25 10
-.........................
-#########################
-#...................#..##
-....................#....
-.........................
-.........................
-...................#####.
-##.....................##
-.#.....................#.
-##.....................##
-.........................
-.....####................
-.....##.#................
-.....##.#................
-.....##.#............####
-.....##.#.......###..####
-.....##.#.......#.#......
-.....##.######..#.#......
-.....####....#..#.#..###.
-........#....#..#.#..###.
-...##...#....#..#.#......
-...##...#....#..#.#......
-...##...#....#..#.#......
-...##...#....#..#.#......
-...########..#..###......
-##.##...#....#........###
-.#.##...######..#####.#..
-.#.##...........#...#.#..
-.#.##...........#...#.#..
-.#..............#...#.#..
-.#..............#...#.#..
-.#.####.........#...#.#..
-.#.#..#.........#...#.#..
-.#.#..#.........#####.#..
-##.#.##########.......###
-...#.####.....#..........
-..#####.#.....#..####....
-..#####.#.....#..#..#....
-..#..#..#.....#..#..#....
-..#..#..#.....#..#..#....
-#.#..#..#.....#..#..#..##
-#.#..#..#######..#..#..#.
-#.####.......#####..#..#.
-#............#..##..#..#.
-#............########..#.
-25 45 5
-.............................................
-#############################################
-..........#...###################.#...#......
-#########.#....##############################
-#########.#.............##################...
-####################....#####################
-#########..........#........#################
-####################........#################
-..................####################.....#.
-####..............#...........###############
-######################################.######
-#########################.....#...###########
-###.###################.......#.....#########
-#####.#.........#.....#.....#################
-#############################################
-###.#############...####............#########
-......############################...#....#..
-....#########....................#...######..
-##########.##..............##################
-#####################......##################
-#############################################
-#############################################
-#######################################...###
-#############################################
-##########....###############################
-40 40 5
-...............................#########
-########################################
-########################################
-########################################
-#########....###########################
-########################################
-########################################
-########################################
-########################################
-########################################
-########################################
-..#######.######################........
-########################################
-########################################
-########################################
-...........#####################........
-####.................###################
-########################################
-########################################
-########################################
-########################################
-#####................###################
-###################...........##########
-########################################
-########################################
-.......##############################...
-########################################
-########################################
-########################################
-##############..............############
-########################################
-########################################
-########################################
-########################################
-########################################
-########################################
-########################################
-########################################
-########################################
-########################################
-30 20 2
-....................
-####################
-#############.....##
-##...###############
-####################
-####################
-####################
-....##.....#...#....
-####################
-##########.#########
-###....#############
-#########....#######
-###....#############
-####################
-....#######.....###.
-####################
-########.###########
-####################
-#############.....##
-....#####..#########
-####################
-##..########.##.####
-########.###########
-#########..#########
-#........###########
-#########..######.##
-###.################
-####################
-####################
-##############...###
-50 20 7
-...................#
-####################
-#####...############
-####################
-####################
-####################
-####################
-####################
-####################
-.....##############.
-####################
-####################
-.........########...
-####################
-####################
-####################
-####################
-####################
-####################
-####################
-####################
-####################
-####################
-####################
-####################
-####################
-#########.##########
-####################
-####################
-####################
-....###########.....
-####################
-####################
-####################
-####################
-####################
-####################
-####################
-####################
-##........##########
-####################
-####################
-####################
-####################
-####################
-####################
-####################
-####################
-....##########......
-####################
-49 49 3
-.................................................
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-.................................................
-.................................................
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-........##########...............................
-#################################################
-###########..................####################
-#################################################
-#################################################
-#################################################
-#################################################
-.................................................
-#################################################
-#################################################
-#################################################
-#################################################
-#################################################
-.......#####.....................................
-.................................................
-#################################################
-................................################.
-..................................###########....
-#################################################
-#################################################
-#################################################
-#################################################
-45 25 4
-.........................
-#########################
-########............#####
-#########################
-.........................
-###############.#######.#
-###############.#######.#
-############....#######.#
-.........................
-############.#.##########
-############...##########
-#########################
-.................######..
-################.######.#
-.........................
-....................##...
-.........................
-#########################
-#########################
-#########################
-#########################
-#########################
-#########################
-..........####...........
-##.......................
-##.......................
-#########.####.##########
-..........####...........
-#########################
-#########################
-#########################
-#########################
-#########################
-#########################
-.........................
-##################.######
-##################.######
-##################.######
-.........................
-#########################
-#########################
-#########################
-.........................
-.........................
-.........................
-25 45 5
-.............................................
-#############################################
-####################################.########
-###########.#################################
-###########.#################################
-###########.#################################
-#############################################
-#############################################
-#############################################
-#############################################
-#############################################
-#############################################
-#############################################
-#############################################
-#############################################
-#############################...#############
-#############################.#.#############
-#############################...#############
-#############################################
-#############################################
-#############################################
-###..########################################
-###..########################################
-#########################################....
-####################################.####.##.
-50 50 18
-..................................................
-##################################################
-..##..##..##..##..##..##..##..##..##..##..##..##..
-.###.###.###.###.###.###.###.###.###.###.###.###.#
-....####....####....####....####....####....####..
-.#.#####.#.#####.#.#####.#.#####.#.#####.#.#####.#
-..######..######..######..######..######..######..
-.#######.#######.#######.#######.#######.#######.#
-........########........########........########..
-.#.#.#.#########.#.#.#.#########.#.#.#.#########.#
-..##..##########..##..##########..##..##########..
-.###.###########.###.###########.###.###########.#
-....############....############....############..
-.#.#############.#.#############.#.#############.#
-..##############..##############..##############..
-.###############.###############.###############.#
-................################................##
-.#.#.#.#.#.#.#.#################.#.#.#.#.#.#.#.###
-..##..##..##..##################..##..##..##..####
-.###.###.###.###################.###.###.###.#####
-....####....####################....####....######
-.#.#####.#.#####################.#.#####.#.#######
-..######..######################..######..########
-.#######.#######################.#######.#########
-........########################........##########
-.#.#.#.#########################.#.#.#.###########
-..##..##########################..##..############
-.###.###########################.###.#############
-....############################....##############
-.#.#############################.#.###############
-..##############################..################
-.###############################.#################
-................................##################
-.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.###################
-..##..##..##..##..##..##..##..####################
-.###.###.###.###.###.###.###.#####################
-....####....####....####....######################
-.#.#####.#.#####.#.#####.#.#######################
-..######..######..######..########################
-.#######.#######.#######.#########################
-........########........##########################
-.#.#.#.#########.#.#.#.###########################
-..##..##########..##..############################
-.###.###########.###.#############################
-....############....##############################
-.#.#############.#.###############################
-..##############..################################
-.###############.#################################
-................##################################
-.#.#.#.#.#.#.#.###################################
-50 50 19
-..................................................
-##################################################
-..##..##..##..##..##..##..##..##..##..##..##..##..
-.###.###.###.###.###.###.###.###.###.###.###.###.#
-....####....####....####....####....####....####..
-.#.#####.#.#####.#.#####.#.#####.#.#####.#.#####.#
-..######..######..######..######..######..######..
-.#######.#######.#######.#######.#######.#######.#
-........########........########........########..
-.#.#.#.#########.#.#.#.#########.#.#.#.#########.#
-..##..##########..##..##########..##..##########..
-.###.###########.###.###########.###.###########.#
-....############....############....############..
-.#.#############.#.#############.#.#############.#
-..##############..##############..##############..
-.###############.###############.###############.#
-................################................##
-.#.#.#.#.#.#.#.#################.#.#.#.#.#.#.#.###
-..##..##..##..##################..##..##..##..####
-.###.###.###.###################.###.###.###.#####
-....####....####################....####....######
-.#.#####.#.#####################.#.#####.#.#######
-..######..######################..######..########
-.#######.#######################.#######.#########
-........########################........##########
-.#.#.#.#########################.#.#.#.###########
-..##..##########################..##..############
-.###.###########################.###.#############
-....############################....##############
-.#.#############################.#.###############
-..##############################..################
-.###############################.#################
-................................##################
-.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.###################
-..##..##..##..##..##..##..##..####################
-.###.###.###.###.###.###.###.#####################
-....####....####....####....######################
-.#.#####.#.#####.#.#####.#.#######################
-..######..######..######..########################
-.#######.#######.#######.#########################
-........########........##########################
-.#.#.#.#########.#.#.#.###########################
-..##..##########..##..############################
-.###.###########.###.#############################
-....############....##############################
-.#.#############.#.###############################
-..##############..################################
-.###############.#################################
-................##################################
-.#.#.#.#.#.#.#.###################################
-50 50 20
-..................................................
-##################################################
-..##..##..##..##..##..##..##..##..##..##..##..##..
-.###.###.###.###.###.###.###.###.###.###.###.###.#
-....####....####....####....####....####....####..
-.#.#####.#.#####.#.#####.#.#####.#.#####.#.#####.#
-..######..######..######..######..######..######..
-.#######.#######.#######.#######.#######.#######.#
-........########........########........########..
-.#.#.#.#########.#.#.#.#########.#.#.#.#########.#
-..##..##########..##..##########..##..##########..
-.###.###########.###.###########.###.###########.#
-....############....############....############..
-.#.#############.#.#############.#.#############.#
-..##############..##############..##############..
-.###############.###############.###############.#
-................################................##
-.#.#.#.#.#.#.#.#################.#.#.#.#.#.#.#.###
-..##..##..##..##################..##..##..##..####
-.###.###.###.###################.###.###.###.#####
-....####....####################....####....######
-.#.#####.#.#####################.#.#####.#.#######
-..######..######################..######..########
-.#######.#######################.#######.#########
-........########################........##########
-.#.#.#.#########################.#.#.#.###########
-..##..##########################..##..############
-.###.###########################.###.#############
-....############################....##############
-.#.#############################.#.###############
-..##############################..################
-.###############################.#################
-................................##################
-.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.###################
-..##..##..##..##..##..##..##..####################
-.###.###.###.###.###.###.###.#####################
-....####....####....####....######################
-.#.#####.#.#####.#.#####.#.#######################
-..######..######..######..########################
-.#######.#######.#######.#########################
-........########........##########################
-.#.#.#.#########.#.#.#.###########################
-..##..##########..##..############################
-.###.###########.###.#############################
-....############....##############################
-.#.#############.#.###############################
-..##############..################################
-.###############.#################################
-................##################################
-.#.#.#.#.#.#.#.###################################
-49 48 5
-................................................
-################################################
-################################.###############
-###############################..##############.
-##############################.#.#############.#
-#############################....############...
-############################.###.###########.###
-###########################..##..##########..##.
-##########################.#.#.#.#########.#.#.#
-#########################........########.......
-########################.#######.#######.#######
-#######################..######..######..######.
-######################.#.#####.#.#####.#.#####.#
-#####################....####....####....####...
-####################.###.###.###.###.###.###.###
-###################..##..##..##..##..##..##..##.
-##################.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#
-#################...............................
-################.###############################
-###############..##############################.
-##############.#.#############################.#
-#############....############################...
-############.###.###########################.###
-###########..##..##########################..##.
-##########.#.#.#.#########################.#.#.#
-#########........########################.......
-########.#######.#######################.#######
-#######..######..######################..######.
-######.#.#####.#.#####################.#.#####.#
-#####....####....####################....####...
-####.###.###.###.###################.###.###.###
-###..##..##..##..##################..##..##..##.
-##.#.#.#.#.#.#.#.#################.#.#.#.#.#.#.#
-#................################...............
-.###############.###############.###############
-.##############..##############..##############.
-.#############.#.#############.#.#############.#
-.############....############....############...
-.###########.###.###########.###.###########.###
-.##########..##..##########..##..##########..##.
-.#########.#.#.#.#########.#.#.#.#########.#.#.#
-.########........########........########.......
-.#######.#######.#######.#######.#######.#######
-.######..######..######..######..######..######.
-.#####.#.#####.#.#####.#.#####.#.#####.#.#####.#
-.####....####....####....####....####....####...
-.###.###.###.###.###.###.###.###.###.###.###.###
-.##..##..##..##..##..##..##..##..##..##..##..##.
-.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#
-49 48 11
-................................................
-################################################
-################################.###############
-###############################..##############.
-##############################.#.#############.#
-#############################....############...
-############################.###.###########.###
-###########################..##..##########..##.
-##########################.#.#.#.#########.#.#.#
-#########################........########.......
-########################.#######.#######.#######
-#######################..######..######..######.
-######################.#.#####.#.#####.#.#####.#
-#####################....####....####....####...
-####################.###.###.###.###.###.###.###
-###################..##..##..##..##..##..##..##.
-##################.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#
-#################...............................
-################.###############################
-###############..##############################.
-##############.#.#############################.#
-#############....############################...
-############.###.###########################.###
-###########..##..##########################..##.
-##########.#.#.#.#########################.#.#.#
-#########........########################.......
-########.#######.#######################.#######
-#######..######..######################..######.
-######.#.#####.#.#####################.#.#####.#
-#####....####....####################....####...
-####.###.###.###.###################.###.###.###
-###..##..##..##..##################..##..##..##.
-##.#.#.#.#.#.#.#.#################.#.#.#.#.#.#.#
-#................################...............
-.###############.###############.###############
-.##############..##############..##############.
-.#############.#.#############.#.#############.#
-.############....############....############...
-.###########.###.###########.###.###########.###
-.##########..##..##########..##..##########..##.
-.#########.#.#.#.#########.#.#.#.#########.#.#.#
-.########........########........########.......
-.#######.#######.#######.#######.#######.#######
-.######..######..######..######..######..######.
-.#####.#.#####.#.#####.#.#####.#.#####.#.#####.#
-.####....####....####....####....####....####...
-.###.###.###.###.###.###.###.###.###.###.###.###
-.##..##..##..##..##..##..##..##..##..##..##..##.
-.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#
-49 48 30
-................................................
-################################################
-################################.###############
-###############################..##############.
-##############################.#.#############.#
-#############################....############...
-############################.###.###########.###
-###########################..##..##########..##.
-##########################.#.#.#.#########.#.#.#
-#########################........########.......
-########################.#######.#######.#######
-#######################..######..######..######.
-######################.#.#####.#.#####.#.#####.#
-#####################....####....####....####...
-####################.###.###.###.###.###.###.###
-###################..##..##..##..##..##..##..##.
-##################.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#
-#################...............................
-################.###############################
-###############..##############################.
-##############.#.#############################.#
-#############....############################...
-############.###.###########################.###
-###########..##..##########################..##.
-##########.#.#.#.#########################.#.#.#
-#########........########################.......
-########.#######.#######################.#######
-#######..######..######################..######.
-######.#.#####.#.#####################.#.#####.#
-#####....####....####################....####...
-####.###.###.###.###################.###.###.###
-###..##..##..##..##################..##..##..##.
-##.#.#.#.#.#.#.#.#################.#.#.#.#.#.#.#
-#................################...............
-.###############.###############.###############
-.##############..##############..##############.
-.#############.#.#############.#.#############.#
-.############....############....############...
-.###########.###.###########.###.###########.###
-.##########..##..##########..##..##########..##.
-.#########.#.#.#.#########.#.#.#.#########.#.#.#
-.########........########........########.......
-.#######.#######.#######.#######.#######.#######
-.######..######..######..######..######..######.
-.#####.#.#####.#.#####.#.#####.#.#####.#.#####.#
-.####....####....####....####....####....####...
-.###.###.###.###.###.###.###.###.###.###.###.###
-.##..##..##..##..##..##..##..##..##..##..##..##.
-.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#
-50 10 4
-..........
-#####.....
-#####.....
-.####.....
-#.###.....
-##.##.....
-..........
-#####.....
-#####.....
-####......
-###.#.....
-##.##.....
-..........
-#####.....
-#####.....
-.####.....
-#.###.....
-##.##.....
-..........
-#####.....
-#.........
-.#........
-..#.......
-...#......
-..........
-....#.....
-...#......
-..#.......
-.#........
-..........
-#####.....
-#####.....
-.####.....
-#.###.....
-##.##.....
-..........
-#####.....
-#####.....
-####......
-###.#.....
-##.##.....
-..........
-#####.....
-#####.....
-#####.....
-#####.....
-#####.....
-..........
-#####.....
-#####.....
-50 10 5
-..........
-#####.....
-...##.....
-..........
-..........
-..........
-#####.....
-##........
-..........
-..........
-..........
-#####.....
-##........
-..........
-..........
-..........
-#####.....
-#.........
-.#........
-..#.......
-...#......
-..........
-....#.....
-...#......
-..#.......
-.#........
-..........
-#####.....
-#####.....
-####......
-###.#.....
-##.##.....
-..........
-#####.....
-#####.....
-.####.....
-#.###.....
-##.##.....
-..........
-#####.....
-#.........
-.#........
-..#.......
-...#......
-..........
-....#.....
-...#......
-..#.......
-.#........
-..........
-50 10 4
-..........
-#####.....
-#.........
-.#........
-..#.......
-...#......
-..........
-....#.....
-...#......
-..#.......
-.#........
-..........
-#####.....
-#####.....
-####......
-###.#.....
-##.##.....
-..........
-#####.....
-#####.....
-#####.....
-#####.....
-#####.....
-..........
-#####.....
-##........
-..........
-..........
-..........
-#####.....
-#####.....
-#####.....
-#####.....
-#####.....
-..........
-#####.....
-##........
-..........
-..........
-..........
-#####.....
-##........
-..........
-..........
-..........
-#####.....
-#####.....
-####......
-###.#.....
-##.##.....
-50 10 5
-..........
-#####.....
-##........
-..........
-..........
-..........
-#####.....
-#####.....
-#####.....
-#####.....
-#####.....
-..........
-#####.....
-##........
-..........
-..........
-..........
-#####.....
-#####.....
-.####.....
-#.###.....
-##.##.....
-..........
-#####.....
-#####.....
-####......
-###.#.....
-##.##.....
-..........
-#####.....
-...##.....
-..........
-..........
-..........
-#####.....
-#####.....
-#####.....
-#####.....
-#####.....
-..........
-#####.....
-#####.....
-####......
-###.#.....
-##.##.....
-..........
-#####.....
-#.........
-.#........
-..#.......
-35 41 11
-........................................#
-#########################################
-##.......####.#..######.##.###...#####.##
-.##.#.#...#.###...##...#..#.#..##..######
-.#...##....#.###...##.#.##.#.###...####..
-.###...##.##..####..##.#.#####.#...#.#...
-..#...#.##..#...##..###..##...###...#.#..
-.#.####.##.##.###.....#..#..##.###..#.##.
-##..##..#...##.###.#...####...#..##....#.
-#....#..##.#.#.#......####.#.....#...#.#.
-#.##.#####......####......###.###..###.#.
-##..######...######.##.#.##.......#...#..
-.#.....###......#####...#..#.#.###...##.#
-...##.##.##..##...####.#.###...#..#.##..#
-....###.#.#..#...###..###.###..#####...##
-....##.##..#.#.#.#.#####...##..######....
-#.#.##.##.#...#####....##.#.#...#.##.#..#
-#.##.##.##.#...#.#.####...#..#.......##.#
-.##.#..###..####.#..###...#...###.##.##..
-.####.#.#######.#......##....#######..##.
-.#..#...#.#.####..#.######.#.#..##.#.####
-...#.###..#.##.#.###.#.#....#.###.#.#...#
-..#.#.####....###...#..##..#####.#.######
-#......####.#..##.....#####.##...###.....
-##..##..####......#.#.##..##...###.#.....
-#.#.####.####.......##......####.###..###
-##...###.#...#.####.##.#........##..#.###
-....#..#####.#....#.##...###..#####.#.###
-####.#.###.........####..###.#..######.##
-.#..########..###..#####.######.###.#...#
-.##..#.##..#....####...#.###.....##.#...#
-##.#..##.##..##.##...##.##.##.#.##.######
-..#..#..####..##...###.#...#.....###..#..
-####.#..####.###...##..#.#.###.#..#..####
-#...#..#..#.#...#...#.#.##.##.#...###.#.#
-31 41 12
-.........................................
-#################################.....#..
-.#..........#.......#....##....#...#.....
-.........#......#.#...#...#..#........#..
-#......#.#......#...#.........#.........#
-.................#....#...#...##.........
-.......#.#..#.....#..#.....##........#..#
-.....#..#..#......................#..#...
-..............#....##....#...#..#..#....#
-...#.#.#........##.#..#..........#......#
-...#......#..#......#....#....#....#.....
-......##.#...#.##..........#.............
-.......##.#.#..#...#.....#.#..#..........
-.........#..........#.................#..
-.#....#..#......#.......#.#..#..####.##..
-#...#................##...#..........#...
-..........#...#.#..#..###..#...#.........
-........##.......#.....##.#......#...#.#.
-.#.....#.#..#.....#.#..##.#.#...........#
-.......####...#.#.........#...#.#........
-.##.................#.#.#................
-.....###.#...#..#.#..............#.......
-.....#...#.....#........#....##.......#..
-.........#...........##.#..#.....##......
-...#....#.........#...#...#.#............
-.....#..............#..............#....#
-#.##...#.............#....#.#..#......#..
-........#...#...##.............#.#.......
-.......#.......#..............#..........
-.....#.........#.........#..#...#..#....#
-####..#...#.#.....##...........#.#.#.#.#.
--- a/test/compiler/5091921/output6890943.txt	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-Case #1: Yes 2
-Case #2: Yes 2
-Case #3: Yes 1
-Case #4: Yes 0
-Case #5: No
-Case #6: No
-Case #7: Yes 6
-Case #8: Yes 6
-Case #9: No
-Case #10: Yes 1
-Case #11: Yes 6
-Case #12: Yes 0
-Case #13: No
-Case #14: Yes 22
-Case #15: Yes 1225
-Case #16: Yes 178
-Case #17: No
-Case #18: Yes 1
-Case #19: Yes 7
-Case #20: Yes 2
-Case #21: Yes 1
-Case #22: No
-Case #23: Yes 3
-Case #24: Yes 1
-Case #25: Yes 7
-Case #26: No
-Case #27: Yes 2
-Case #28: Yes 4
-Case #29: Yes 2
-Case #30: Yes 1
-Case #31: Yes 2
-Case #32: Yes 20
-Case #33: Yes 161
-Case #34: Yes 48
-Case #35: No
-Case #36: Yes 218
-Case #37: Yes 51
-Case #38: Yes 247
-Case #39: Yes 32
-Case #40: Yes 31
-Case #41: Yes 31
-Case #42: Yes 25
-Case #43: Yes 17
-Case #44: Yes 2
-Case #45: Yes 61
-Case #46: Yes 25
-Case #47: No
-Case #48: No
-Case #49: Yes 8
-Case #50: Yes 0
--- a/test/compiler/6340864/TestByteVect.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1487 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6340864
- * @summary Implement vectorization optimizations in hotspot-server
- *
- * @run main/othervm/timeout=400 -Xbatch -Xmx64m TestByteVect
- */
-
-public class TestByteVect {
-  private static final int ARRLEN = 997;
-  private static final int ITERS  = 11000;
-  private static final int ADD_INIT = 63;
-  private static final int BIT_MASK = 0xB7;
-  private static final int VALUE = 3;
-  private static final int SHIFT = 8;
-
-  public static void main(String args[]) {
-    System.out.println("Testing Byte vectors");
-    int errn = test();
-    if (errn > 0) {
-      System.err.println("FAILED: " + errn + " errors");
-      System.exit(97);
-    }
-    System.out.println("PASSED");
-  }
-
-  static int test() {
-    byte[] a0 = new byte[ARRLEN];
-    byte[] a1 = new byte[ARRLEN];
-    byte[] a2 = new byte[ARRLEN];
-    byte[] a3 = new byte[ARRLEN];
-    byte[] a4 = new byte[ARRLEN];
-    short[] p2 = new short[ARRLEN/2];
-      int[] p4 = new   int[ARRLEN/4];
-     long[] p8 = new  long[ARRLEN/8];
-    // Initialize
-    int gold_sum = 0;
-    for (int i=0; i<ARRLEN; i++) {
-      byte val = (byte)(ADD_INIT+i);
-      gold_sum += val;
-      a1[i] = val;
-      a2[i] = (byte)VALUE;
-      a3[i] = (byte)-VALUE;
-      a4[i] = (byte)BIT_MASK;
-    }
-    System.out.println("Warmup");
-    for (int i=0; i<ITERS; i++) {
-      test_sum(a1);
-      test_addc(a0, a1);
-      test_addv(a0, a1, (byte)VALUE);
-      test_adda(a0, a1, a2);
-      test_subc(a0, a1);
-      test_subv(a0, a1, (byte)VALUE);
-      test_suba(a0, a1, a2);
-
-      test_mulc(a0, a1);
-      test_mulv(a0, a1, (byte)VALUE);
-      test_mula(a0, a1, a2);
-      test_divc(a0, a1);
-      test_divv(a0, a1, (byte)VALUE);
-      test_diva(a0, a1, a2);
-      test_mulc_n(a0, a1);
-      test_mulv(a0, a1, (byte)-VALUE);
-      test_mula(a0, a1, a3);
-      test_divc_n(a0, a1);
-      test_divv(a0, a1, (byte)-VALUE);
-      test_diva(a0, a1, a3);
-
-      test_andc(a0, a1);
-      test_andv(a0, a1, (byte)BIT_MASK);
-      test_anda(a0, a1, a4);
-      test_orc(a0, a1);
-      test_orv(a0, a1, (byte)BIT_MASK);
-      test_ora(a0, a1, a4);
-      test_xorc(a0, a1);
-      test_xorv(a0, a1, (byte)BIT_MASK);
-      test_xora(a0, a1, a4);
-
-      test_sllc(a0, a1);
-      test_sllv(a0, a1, VALUE);
-      test_srlc(a0, a1);
-      test_srlv(a0, a1, VALUE);
-      test_srac(a0, a1);
-      test_srav(a0, a1, VALUE);
-
-      test_sllc_n(a0, a1);
-      test_sllv(a0, a1, -VALUE);
-      test_srlc_n(a0, a1);
-      test_srlv(a0, a1, -VALUE);
-      test_srac_n(a0, a1);
-      test_srav(a0, a1, -VALUE);
-
-      test_sllc_o(a0, a1);
-      test_sllv(a0, a1, SHIFT);
-      test_srlc_o(a0, a1);
-      test_srlv(a0, a1, SHIFT);
-      test_srac_o(a0, a1);
-      test_srav(a0, a1, SHIFT);
-
-      test_sllc_on(a0, a1);
-      test_sllv(a0, a1, -SHIFT);
-      test_srlc_on(a0, a1);
-      test_srlv(a0, a1, -SHIFT);
-      test_srac_on(a0, a1);
-      test_srav(a0, a1, -SHIFT);
-
-      test_sllc_add(a0, a1);
-      test_sllv_add(a0, a1, ADD_INIT);
-      test_srlc_add(a0, a1);
-      test_srlv_add(a0, a1, ADD_INIT);
-      test_srac_add(a0, a1);
-      test_srav_add(a0, a1, ADD_INIT);
-
-      test_sllc_and(a0, a1);
-      test_sllv_and(a0, a1, BIT_MASK);
-      test_srlc_and(a0, a1);
-      test_srlv_and(a0, a1, BIT_MASK);
-      test_srac_and(a0, a1);
-      test_srav_and(a0, a1, BIT_MASK);
-
-      test_pack2(p2, a1);
-      test_unpack2(a0, p2);
-      test_pack2_swap(p2, a1);
-      test_unpack2_swap(a0, p2);
-      test_pack4(p4, a1);
-      test_unpack4(a0, p4);
-      test_pack4_swap(p4, a1);
-      test_unpack4_swap(a0, p4);
-      test_pack8(p8, a1);
-      test_unpack8(a0, p8);
-      test_pack8_swap(p8, a1);
-      test_unpack8_swap(a0, p8);
-    }
-    // Test and verify results
-    System.out.println("Verification");
-    int errn = 0;
-    {
-      int sum = test_sum(a1);
-      if (sum != gold_sum) {
-        System.err.println("test_sum:  " + sum + " != " + gold_sum);
-        errn++;
-      }
-
-      test_addc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_addc: ", i, a0[i], (byte)((byte)(ADD_INIT+i)+VALUE));
-      }
-      test_addv(a0, a1, (byte)VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_addv: ", i, a0[i], (byte)((byte)(ADD_INIT+i)+VALUE));
-      }
-      test_adda(a0, a1, a2);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_adda: ", i, a0[i], (byte)((byte)(ADD_INIT+i)+VALUE));
-      }
-
-      test_subc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_subc: ", i, a0[i], (byte)((byte)(ADD_INIT+i)-VALUE));
-      }
-      test_subv(a0, a1, (byte)VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_subv: ", i, a0[i], (byte)((byte)(ADD_INIT+i)-VALUE));
-      }
-      test_suba(a0, a1, a2);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_suba: ", i, a0[i], (byte)((byte)(ADD_INIT+i)-VALUE));
-      }
-
-      test_mulc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_mulc: ", i, a0[i], (byte)((byte)(ADD_INIT+i)*VALUE));
-      }
-      test_mulv(a0, a1, (byte)VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_mulv: ", i, a0[i], (byte)((byte)(ADD_INIT+i)*VALUE));
-      }
-      test_mula(a0, a1, a2);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_mula: ", i, a0[i], (byte)((byte)(ADD_INIT+i)*VALUE));
-      }
-
-      test_divc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_divc: ", i, a0[i], (byte)((byte)(ADD_INIT+i)/VALUE));
-      }
-      test_divv(a0, a1, (byte)VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_divv: ", i, a0[i], (byte)((byte)(ADD_INIT+i)/VALUE));
-      }
-      test_diva(a0, a1, a2);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_diva: ", i, a0[i], (byte)((byte)(ADD_INIT+i)/VALUE));
-      }
-
-      test_mulc_n(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_mulc_n: ", i, a0[i], (byte)((byte)(ADD_INIT+i)*(-VALUE)));
-      }
-      test_mulv(a0, a1, (byte)-VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_mulv_n: ", i, a0[i], (byte)((byte)(ADD_INIT+i)*(-VALUE)));
-      }
-      test_mula(a0, a1, a3);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_mula_n: ", i, a0[i], (byte)((byte)(ADD_INIT+i)*(-VALUE)));
-      }
-
-      test_divc_n(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_divc_n: ", i, a0[i], (byte)((byte)(ADD_INIT+i)/(-VALUE)));
-      }
-      test_divv(a0, a1, (byte)-VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_divv_n: ", i, a0[i], (byte)((byte)(ADD_INIT+i)/(-VALUE)));
-      }
-      test_diva(a0, a1, a3);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_diva_n: ", i, a0[i], (byte)((byte)(ADD_INIT+i)/(-VALUE)));
-      }
-
-      test_andc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_andc: ", i, a0[i], (byte)((byte)(ADD_INIT+i)&BIT_MASK));
-      }
-      test_andv(a0, a1, (byte)BIT_MASK);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_andv: ", i, a0[i], (byte)((byte)(ADD_INIT+i)&BIT_MASK));
-      }
-      test_anda(a0, a1, a4);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_anda: ", i, a0[i], (byte)((byte)(ADD_INIT+i)&BIT_MASK));
-      }
-
-      test_orc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_orc: ", i, a0[i], (byte)((byte)(ADD_INIT+i)|BIT_MASK));
-      }
-      test_orv(a0, a1, (byte)BIT_MASK);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_orv: ", i, a0[i], (byte)((byte)(ADD_INIT+i)|BIT_MASK));
-      }
-      test_ora(a0, a1, a4);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_ora: ", i, a0[i], (byte)((byte)(ADD_INIT+i)|BIT_MASK));
-      }
-
-      test_xorc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_xorc: ", i, a0[i], (byte)((byte)(ADD_INIT+i)^BIT_MASK));
-      }
-      test_xorv(a0, a1, (byte)BIT_MASK);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_xorv: ", i, a0[i], (byte)((byte)(ADD_INIT+i)^BIT_MASK));
-      }
-      test_xora(a0, a1, a4);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_xora: ", i, a0[i], (byte)((byte)(ADD_INIT+i)^BIT_MASK));
-      }
-
-      test_sllc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllc: ", i, a0[i], (byte)((byte)(ADD_INIT+i)<<VALUE));
-      }
-      test_sllv(a0, a1, VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllv: ", i, a0[i], (byte)((byte)(ADD_INIT+i)<<VALUE));
-      }
-
-      test_srlc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlc: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>>VALUE));
-      }
-      test_srlv(a0, a1, VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlv: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>>VALUE));
-      }
-
-      test_srac(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srac: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>VALUE));
-      }
-      test_srav(a0, a1, VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srav: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>VALUE));
-      }
-
-      test_sllc_n(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllc_n: ", i, a0[i], (byte)((byte)(ADD_INIT+i)<<(-VALUE)));
-      }
-      test_sllv(a0, a1, -VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllv_n: ", i, a0[i], (byte)((byte)(ADD_INIT+i)<<(-VALUE)));
-      }
-
-      test_srlc_n(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlc_n: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>>(-VALUE)));
-      }
-      test_srlv(a0, a1, -VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlv_n: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>>(-VALUE)));
-      }
-
-      test_srac_n(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srac_n: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>(-VALUE)));
-      }
-      test_srav(a0, a1, -VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srav_n: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>(-VALUE)));
-      }
-
-      test_sllc_o(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllc_o: ", i, a0[i], (byte)((byte)(ADD_INIT+i)<<SHIFT));
-      }
-      test_sllv(a0, a1, SHIFT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllv_o: ", i, a0[i], (byte)((byte)(ADD_INIT+i)<<SHIFT));
-      }
-
-      test_srlc_o(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlc_o: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>>SHIFT));
-      }
-      test_srlv(a0, a1, SHIFT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlv_o: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>>SHIFT));
-      }
-
-      test_srac_o(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srac_o: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>SHIFT));
-      }
-      test_srav(a0, a1, SHIFT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srav_o: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>SHIFT));
-      }
-
-      test_sllc_on(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllc_on: ", i, a0[i], (byte)((byte)(ADD_INIT+i)<<(-SHIFT)));
-      }
-      test_sllv(a0, a1, -SHIFT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllv_on: ", i, a0[i], (byte)((byte)(ADD_INIT+i)<<(-SHIFT)));
-      }
-
-      test_srlc_on(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlc_on: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>>(-SHIFT)));
-      }
-      test_srlv(a0, a1, -SHIFT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlv_on: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>>(-SHIFT)));
-      }
-
-      test_srac_on(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srac_on: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>(-SHIFT)));
-      }
-      test_srav(a0, a1, -SHIFT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srav_on: ", i, a0[i], (byte)((byte)(ADD_INIT+i)>>(-SHIFT)));
-      }
-
-      test_sllc_add(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllc_add: ", i, a0[i], (byte)(((byte)(ADD_INIT+i) + ADD_INIT)<<VALUE));
-      }
-      test_sllv_add(a0, a1, ADD_INIT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllv_add: ", i, a0[i], (byte)(((byte)(ADD_INIT+i) + ADD_INIT)<<VALUE));
-      }
-
-      test_srlc_add(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlc_add: ", i, a0[i], (byte)(((byte)(ADD_INIT+i) + ADD_INIT)>>>VALUE));
-      }
-      test_srlv_add(a0, a1, ADD_INIT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlv_add: ", i, a0[i], (byte)(((byte)(ADD_INIT+i) + ADD_INIT)>>>VALUE));
-      }
-
-      test_srac_add(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srac_add: ", i, a0[i], (byte)(((byte)(ADD_INIT+i) + ADD_INIT)>>VALUE));
-      }
-      test_srav_add(a0, a1, ADD_INIT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srav_add: ", i, a0[i], (byte)(((byte)(ADD_INIT+i) + ADD_INIT)>>VALUE));
-      }
-
-      test_sllc_and(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllc_and: ", i, a0[i], (byte)(((byte)(ADD_INIT+i) & BIT_MASK)<<VALUE));
-      }
-      test_sllv_and(a0, a1, BIT_MASK);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllv_and: ", i, a0[i], (byte)(((byte)(ADD_INIT+i) & BIT_MASK)<<VALUE));
-      }
-
-      test_srlc_and(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlc_and: ", i, a0[i], (byte)(((byte)(ADD_INIT+i) & BIT_MASK)>>>VALUE));
-      }
-      test_srlv_and(a0, a1, BIT_MASK);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlv_and: ", i, a0[i], (byte)(((byte)(ADD_INIT+i) & BIT_MASK)>>>VALUE));
-      }
-
-      test_srac_and(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srac_and: ", i, a0[i], (byte)(((byte)(ADD_INIT+i) & BIT_MASK)>>VALUE));
-      }
-      test_srav_and(a0, a1, BIT_MASK);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srav_and: ", i, a0[i], (byte)(((byte)(ADD_INIT+i) & BIT_MASK)>>VALUE));
-      }
-
-      test_pack2(p2, a1);
-      for (int i=0; i<ARRLEN/2; i++) {
-        errn += verify("test_pack2: ", i, p2[i], (short)(((short)(ADD_INIT+2*i) & 0xFF) | ((short)(ADD_INIT+2*i+1) << 8)));
-      }
-      for (int i=0; i<ARRLEN; i++) {
-        a0[i] = -1;
-      }
-      test_unpack2(a0, p2);
-      for (int i=0; i<(ARRLEN&(-2)); i++) {
-        errn += verify("test_unpack2: ", i, a0[i], (byte)(ADD_INIT+i));
-      }
-
-      test_pack2_swap(p2, a1);
-      for (int i=0; i<ARRLEN/2; i++) {
-        errn += verify("test_pack2_swap: ", i, p2[i], (short)(((short)(ADD_INIT+2*i+1) & 0xFF) | ((short)(ADD_INIT+2*i) << 8)));
-      }
-      for (int i=0; i<ARRLEN; i++) {
-        a0[i] = -1;
-      }
-      test_unpack2_swap(a0, p2);
-      for (int i=0; i<(ARRLEN&(-2)); i++) {
-        errn += verify("test_unpack2_swap: ", i, a0[i], (byte)(ADD_INIT+i));
-      }
-
-      test_pack4(p4, a1);
-      for (int i=0; i<ARRLEN/4; i++) {
-        errn += verify("test_pack4: ", i, p4[i],  ((int)(ADD_INIT+4*i+0) & 0xFF) |
-                                                 (((int)(ADD_INIT+4*i+1) & 0xFF) <<  8)  |
-                                                 (((int)(ADD_INIT+4*i+2) & 0xFF) << 16)  |
-                                                 (((int)(ADD_INIT+4*i+3) & 0xFF) << 24));
-      }
-      for (int i=0; i<ARRLEN; i++) {
-        a0[i] = -1;
-      }
-      test_unpack4(a0, p4);
-      for (int i=0; i<(ARRLEN&(-4)); i++) {
-        errn += verify("test_unpack4: ", i, a0[i], (byte)(ADD_INIT+i));
-      }
-
-      test_pack4_swap(p4, a1);
-      for (int i=0; i<ARRLEN/4; i++) {
-        errn += verify("test_pack4_swap: ", i, p4[i],  ((int)(ADD_INIT+4*i+3) & 0xFF) |
-                                                      (((int)(ADD_INIT+4*i+2) & 0xFF) <<  8)  |
-                                                      (((int)(ADD_INIT+4*i+1) & 0xFF) << 16)  |
-                                                      (((int)(ADD_INIT+4*i+0) & 0xFF) << 24));
-      }
-      for (int i=0; i<ARRLEN; i++) {
-        a0[i] = -1;
-      }
-      test_unpack4_swap(a0, p4);
-      for (int i=0; i<(ARRLEN&(-4)); i++) {
-        errn += verify("test_unpack4_swap: ", i, a0[i], (byte)(ADD_INIT+i));
-      }
-
-      test_pack8(p8, a1);
-      for (int i=0; i<ARRLEN/8; i++) {
-        errn += verify("test_pack8: ", i, p8[i],  ((long)(ADD_INIT+8*i+0) & 0xFFl) |
-                                                 (((long)(ADD_INIT+8*i+1) & 0xFFl) <<  8)  |
-                                                 (((long)(ADD_INIT+8*i+2) & 0xFFl) << 16)  |
-                                                 (((long)(ADD_INIT+8*i+3) & 0xFFl) << 24)  |
-                                                 (((long)(ADD_INIT+8*i+4) & 0xFFl) << 32)  |
-                                                 (((long)(ADD_INIT+8*i+5) & 0xFFl) << 40)  |
-                                                 (((long)(ADD_INIT+8*i+6) & 0xFFl) << 48)  |
-                                                 (((long)(ADD_INIT+8*i+7) & 0xFFl) << 56));
-      }
-      for (int i=0; i<ARRLEN; i++) {
-        a0[i] = -1;
-      }
-      test_unpack8(a0, p8);
-      for (int i=0; i<(ARRLEN&(-8)); i++) {
-        errn += verify("test_unpack8: ", i, a0[i], (byte)(ADD_INIT+i));
-      }
-
-      test_pack8_swap(p8, a1);
-      for (int i=0; i<ARRLEN/8; i++) {
-        errn += verify("test_pack8_swap: ", i, p8[i],  ((long)(ADD_INIT+8*i+7) & 0xFFl) |
-                                                      (((long)(ADD_INIT+8*i+6) & 0xFFl) <<  8)  |
-                                                      (((long)(ADD_INIT+8*i+5) & 0xFFl) << 16)  |
-                                                      (((long)(ADD_INIT+8*i+4) & 0xFFl) << 24)  |
-                                                      (((long)(ADD_INIT+8*i+3) & 0xFFl) << 32)  |
-                                                      (((long)(ADD_INIT+8*i+2) & 0xFFl) << 40)  |
-                                                      (((long)(ADD_INIT+8*i+1) & 0xFFl) << 48)  |
-                                                      (((long)(ADD_INIT+8*i+0) & 0xFFl) << 56));
-      }
-      for (int i=0; i<ARRLEN; i++) {
-        a0[i] = -1;
-      }
-      test_unpack8_swap(a0, p8);
-      for (int i=0; i<(ARRLEN&(-8)); i++) {
-        errn += verify("test_unpack8_swap: ", i, a0[i], (byte)(ADD_INIT+i));
-      }
-
-    }
-
-    if (errn > 0)
-      return errn;
-
-    System.out.println("Time");
-    long start, end;
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sum(a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sum: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_addc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_addc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_addv(a0, a1, (byte)VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_addv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_adda(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_adda: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_subc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_subc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_subv(a0, a1, (byte)VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_subv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_suba(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_suba: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulv(a0, a1, (byte)VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mula(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mula: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divv(a0, a1, (byte)VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_diva(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_diva: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulc_n(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulc_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulv(a0, a1, (byte)-VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulv_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mula(a0, a1, a3);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mula_n: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divc_n(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divc_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divv(a0, a1, (byte)-VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divv_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_diva(a0, a1, a3);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_diva_n: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_andc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_andc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_andv(a0, a1, (byte)BIT_MASK);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_andv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_anda(a0, a1, a4);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_anda: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_orc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_orc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_orv(a0, a1, (byte)BIT_MASK);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_orv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_ora(a0, a1, a4);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_ora: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_xorc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_xorc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_xorv(a0, a1, (byte)BIT_MASK);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_xorv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_xora(a0, a1, a4);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_xora: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllv(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllv: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlv(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlv: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srac(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srac: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srav(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srav: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllc_n(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllc_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllv(a0, a1, -VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllv_n: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlc_n(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlc_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlv(a0, a1, -VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlv_n: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srac_n(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srac_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srav(a0, a1, -VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srav_n: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllc_o(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllc_o: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllv(a0, a1, SHIFT);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllv_o: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlc_o(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlc_o: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlv(a0, a1, SHIFT);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlv_o: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srac_o(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srac_o: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srav(a0, a1, SHIFT);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srav_o: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllc_on(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllc_on: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllv(a0, a1, -SHIFT);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllv_on: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlc_on(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlc_on: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlv(a0, a1, -SHIFT);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlv_on: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srac_on(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srac_on: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srav(a0, a1, -SHIFT);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srav_on: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllc_add(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllc_add: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllv_add(a0, a1, ADD_INIT);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllv_add: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlc_add(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlc_add: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlv_add(a0, a1, ADD_INIT);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlv_add: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srac_add(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srac_add: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srav_add(a0, a1, ADD_INIT);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srav_add: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllc_and(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllc_and: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllv_and(a0, a1, BIT_MASK);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllv_and: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlc_and(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlc_and: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlv_and(a0, a1, BIT_MASK);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlv_and: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srac_and(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srac_and: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srav_and(a0, a1, BIT_MASK);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srav_and: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_pack2(p2, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_pack2: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_unpack2(a0, p2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_unpack2: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_pack2_swap(p2, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_pack2_swap: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_unpack2_swap(a0, p2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_unpack2_swap: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_pack4(p4, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_pack4: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_unpack4(a0, p4);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_unpack4: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_pack4_swap(p4, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_pack4_swap: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_unpack4_swap(a0, p4);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_unpack4_swap: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_pack8(p8, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_pack8: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_unpack8(a0, p8);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_unpack8: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_pack8_swap(p8, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_pack8_swap: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_unpack8_swap(a0, p8);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_unpack8_swap: " + (end - start));
-
-    return errn;
-  }
-
-  static int test_sum(byte[] a1) {
-    int sum = 0;
-    for (int i = 0; i < a1.length; i+=1) {
-      sum += a1[i];
-    }
-    return sum;
-  }
-
-  static void test_addc(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]+VALUE);
-    }
-  }
-  static void test_addv(byte[] a0, byte[] a1, byte b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]+b);
-    }
-  }
-  static void test_adda(byte[] a0, byte[] a1, byte[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]+a2[i]);
-    }
-  }
-
-  static void test_subc(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]-VALUE);
-    }
-  }
-  static void test_subv(byte[] a0, byte[] a1, byte b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]-b);
-    }
-  }
-  static void test_suba(byte[] a0, byte[] a1, byte[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]-a2[i]);
-    }
-  }
-
-  static void test_mulc(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]*VALUE);
-    }
-  }
-  static void test_mulc_n(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]*(-VALUE));
-    }
-  }
-  static void test_mulv(byte[] a0, byte[] a1, byte b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]*b);
-    }
-  }
-  static void test_mula(byte[] a0, byte[] a1, byte[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]*a2[i]);
-    }
-  }
-
-  static void test_divc(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]/VALUE);
-    }
-  }
-  static void test_divc_n(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]/(-VALUE));
-    }
-  }
-  static void test_divv(byte[] a0, byte[] a1, byte b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]/b);
-    }
-  }
-  static void test_diva(byte[] a0, byte[] a1, byte[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]/a2[i]);
-    }
-  }
-
-  static void test_andc(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]&BIT_MASK);
-    }
-  }
-  static void test_andv(byte[] a0, byte[] a1, byte b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]&b);
-    }
-  }
-  static void test_anda(byte[] a0, byte[] a1, byte[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]&a2[i]);
-    }
-  }
-
-  static void test_orc(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]|BIT_MASK);
-    }
-  }
-  static void test_orv(byte[] a0, byte[] a1, byte b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]|b);
-    }
-  }
-  static void test_ora(byte[] a0, byte[] a1, byte[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]|a2[i]);
-    }
-  }
-
-  static void test_xorc(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]^BIT_MASK);
-    }
-  }
-  static void test_xorv(byte[] a0, byte[] a1, byte b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]^b);
-    }
-  }
-  static void test_xora(byte[] a0, byte[] a1, byte[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]^a2[i]);
-    }
-  }
-
-  static void test_sllc(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]<<VALUE);
-    }
-  }
-  static void test_sllc_n(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]<<(-VALUE));
-    }
-  }
-  static void test_sllc_o(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]<<SHIFT);
-    }
-  }
-  static void test_sllc_on(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]<<(-SHIFT));
-    }
-  }
-  static void test_sllv(byte[] a0, byte[] a1, int b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]<<b);
-    }
-  }
-  static void test_sllc_add(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)((a1[i] + ADD_INIT)<<VALUE);
-    }
-  }
-  static void test_sllv_add(byte[] a0, byte[] a1, int b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)((a1[i] + b)<<VALUE);
-    }
-  }
-  static void test_sllc_and(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)((a1[i] & BIT_MASK)<<VALUE);
-    }
-  }
-  static void test_sllv_and(byte[] a0, byte[] a1, int b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)((a1[i] & b)<<VALUE);
-    }
-  }
-
-  static void test_srlc(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]>>>VALUE);
-    }
-  }
-  static void test_srlc_n(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]>>>(-VALUE));
-    }
-  }
-  static void test_srlc_o(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]>>>SHIFT);
-    }
-  }
-  static void test_srlc_on(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]>>>(-SHIFT));
-    }
-  }
-  static void test_srlv(byte[] a0, byte[] a1, int b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]>>>b);
-    }
-  }
-  static void test_srlc_add(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)((a1[i] + ADD_INIT)>>>VALUE);
-    }
-  }
-  static void test_srlv_add(byte[] a0, byte[] a1, int b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)((a1[i] + b)>>>VALUE);
-    }
-  }
-  static void test_srlc_and(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)((a1[i] & BIT_MASK)>>>VALUE);
-    }
-  }
-  static void test_srlv_and(byte[] a0, byte[] a1, int b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)((a1[i] & b)>>>VALUE);
-    }
-  }
-
-  static void test_srac(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]>>VALUE);
-    }
-  }
-  static void test_srac_n(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]>>(-VALUE));
-    }
-  }
-  static void test_srac_o(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]>>SHIFT);
-    }
-  }
-  static void test_srac_on(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]>>(-SHIFT));
-    }
-  }
-  static void test_srav(byte[] a0, byte[] a1, int b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)(a1[i]>>b);
-    }
-  }
-  static void test_srac_add(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)((a1[i] + ADD_INIT)>>VALUE);
-    }
-  }
-  static void test_srav_add(byte[] a0, byte[] a1, int b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)((a1[i] + b)>>VALUE);
-    }
-  }
-  static void test_srac_and(byte[] a0, byte[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)((a1[i] & BIT_MASK)>>VALUE);
-    }
-  }
-  static void test_srav_and(byte[] a0, byte[] a1, int b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (byte)((a1[i] & b)>>VALUE);
-    }
-  }
-
-  static void test_pack2(short[] p2, byte[] a1) {
-    if (p2.length*2 > a1.length) return;
-    for (int i = 0; i < p2.length; i+=1) {
-      short l0 = (short)a1[i*2+0];
-      short l1 = (short)a1[i*2+1];
-      p2[i] = (short)((l1 << 8) | (l0 & 0xFF));
-    }
-  }
-  static void test_unpack2(byte[] a0, short[] p2) {
-    if (p2.length*2 > a0.length) return;
-    for (int i = 0; i < p2.length; i+=1) {
-      short l = p2[i];
-      a0[i*2+0] = (byte)(l & 0xFF);
-      a0[i*2+1] = (byte)(l >> 8);
-    }
-  }
-  static void test_pack2_swap(short[] p2, byte[] a1) {
-    if (p2.length*2 > a1.length) return;
-    for (int i = 0; i < p2.length; i+=1) {
-      short l0 = (short)a1[i*2+0];
-      short l1 = (short)a1[i*2+1];
-      p2[i] = (short)((l0 << 8) | (l1 & 0xFF));
-    }
-  }
-  static void test_unpack2_swap(byte[] a0, short[] p2) {
-    if (p2.length*2 > a0.length) return;
-    for (int i = 0; i < p2.length; i+=1) {
-      short l = p2[i];
-      a0[i*2+0] = (byte)(l >> 8);
-      a0[i*2+1] = (byte)(l & 0xFF);
-    }
-  }
-
-  static void test_pack4(int[] p4, byte[] a1) {
-    if (p4.length*4 > a1.length) return;
-    for (int i = 0; i < p4.length; i+=1) {
-      int l0 = (int)a1[i*4+0];
-      int l1 = (int)a1[i*4+1];
-      int l2 = (int)a1[i*4+2];
-      int l3 = (int)a1[i*4+3];
-      p4[i] = (l0 & 0xFF) |
-             ((l1 & 0xFF) <<  8) |
-             ((l2 & 0xFF) << 16) |
-             ((l3 & 0xFF) << 24);
-    }
-  }
-  static void test_unpack4(byte[] a0, int[] p4) {
-    if (p4.length*4 > a0.length) return;
-    for (int i = 0; i < p4.length; i+=1) {
-      int l = p4[i];
-      a0[i*4+0] = (byte)(l & 0xFF);
-      a0[i*4+1] = (byte)(l >>  8);
-      a0[i*4+2] = (byte)(l >> 16);
-      a0[i*4+3] = (byte)(l >> 24);
-    }
-  }
-  static void test_pack4_swap(int[] p4, byte[] a1) {
-    if (p4.length*4 > a1.length) return;
-    for (int i = 0; i < p4.length; i+=1) {
-      int l0 = (int)a1[i*4+0];
-      int l1 = (int)a1[i*4+1];
-      int l2 = (int)a1[i*4+2];
-      int l3 = (int)a1[i*4+3];
-      p4[i] = (l3 & 0xFF) |
-             ((l2 & 0xFF) <<  8) |
-             ((l1 & 0xFF) << 16) |
-             ((l0 & 0xFF) << 24);
-    }
-  }
-  static void test_unpack4_swap(byte[] a0, int[] p4) {
-    if (p4.length*4 > a0.length) return;
-    for (int i = 0; i < p4.length; i+=1) {
-      int l = p4[i];
-      a0[i*4+0] = (byte)(l >> 24);
-      a0[i*4+1] = (byte)(l >> 16);
-      a0[i*4+2] = (byte)(l >>  8);
-      a0[i*4+3] = (byte)(l & 0xFF);
-    }
-  }
-
-  static void test_pack8(long[] p8, byte[] a1) {
-    if (p8.length*8 > a1.length) return;
-    for (int i = 0; i < p8.length; i+=1) {
-      long l0 = (long)a1[i*8+0];
-      long l1 = (long)a1[i*8+1];
-      long l2 = (long)a1[i*8+2];
-      long l3 = (long)a1[i*8+3];
-      long l4 = (long)a1[i*8+4];
-      long l5 = (long)a1[i*8+5];
-      long l6 = (long)a1[i*8+6];
-      long l7 = (long)a1[i*8+7];
-      p8[i] = (l0 & 0xFFl) |
-             ((l1 & 0xFFl) <<  8) |
-             ((l2 & 0xFFl) << 16) |
-             ((l3 & 0xFFl) << 24) |
-             ((l4 & 0xFFl) << 32) |
-             ((l5 & 0xFFl) << 40) |
-             ((l6 & 0xFFl) << 48) |
-             ((l7 & 0xFFl) << 56);
-    }
-  }
-  static void test_unpack8(byte[] a0, long[] p8) {
-    if (p8.length*8 > a0.length) return;
-    for (int i = 0; i < p8.length; i+=1) {
-      long l = p8[i];
-      a0[i*8+0] = (byte)(l & 0xFFl);
-      a0[i*8+1] = (byte)(l >>  8);
-      a0[i*8+2] = (byte)(l >> 16);
-      a0[i*8+3] = (byte)(l >> 24);
-      a0[i*8+4] = (byte)(l >> 32);
-      a0[i*8+5] = (byte)(l >> 40);
-      a0[i*8+6] = (byte)(l >> 48);
-      a0[i*8+7] = (byte)(l >> 56);
-    }
-  }
-  static void test_pack8_swap(long[] p8, byte[] a1) {
-    if (p8.length*8 > a1.length) return;
-    for (int i = 0; i < p8.length; i+=1) {
-      long l0 = (long)a1[i*8+0];
-      long l1 = (long)a1[i*8+1];
-      long l2 = (long)a1[i*8+2];
-      long l3 = (long)a1[i*8+3];
-      long l4 = (long)a1[i*8+4];
-      long l5 = (long)a1[i*8+5];
-      long l6 = (long)a1[i*8+6];
-      long l7 = (long)a1[i*8+7];
-      p8[i] = (l7 & 0xFFl) |
-             ((l6 & 0xFFl) <<  8) |
-             ((l5 & 0xFFl) << 16) |
-             ((l4 & 0xFFl) << 24) |
-             ((l3 & 0xFFl) << 32) |
-             ((l2 & 0xFFl) << 40) |
-             ((l1 & 0xFFl) << 48) |
-             ((l0 & 0xFFl) << 56);
-    }
-  }
-  static void test_unpack8_swap(byte[] a0, long[] p8) {
-    if (p8.length*8 > a0.length) return;
-    for (int i = 0; i < p8.length; i+=1) {
-      long l = p8[i];
-      a0[i*8+0] = (byte)(l >> 56);
-      a0[i*8+1] = (byte)(l >> 48);
-      a0[i*8+2] = (byte)(l >> 40);
-      a0[i*8+3] = (byte)(l >> 32);
-      a0[i*8+4] = (byte)(l >> 24);
-      a0[i*8+5] = (byte)(l >> 16);
-      a0[i*8+6] = (byte)(l >>  8);
-      a0[i*8+7] = (byte)(l & 0xFFl);
-    }
-  }
-
-  static int verify(String text, int i, byte elem, byte val) {
-    if (elem != val) {
-      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
-      return 1;
-    }
-    return 0;
-  }
-
-  static int verify(String text, int i, short elem, short val) {
-    if (elem != val) {
-      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
-      return 1;
-    }
-    return 0;
-  }
-
-  static int verify(String text, int i, int elem, int val) {
-    if (elem != val) {
-      System.err.println(text + "[" + i + "] = " + Integer.toHexString(elem) + " != " + Integer.toHexString(val));
-      return 1;
-    }
-    return 0;
-  }
-
-  static int verify(String text, int i, long elem, long val) {
-    if (elem != val) {
-      System.err.println(text + "[" + i + "] = " + Long.toHexString(elem) + " != " + Long.toHexString(val));
-      return 1;
-    }
-    return 0;
-  }
-}
--- a/test/compiler/6340864/TestDoubleVect.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,560 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6340864
- * @summary Implement vectorization optimizations in hotspot-server
- *
- * @run main/othervm/timeout=400 -Xbatch -Xmx64m TestDoubleVect
- */
-
-public class TestDoubleVect {
-  private static final int ARRLEN = 997;
-  private static final int ITERS  = 11000;
-  private static final double ADD_INIT = -7500.;
-  private static final double VALUE = 15.;
-
-  public static void main(String args[]) {
-    System.out.println("Testing Double vectors");
-    int errn = test();
-    if (errn > 0) {
-      System.err.println("FAILED: " + errn + " errors");
-      System.exit(97);
-    }
-    System.out.println("PASSED");
-  }
-
-  static int test() {
-    double[] a0 = new double[ARRLEN];
-    double[] a1 = new double[ARRLEN];
-    double[] a2 = new double[ARRLEN];
-    double[] a3 = new double[ARRLEN];
-    // Initialize
-    double gold_sum = 0;
-    for (int i=0; i<ARRLEN; i++) {
-      double val = ADD_INIT+(double)i;
-      gold_sum += val;
-      a1[i] = val;
-      a2[i] = VALUE;
-      a3[i] = -VALUE;
-    }
-
-    System.out.println("Warmup");
-    for (int i=0; i<ITERS; i++) {
-      test_sum(a1);
-      test_addc(a0, a1);
-      test_addv(a0, a1, VALUE);
-      test_adda(a0, a1, a2);
-      test_subc(a0, a1);
-      test_subv(a0, a1, VALUE);
-      test_suba(a0, a1, a2);
-      test_mulc(a0, a1);
-      test_mulv(a0, a1, VALUE);
-      test_mula(a0, a1, a2);
-      test_divc(a0, a1);
-      test_divv(a0, a1, VALUE);
-      test_diva(a0, a1, a2);
-      test_mulc_n(a0, a1);
-      test_mulv(a0, a1, -VALUE);
-      test_mula(a0, a1, a3);
-      test_divc_n(a0, a1);
-      test_divv(a0, a1, -VALUE);
-      test_diva(a0, a1, a3);
-    }
-    // Test and verify results
-    System.out.println("Verification");
-    int errn = 0;
-    {
-      double sum = test_sum(a1);
-      if (sum != gold_sum) {
-        System.err.println("test_sum:  " + sum + " != " + gold_sum);
-        errn++;
-      }
-      // Overwrite with NaN values
-      a1[0] = Double.NaN;
-      a1[1] = Double.POSITIVE_INFINITY;
-      a1[2] = Double.NEGATIVE_INFINITY;
-      a1[3] = Double.MAX_VALUE;
-      a1[4] = Double.MIN_VALUE;
-      a1[5] = Double.MIN_NORMAL;
-
-      a2[6] = a1[0];
-      a2[7] = a1[1];
-      a2[8] = a1[2];
-      a2[9] = a1[3];
-      a2[10] = a1[4];
-      a2[11] = a1[5];
-
-      a3[6] = -a2[6];
-      a3[7] = -a2[7];
-      a3[8] = -a2[8];
-      a3[9] = -a2[9];
-      a3[10] = -a2[10];
-      a3[11] = -a2[11];
-
-      test_addc(a0, a1);
-      errn += verify("test_addc: ", 0, a0[0], (Double.NaN+VALUE));
-      errn += verify("test_addc: ", 1, a0[1], (Double.POSITIVE_INFINITY+VALUE));
-      errn += verify("test_addc: ", 2, a0[2], (Double.NEGATIVE_INFINITY+VALUE));
-      errn += verify("test_addc: ", 3, a0[3], (Double.MAX_VALUE+VALUE));
-      errn += verify("test_addc: ", 4, a0[4], (Double.MIN_VALUE+VALUE));
-      errn += verify("test_addc: ", 5, a0[5], (Double.MIN_NORMAL+VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_addc: ", i, a0[i], ((ADD_INIT+i)+VALUE));
-      }
-      test_addv(a0, a1, VALUE);
-      errn += verify("test_addv: ", 0, a0[0], (Double.NaN+VALUE));
-      errn += verify("test_addv: ", 1, a0[1], (Double.POSITIVE_INFINITY+VALUE));
-      errn += verify("test_addv: ", 2, a0[2], (Double.NEGATIVE_INFINITY+VALUE));
-      errn += verify("test_addv: ", 3, a0[3], (Double.MAX_VALUE+VALUE));
-      errn += verify("test_addv: ", 4, a0[4], (Double.MIN_VALUE+VALUE));
-      errn += verify("test_addv: ", 5, a0[5], (Double.MIN_NORMAL+VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_addv: ", i, a0[i], ((ADD_INIT+i)+VALUE));
-      }
-      test_adda(a0, a1, a2);
-      errn += verify("test_adda: ", 0, a0[0], (Double.NaN+VALUE));
-      errn += verify("test_adda: ", 1, a0[1], (Double.POSITIVE_INFINITY+VALUE));
-      errn += verify("test_adda: ", 2, a0[2], (Double.NEGATIVE_INFINITY+VALUE));
-      errn += verify("test_adda: ", 3, a0[3], (Double.MAX_VALUE+VALUE));
-      errn += verify("test_adda: ", 4, a0[4], (Double.MIN_VALUE+VALUE));
-      errn += verify("test_adda: ", 5, a0[5], (Double.MIN_NORMAL+VALUE));
-      errn += verify("test_adda: ", 6, a0[6], ((ADD_INIT+6)+Double.NaN));
-      errn += verify("test_adda: ", 7, a0[7], ((ADD_INIT+7)+Double.POSITIVE_INFINITY));
-      errn += verify("test_adda: ", 8, a0[8], ((ADD_INIT+8)+Double.NEGATIVE_INFINITY));
-      errn += verify("test_adda: ", 9, a0[9], ((ADD_INIT+9)+Double.MAX_VALUE));
-      errn += verify("test_adda: ", 10, a0[10], ((ADD_INIT+10)+Double.MIN_VALUE));
-      errn += verify("test_adda: ", 11, a0[11], ((ADD_INIT+11)+Double.MIN_NORMAL));
-      for (int i=12; i<ARRLEN; i++) {
-        errn += verify("test_adda: ", i, a0[i], ((ADD_INIT+i)+VALUE));
-      }
-
-      test_subc(a0, a1);
-      errn += verify("test_subc: ", 0, a0[0], (Double.NaN-VALUE));
-      errn += verify("test_subc: ", 1, a0[1], (Double.POSITIVE_INFINITY-VALUE));
-      errn += verify("test_subc: ", 2, a0[2], (Double.NEGATIVE_INFINITY-VALUE));
-      errn += verify("test_subc: ", 3, a0[3], (Double.MAX_VALUE-VALUE));
-      errn += verify("test_subc: ", 4, a0[4], (Double.MIN_VALUE-VALUE));
-      errn += verify("test_subc: ", 5, a0[5], (Double.MIN_NORMAL-VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_subc: ", i, a0[i], ((ADD_INIT+i)-VALUE));
-      }
-      test_subv(a0, a1, VALUE);
-      errn += verify("test_subv: ", 0, a0[0], (Double.NaN-VALUE));
-      errn += verify("test_subv: ", 1, a0[1], (Double.POSITIVE_INFINITY-VALUE));
-      errn += verify("test_subv: ", 2, a0[2], (Double.NEGATIVE_INFINITY-VALUE));
-      errn += verify("test_subv: ", 3, a0[3], (Double.MAX_VALUE-VALUE));
-      errn += verify("test_subv: ", 4, a0[4], (Double.MIN_VALUE-VALUE));
-      errn += verify("test_subv: ", 5, a0[5], (Double.MIN_NORMAL-VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_subv: ", i, a0[i], ((ADD_INIT+i)-VALUE));
-      }
-      test_suba(a0, a1, a2);
-      errn += verify("test_suba: ", 0, a0[0], (Double.NaN-VALUE));
-      errn += verify("test_suba: ", 1, a0[1], (Double.POSITIVE_INFINITY-VALUE));
-      errn += verify("test_suba: ", 2, a0[2], (Double.NEGATIVE_INFINITY-VALUE));
-      errn += verify("test_suba: ", 3, a0[3], (Double.MAX_VALUE-VALUE));
-      errn += verify("test_suba: ", 4, a0[4], (Double.MIN_VALUE-VALUE));
-      errn += verify("test_suba: ", 5, a0[5], (Double.MIN_NORMAL-VALUE));
-      errn += verify("test_suba: ", 6, a0[6], ((ADD_INIT+6)-Double.NaN));
-      errn += verify("test_suba: ", 7, a0[7], ((ADD_INIT+7)-Double.POSITIVE_INFINITY));
-      errn += verify("test_suba: ", 8, a0[8], ((ADD_INIT+8)-Double.NEGATIVE_INFINITY));
-      errn += verify("test_suba: ", 9, a0[9], ((ADD_INIT+9)-Double.MAX_VALUE));
-      errn += verify("test_suba: ", 10, a0[10], ((ADD_INIT+10)-Double.MIN_VALUE));
-      errn += verify("test_suba: ", 11, a0[11], ((ADD_INIT+11)-Double.MIN_NORMAL));
-      for (int i=12; i<ARRLEN; i++) {
-        errn += verify("test_suba: ", i, a0[i], ((ADD_INIT+i)-VALUE));
-      }
-
-      test_mulc(a0, a1);
-      errn += verify("test_mulc: ", 0, a0[0], (Double.NaN*VALUE));
-      errn += verify("test_mulc: ", 1, a0[1], (Double.POSITIVE_INFINITY*VALUE));
-      errn += verify("test_mulc: ", 2, a0[2], (Double.NEGATIVE_INFINITY*VALUE));
-      errn += verify("test_mulc: ", 3, a0[3], (Double.MAX_VALUE*VALUE));
-      errn += verify("test_mulc: ", 4, a0[4], (Double.MIN_VALUE*VALUE));
-      errn += verify("test_mulc: ", 5, a0[5], (Double.MIN_NORMAL*VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_mulc: ", i, a0[i], ((ADD_INIT+i)*VALUE));
-      }
-      test_mulv(a0, a1, VALUE);
-      errn += verify("test_mulv: ", 0, a0[0], (Double.NaN*VALUE));
-      errn += verify("test_mulv: ", 1, a0[1], (Double.POSITIVE_INFINITY*VALUE));
-      errn += verify("test_mulv: ", 2, a0[2], (Double.NEGATIVE_INFINITY*VALUE));
-      errn += verify("test_mulv: ", 3, a0[3], (Double.MAX_VALUE*VALUE));
-      errn += verify("test_mulv: ", 4, a0[4], (Double.MIN_VALUE*VALUE));
-      errn += verify("test_mulv: ", 5, a0[5], (Double.MIN_NORMAL*VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_mulv: ", i, a0[i], ((ADD_INIT+i)*VALUE));
-      }
-      test_mula(a0, a1, a2);
-      errn += verify("test_mula: ", 0, a0[0], (Double.NaN*VALUE));
-      errn += verify("test_mula: ", 1, a0[1], (Double.POSITIVE_INFINITY*VALUE));
-      errn += verify("test_mula: ", 2, a0[2], (Double.NEGATIVE_INFINITY*VALUE));
-      errn += verify("test_mula: ", 3, a0[3], (Double.MAX_VALUE*VALUE));
-      errn += verify("test_mula: ", 4, a0[4], (Double.MIN_VALUE*VALUE));
-      errn += verify("test_mula: ", 5, a0[5], (Double.MIN_NORMAL*VALUE));
-      errn += verify("test_mula: ", 6, a0[6], ((ADD_INIT+6)*Double.NaN));
-      errn += verify("test_mula: ", 7, a0[7], ((ADD_INIT+7)*Double.POSITIVE_INFINITY));
-      errn += verify("test_mula: ", 8, a0[8], ((ADD_INIT+8)*Double.NEGATIVE_INFINITY));
-      errn += verify("test_mula: ", 9, a0[9], ((ADD_INIT+9)*Double.MAX_VALUE));
-      errn += verify("test_mula: ", 10, a0[10], ((ADD_INIT+10)*Double.MIN_VALUE));
-      errn += verify("test_mula: ", 11, a0[11], ((ADD_INIT+11)*Double.MIN_NORMAL));
-      for (int i=12; i<ARRLEN; i++) {
-        errn += verify("test_mula: ", i, a0[i], ((ADD_INIT+i)*VALUE));
-      }
-
-      test_divc(a0, a1);
-      errn += verify("test_divc: ", 0, a0[0], (Double.NaN/VALUE));
-      errn += verify("test_divc: ", 1, a0[1], (Double.POSITIVE_INFINITY/VALUE));
-      errn += verify("test_divc: ", 2, a0[2], (Double.NEGATIVE_INFINITY/VALUE));
-      errn += verify("test_divc: ", 3, a0[3], (Double.MAX_VALUE/VALUE));
-      errn += verify("test_divc: ", 4, a0[4], (Double.MIN_VALUE/VALUE));
-      errn += verify("test_divc: ", 5, a0[5], (Double.MIN_NORMAL/VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_divc: ", i, a0[i], ((ADD_INIT+i)/VALUE));
-      }
-      test_divv(a0, a1, VALUE);
-      errn += verify("test_divv: ", 0, a0[0], (Double.NaN/VALUE));
-      errn += verify("test_divv: ", 1, a0[1], (Double.POSITIVE_INFINITY/VALUE));
-      errn += verify("test_divv: ", 2, a0[2], (Double.NEGATIVE_INFINITY/VALUE));
-      errn += verify("test_divv: ", 3, a0[3], (Double.MAX_VALUE/VALUE));
-      errn += verify("test_divv: ", 4, a0[4], (Double.MIN_VALUE/VALUE));
-      errn += verify("test_divv: ", 5, a0[5], (Double.MIN_NORMAL/VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_divv: ", i, a0[i], ((ADD_INIT+i)/VALUE));
-      }
-      test_diva(a0, a1, a2);
-      errn += verify("test_diva: ", 0, a0[0], (Double.NaN/VALUE));
-      errn += verify("test_diva: ", 1, a0[1], (Double.POSITIVE_INFINITY/VALUE));
-      errn += verify("test_diva: ", 2, a0[2], (Double.NEGATIVE_INFINITY/VALUE));
-      errn += verify("test_diva: ", 3, a0[3], (Double.MAX_VALUE/VALUE));
-      errn += verify("test_diva: ", 4, a0[4], (Double.MIN_VALUE/VALUE));
-      errn += verify("test_diva: ", 5, a0[5], (Double.MIN_NORMAL/VALUE));
-      errn += verify("test_diva: ", 6, a0[6], ((ADD_INIT+6)/Double.NaN));
-      errn += verify("test_diva: ", 7, a0[7], ((ADD_INIT+7)/Double.POSITIVE_INFINITY));
-      errn += verify("test_diva: ", 8, a0[8], ((ADD_INIT+8)/Double.NEGATIVE_INFINITY));
-      errn += verify("test_diva: ", 9, a0[9], ((ADD_INIT+9)/Double.MAX_VALUE));
-      errn += verify("test_diva: ", 10, a0[10], ((ADD_INIT+10)/Double.MIN_VALUE));
-      errn += verify("test_diva: ", 11, a0[11], ((ADD_INIT+11)/Double.MIN_NORMAL));
-      for (int i=12; i<ARRLEN; i++) {
-        errn += verify("test_diva: ", i, a0[i], ((ADD_INIT+i)/VALUE));
-      }
-
-      test_mulc_n(a0, a1);
-      errn += verify("test_mulc_n: ", 0, a0[0], (Double.NaN*(-VALUE)));
-      errn += verify("test_mulc_n: ", 1, a0[1], (Double.POSITIVE_INFINITY*(-VALUE)));
-      errn += verify("test_mulc_n: ", 2, a0[2], (Double.NEGATIVE_INFINITY*(-VALUE)));
-      errn += verify("test_mulc_n: ", 3, a0[3], (Double.MAX_VALUE*(-VALUE)));
-      errn += verify("test_mulc_n: ", 4, a0[4], (Double.MIN_VALUE*(-VALUE)));
-      errn += verify("test_mulc_n: ", 5, a0[5], (Double.MIN_NORMAL*(-VALUE)));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_mulc_n: ", i, a0[i], ((ADD_INIT+i)*(-VALUE)));
-      }
-      test_mulv(a0, a1, -VALUE);
-      errn += verify("test_mulv_n: ", 0, a0[0], (Double.NaN*(-VALUE)));
-      errn += verify("test_mulv_n: ", 1, a0[1], (Double.POSITIVE_INFINITY*(-VALUE)));
-      errn += verify("test_mulv_n: ", 2, a0[2], (Double.NEGATIVE_INFINITY*(-VALUE)));
-      errn += verify("test_mulv_n: ", 3, a0[3], (Double.MAX_VALUE*(-VALUE)));
-      errn += verify("test_mulv_n: ", 4, a0[4], (Double.MIN_VALUE*(-VALUE)));
-      errn += verify("test_mulv_n: ", 5, a0[5], (Double.MIN_NORMAL*(-VALUE)));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_mulv_n: ", i, a0[i], ((ADD_INIT+i)*(-VALUE)));
-      }
-      test_mula(a0, a1, a3);
-      errn += verify("test_mula_n: ", 0, a0[0], (Double.NaN*(-VALUE)));
-      errn += verify("test_mula_n: ", 1, a0[1], (Double.POSITIVE_INFINITY*(-VALUE)));
-      errn += verify("test_mula_n: ", 2, a0[2], (Double.NEGATIVE_INFINITY*(-VALUE)));
-      errn += verify("test_mula_n: ", 3, a0[3], (Double.MAX_VALUE*(-VALUE)));
-      errn += verify("test_mula_n: ", 4, a0[4], (Double.MIN_VALUE*(-VALUE)));
-      errn += verify("test_mula_n: ", 5, a0[5], (Double.MIN_NORMAL*(-VALUE)));
-      errn += verify("test_mula_n: ", 6, a0[6], ((ADD_INIT+6)*(-Double.NaN)));
-      errn += verify("test_mula_n: ", 7, a0[7], ((ADD_INIT+7)*(-Double.POSITIVE_INFINITY)));
-      errn += verify("test_mula_n: ", 8, a0[8], ((ADD_INIT+8)*(-Double.NEGATIVE_INFINITY)));
-      errn += verify("test_mula_n: ", 9, a0[9], ((ADD_INIT+9)*(-Double.MAX_VALUE)));
-      errn += verify("test_mula_n: ", 10, a0[10], ((ADD_INIT+10)*(-Double.MIN_VALUE)));
-      errn += verify("test_mula_n: ", 11, a0[11], ((ADD_INIT+11)*(-Double.MIN_NORMAL)));
-      for (int i=12; i<ARRLEN; i++) {
-        errn += verify("test_mula_n: ", i, a0[i], ((ADD_INIT+i)*(-VALUE)));
-      }
-
-      test_divc_n(a0, a1);
-      errn += verify("test_divc_n: ", 0, a0[0], (Double.NaN/(-VALUE)));
-      errn += verify("test_divc_n: ", 1, a0[1], (Double.POSITIVE_INFINITY/(-VALUE)));
-      errn += verify("test_divc_n: ", 2, a0[2], (Double.NEGATIVE_INFINITY/(-VALUE)));
-      errn += verify("test_divc_n: ", 3, a0[3], (Double.MAX_VALUE/(-VALUE)));
-      errn += verify("test_divc_n: ", 4, a0[4], (Double.MIN_VALUE/(-VALUE)));
-      errn += verify("test_divc_n: ", 5, a0[5], (Double.MIN_NORMAL/(-VALUE)));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_divc_n: ", i, a0[i], ((ADD_INIT+i)/(-VALUE)));
-      }
-      test_divv(a0, a1, -VALUE);
-      errn += verify("test_divv_n: ", 0, a0[0], (Double.NaN/(-VALUE)));
-      errn += verify("test_divv_n: ", 1, a0[1], (Double.POSITIVE_INFINITY/(-VALUE)));
-      errn += verify("test_divv_n: ", 2, a0[2], (Double.NEGATIVE_INFINITY/(-VALUE)));
-      errn += verify("test_divv_n: ", 3, a0[3], (Double.MAX_VALUE/(-VALUE)));
-      errn += verify("test_divv_n: ", 4, a0[4], (Double.MIN_VALUE/(-VALUE)));
-      errn += verify("test_divv_n: ", 5, a0[5], (Double.MIN_NORMAL/(-VALUE)));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_divv_n: ", i, a0[i], ((ADD_INIT+i)/(-VALUE)));
-      }
-      test_diva(a0, a1, a3);
-      errn += verify("test_diva_n: ", 0, a0[0], (Double.NaN/(-VALUE)));
-      errn += verify("test_diva_n: ", 1, a0[1], (Double.POSITIVE_INFINITY/(-VALUE)));
-      errn += verify("test_diva_n: ", 2, a0[2], (Double.NEGATIVE_INFINITY/(-VALUE)));
-      errn += verify("test_diva_n: ", 3, a0[3], (Double.MAX_VALUE/(-VALUE)));
-      errn += verify("test_diva_n: ", 4, a0[4], (Double.MIN_VALUE/(-VALUE)));
-      errn += verify("test_diva_n: ", 5, a0[5], (Double.MIN_NORMAL/(-VALUE)));
-      errn += verify("test_diva_n: ", 6, a0[6], ((ADD_INIT+6)/(-Double.NaN)));
-      errn += verify("test_diva_n: ", 7, a0[7], ((ADD_INIT+7)/(-Double.POSITIVE_INFINITY)));
-      errn += verify("test_diva_n: ", 8, a0[8], ((ADD_INIT+8)/(-Double.NEGATIVE_INFINITY)));
-      errn += verify("test_diva_n: ", 9, a0[9], ((ADD_INIT+9)/(-Double.MAX_VALUE)));
-      errn += verify("test_diva_n: ", 10, a0[10], ((ADD_INIT+10)/(-Double.MIN_VALUE)));
-      errn += verify("test_diva_n: ", 11, a0[11], ((ADD_INIT+11)/(-Double.MIN_NORMAL)));
-      for (int i=12; i<ARRLEN; i++) {
-        errn += verify("test_diva_n: ", i, a0[i], ((ADD_INIT+i)/(-VALUE)));
-      }
-
-    }
-
-    if (errn > 0)
-      return errn;
-
-    System.out.println("Time");
-    long start, end;
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sum(a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sum: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_addc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_addc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_addv(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_addv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_adda(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_adda: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_subc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_subc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_subv(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_subv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_suba(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_suba: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulv(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mula(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mula: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divv(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_diva(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_diva: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulc_n(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulc_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulv(a0, a1, -VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulv_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mula(a0, a1, a3);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mula_n: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divc_n(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divc_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divv(a0, a1, -VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divv_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_diva(a0, a1, a3);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_diva_n: " + (end - start));
-
-    return errn;
-  }
-
-  static double test_sum(double[] a1) {
-    double sum = 0;
-    for (int i = 0; i < a1.length; i+=1) {
-      sum += a1[i];
-    }
-    return sum;
-  }
-
-  static void test_addc(double[] a0, double[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]+VALUE);
-    }
-  }
-  static void test_addv(double[] a0, double[] a1, double b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]+b);
-    }
-  }
-  static void test_adda(double[] a0, double[] a1, double[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]+a2[i]);
-    }
-  }
-
-  static void test_subc(double[] a0, double[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]-VALUE);
-    }
-  }
-  static void test_subv(double[] a0, double[] a1, double b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]-b);
-    }
-  }
-  static void test_suba(double[] a0, double[] a1, double[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]-a2[i]);
-    }
-  }
-
-  static void test_mulc(double[] a0, double[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]*VALUE);
-    }
-  }
-  static void test_mulc_n(double[] a0, double[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]*(-VALUE));
-    }
-  }
-  static void test_mulv(double[] a0, double[] a1, double b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]*b);
-    }
-  }
-  static void test_mula(double[] a0, double[] a1, double[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]*a2[i]);
-    }
-  }
-
-  static void test_divc(double[] a0, double[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]/VALUE);
-    }
-  }
-  static void test_divc_n(double[] a0, double[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]/(-VALUE));
-    }
-  }
-  static void test_divv(double[] a0, double[] a1, double b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]/b);
-    }
-  }
-  static void test_diva(double[] a0, double[] a1, double[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]/a2[i]);
-    }
-  }
-
-  static int verify(String text, int i, double elem, double val) {
-    if (elem != val && !(Double.isNaN(elem) && Double.isNaN(val))) {
-      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
-      return 1;
-    }
-    return 0;
-  }
-}
--- a/test/compiler/6340864/TestFloatVect.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,560 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6340864
- * @summary Implement vectorization optimizations in hotspot-server
- *
- * @run main/othervm/timeout=400 -Xbatch -Xmx64m TestFloatVect
- */
-
-public class TestFloatVect {
-  private static final int ARRLEN = 997;
-  private static final int ITERS  = 11000;
-  private static final float ADD_INIT = -7500.f;
-  private static final float VALUE = 15.f;
-
-  public static void main(String args[]) {
-    System.out.println("Testing Float vectors");
-    int errn = test();
-    if (errn > 0) {
-      System.err.println("FAILED: " + errn + " errors");
-      System.exit(97);
-    }
-    System.out.println("PASSED");
-  }
-
-  static int test() {
-    float[] a0 = new float[ARRLEN];
-    float[] a1 = new float[ARRLEN];
-    float[] a2 = new float[ARRLEN];
-    float[] a3 = new float[ARRLEN];
-    // Initialize
-    float gold_sum = 0;
-    for (int i=0; i<ARRLEN; i++) {
-      float val = ADD_INIT+(float)i;
-      gold_sum += val;
-      a1[i] = val;
-      a2[i] = VALUE;
-      a3[i] = -VALUE;
-    }
-
-    System.out.println("Warmup");
-    for (int i=0; i<ITERS; i++) {
-      test_sum(a1);
-      test_addc(a0, a1);
-      test_addv(a0, a1, VALUE);
-      test_adda(a0, a1, a2);
-      test_subc(a0, a1);
-      test_subv(a0, a1, VALUE);
-      test_suba(a0, a1, a2);
-      test_mulc(a0, a1);
-      test_mulv(a0, a1, VALUE);
-      test_mula(a0, a1, a2);
-      test_divc(a0, a1);
-      test_divv(a0, a1, VALUE);
-      test_diva(a0, a1, a2);
-      test_mulc_n(a0, a1);
-      test_mulv(a0, a1, -VALUE);
-      test_mula(a0, a1, a3);
-      test_divc_n(a0, a1);
-      test_divv(a0, a1, -VALUE);
-      test_diva(a0, a1, a3);
-    }
-    // Test and verify results
-    System.out.println("Verification");
-    int errn = 0;
-    {
-      float sum = test_sum(a1);
-      if (sum != gold_sum) {
-        System.err.println("test_sum:  " + sum + " != " + gold_sum);
-        errn++;
-      }
-      // Overwrite with NaN values
-      a1[0] = Float.NaN;
-      a1[1] = Float.POSITIVE_INFINITY;
-      a1[2] = Float.NEGATIVE_INFINITY;
-      a1[3] = Float.MAX_VALUE;
-      a1[4] = Float.MIN_VALUE;
-      a1[5] = Float.MIN_NORMAL;
-
-      a2[6] = a1[0];
-      a2[7] = a1[1];
-      a2[8] = a1[2];
-      a2[9] = a1[3];
-      a2[10] = a1[4];
-      a2[11] = a1[5];
-
-      a3[6] = -a2[6];
-      a3[7] = -a2[7];
-      a3[8] = -a2[8];
-      a3[9] = -a2[9];
-      a3[10] = -a2[10];
-      a3[11] = -a2[11];
-
-      test_addc(a0, a1);
-      errn += verify("test_addc: ", 0, a0[0], (Float.NaN+VALUE));
-      errn += verify("test_addc: ", 1, a0[1], (Float.POSITIVE_INFINITY+VALUE));
-      errn += verify("test_addc: ", 2, a0[2], (Float.NEGATIVE_INFINITY+VALUE));
-      errn += verify("test_addc: ", 3, a0[3], (Float.MAX_VALUE+VALUE));
-      errn += verify("test_addc: ", 4, a0[4], (Float.MIN_VALUE+VALUE));
-      errn += verify("test_addc: ", 5, a0[5], (Float.MIN_NORMAL+VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_addc: ", i, a0[i], ((ADD_INIT+i)+VALUE));
-      }
-      test_addv(a0, a1, VALUE);
-      errn += verify("test_addv: ", 0, a0[0], (Float.NaN+VALUE));
-      errn += verify("test_addv: ", 1, a0[1], (Float.POSITIVE_INFINITY+VALUE));
-      errn += verify("test_addv: ", 2, a0[2], (Float.NEGATIVE_INFINITY+VALUE));
-      errn += verify("test_addv: ", 3, a0[3], (Float.MAX_VALUE+VALUE));
-      errn += verify("test_addv: ", 4, a0[4], (Float.MIN_VALUE+VALUE));
-      errn += verify("test_addv: ", 5, a0[5], (Float.MIN_NORMAL+VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_addv: ", i, a0[i], ((ADD_INIT+i)+VALUE));
-      }
-      test_adda(a0, a1, a2);
-      errn += verify("test_adda: ", 0, a0[0], (Float.NaN+VALUE));
-      errn += verify("test_adda: ", 1, a0[1], (Float.POSITIVE_INFINITY+VALUE));
-      errn += verify("test_adda: ", 2, a0[2], (Float.NEGATIVE_INFINITY+VALUE));
-      errn += verify("test_adda: ", 3, a0[3], (Float.MAX_VALUE+VALUE));
-      errn += verify("test_adda: ", 4, a0[4], (Float.MIN_VALUE+VALUE));
-      errn += verify("test_adda: ", 5, a0[5], (Float.MIN_NORMAL+VALUE));
-      errn += verify("test_adda: ", 6, a0[6], ((ADD_INIT+6)+Float.NaN));
-      errn += verify("test_adda: ", 7, a0[7], ((ADD_INIT+7)+Float.POSITIVE_INFINITY));
-      errn += verify("test_adda: ", 8, a0[8], ((ADD_INIT+8)+Float.NEGATIVE_INFINITY));
-      errn += verify("test_adda: ", 9, a0[9], ((ADD_INIT+9)+Float.MAX_VALUE));
-      errn += verify("test_adda: ", 10, a0[10], ((ADD_INIT+10)+Float.MIN_VALUE));
-      errn += verify("test_adda: ", 11, a0[11], ((ADD_INIT+11)+Float.MIN_NORMAL));
-      for (int i=12; i<ARRLEN; i++) {
-        errn += verify("test_adda: ", i, a0[i], ((ADD_INIT+i)+VALUE));
-      }
-
-      test_subc(a0, a1);
-      errn += verify("test_subc: ", 0, a0[0], (Float.NaN-VALUE));
-      errn += verify("test_subc: ", 1, a0[1], (Float.POSITIVE_INFINITY-VALUE));
-      errn += verify("test_subc: ", 2, a0[2], (Float.NEGATIVE_INFINITY-VALUE));
-      errn += verify("test_subc: ", 3, a0[3], (Float.MAX_VALUE-VALUE));
-      errn += verify("test_subc: ", 4, a0[4], (Float.MIN_VALUE-VALUE));
-      errn += verify("test_subc: ", 5, a0[5], (Float.MIN_NORMAL-VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_subc: ", i, a0[i], ((ADD_INIT+i)-VALUE));
-      }
-      test_subv(a0, a1, VALUE);
-      errn += verify("test_subv: ", 0, a0[0], (Float.NaN-VALUE));
-      errn += verify("test_subv: ", 1, a0[1], (Float.POSITIVE_INFINITY-VALUE));
-      errn += verify("test_subv: ", 2, a0[2], (Float.NEGATIVE_INFINITY-VALUE));
-      errn += verify("test_subv: ", 3, a0[3], (Float.MAX_VALUE-VALUE));
-      errn += verify("test_subv: ", 4, a0[4], (Float.MIN_VALUE-VALUE));
-      errn += verify("test_subv: ", 5, a0[5], (Float.MIN_NORMAL-VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_subv: ", i, a0[i], ((ADD_INIT+i)-VALUE));
-      }
-      test_suba(a0, a1, a2);
-      errn += verify("test_suba: ", 0, a0[0], (Float.NaN-VALUE));
-      errn += verify("test_suba: ", 1, a0[1], (Float.POSITIVE_INFINITY-VALUE));
-      errn += verify("test_suba: ", 2, a0[2], (Float.NEGATIVE_INFINITY-VALUE));
-      errn += verify("test_suba: ", 3, a0[3], (Float.MAX_VALUE-VALUE));
-      errn += verify("test_suba: ", 4, a0[4], (Float.MIN_VALUE-VALUE));
-      errn += verify("test_suba: ", 5, a0[5], (Float.MIN_NORMAL-VALUE));
-      errn += verify("test_suba: ", 6, a0[6], ((ADD_INIT+6)-Float.NaN));
-      errn += verify("test_suba: ", 7, a0[7], ((ADD_INIT+7)-Float.POSITIVE_INFINITY));
-      errn += verify("test_suba: ", 8, a0[8], ((ADD_INIT+8)-Float.NEGATIVE_INFINITY));
-      errn += verify("test_suba: ", 9, a0[9], ((ADD_INIT+9)-Float.MAX_VALUE));
-      errn += verify("test_suba: ", 10, a0[10], ((ADD_INIT+10)-Float.MIN_VALUE));
-      errn += verify("test_suba: ", 11, a0[11], ((ADD_INIT+11)-Float.MIN_NORMAL));
-      for (int i=12; i<ARRLEN; i++) {
-        errn += verify("test_suba: ", i, a0[i], ((ADD_INIT+i)-VALUE));
-      }
-
-      test_mulc(a0, a1);
-      errn += verify("test_mulc: ", 0, a0[0], (Float.NaN*VALUE));
-      errn += verify("test_mulc: ", 1, a0[1], (Float.POSITIVE_INFINITY*VALUE));
-      errn += verify("test_mulc: ", 2, a0[2], (Float.NEGATIVE_INFINITY*VALUE));
-      errn += verify("test_mulc: ", 3, a0[3], (Float.MAX_VALUE*VALUE));
-      errn += verify("test_mulc: ", 4, a0[4], (Float.MIN_VALUE*VALUE));
-      errn += verify("test_mulc: ", 5, a0[5], (Float.MIN_NORMAL*VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_mulc: ", i, a0[i], ((ADD_INIT+i)*VALUE));
-      }
-      test_mulv(a0, a1, VALUE);
-      errn += verify("test_mulv: ", 0, a0[0], (Float.NaN*VALUE));
-      errn += verify("test_mulv: ", 1, a0[1], (Float.POSITIVE_INFINITY*VALUE));
-      errn += verify("test_mulv: ", 2, a0[2], (Float.NEGATIVE_INFINITY*VALUE));
-      errn += verify("test_mulv: ", 3, a0[3], (Float.MAX_VALUE*VALUE));
-      errn += verify("test_mulv: ", 4, a0[4], (Float.MIN_VALUE*VALUE));
-      errn += verify("test_mulv: ", 5, a0[5], (Float.MIN_NORMAL*VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_mulv: ", i, a0[i], ((ADD_INIT+i)*VALUE));
-      }
-      test_mula(a0, a1, a2);
-      errn += verify("test_mula: ", 0, a0[0], (Float.NaN*VALUE));
-      errn += verify("test_mula: ", 1, a0[1], (Float.POSITIVE_INFINITY*VALUE));
-      errn += verify("test_mula: ", 2, a0[2], (Float.NEGATIVE_INFINITY*VALUE));
-      errn += verify("test_mula: ", 3, a0[3], (Float.MAX_VALUE*VALUE));
-      errn += verify("test_mula: ", 4, a0[4], (Float.MIN_VALUE*VALUE));
-      errn += verify("test_mula: ", 5, a0[5], (Float.MIN_NORMAL*VALUE));
-      errn += verify("test_mula: ", 6, a0[6], ((ADD_INIT+6)*Float.NaN));
-      errn += verify("test_mula: ", 7, a0[7], ((ADD_INIT+7)*Float.POSITIVE_INFINITY));
-      errn += verify("test_mula: ", 8, a0[8], ((ADD_INIT+8)*Float.NEGATIVE_INFINITY));
-      errn += verify("test_mula: ", 9, a0[9], ((ADD_INIT+9)*Float.MAX_VALUE));
-      errn += verify("test_mula: ", 10, a0[10], ((ADD_INIT+10)*Float.MIN_VALUE));
-      errn += verify("test_mula: ", 11, a0[11], ((ADD_INIT+11)*Float.MIN_NORMAL));
-      for (int i=12; i<ARRLEN; i++) {
-        errn += verify("test_mula: ", i, a0[i], ((ADD_INIT+i)*VALUE));
-      }
-
-      test_divc(a0, a1);
-      errn += verify("test_divc: ", 0, a0[0], (Float.NaN/VALUE));
-      errn += verify("test_divc: ", 1, a0[1], (Float.POSITIVE_INFINITY/VALUE));
-      errn += verify("test_divc: ", 2, a0[2], (Float.NEGATIVE_INFINITY/VALUE));
-      errn += verify("test_divc: ", 3, a0[3], (Float.MAX_VALUE/VALUE));
-      errn += verify("test_divc: ", 4, a0[4], (Float.MIN_VALUE/VALUE));
-      errn += verify("test_divc: ", 5, a0[5], (Float.MIN_NORMAL/VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_divc: ", i, a0[i], ((ADD_INIT+i)/VALUE));
-      }
-      test_divv(a0, a1, VALUE);
-      errn += verify("test_divv: ", 0, a0[0], (Float.NaN/VALUE));
-      errn += verify("test_divv: ", 1, a0[1], (Float.POSITIVE_INFINITY/VALUE));
-      errn += verify("test_divv: ", 2, a0[2], (Float.NEGATIVE_INFINITY/VALUE));
-      errn += verify("test_divv: ", 3, a0[3], (Float.MAX_VALUE/VALUE));
-      errn += verify("test_divv: ", 4, a0[4], (Float.MIN_VALUE/VALUE));
-      errn += verify("test_divv: ", 5, a0[5], (Float.MIN_NORMAL/VALUE));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_divv: ", i, a0[i], ((ADD_INIT+i)/VALUE));
-      }
-      test_diva(a0, a1, a2);
-      errn += verify("test_diva: ", 0, a0[0], (Float.NaN/VALUE));
-      errn += verify("test_diva: ", 1, a0[1], (Float.POSITIVE_INFINITY/VALUE));
-      errn += verify("test_diva: ", 2, a0[2], (Float.NEGATIVE_INFINITY/VALUE));
-      errn += verify("test_diva: ", 3, a0[3], (Float.MAX_VALUE/VALUE));
-      errn += verify("test_diva: ", 4, a0[4], (Float.MIN_VALUE/VALUE));
-      errn += verify("test_diva: ", 5, a0[5], (Float.MIN_NORMAL/VALUE));
-      errn += verify("test_diva: ", 6, a0[6], ((ADD_INIT+6)/Float.NaN));
-      errn += verify("test_diva: ", 7, a0[7], ((ADD_INIT+7)/Float.POSITIVE_INFINITY));
-      errn += verify("test_diva: ", 8, a0[8], ((ADD_INIT+8)/Float.NEGATIVE_INFINITY));
-      errn += verify("test_diva: ", 9, a0[9], ((ADD_INIT+9)/Float.MAX_VALUE));
-      errn += verify("test_diva: ", 10, a0[10], ((ADD_INIT+10)/Float.MIN_VALUE));
-      errn += verify("test_diva: ", 11, a0[11], ((ADD_INIT+11)/Float.MIN_NORMAL));
-      for (int i=12; i<ARRLEN; i++) {
-        errn += verify("test_diva: ", i, a0[i], ((ADD_INIT+i)/VALUE));
-      }
-
-      test_mulc_n(a0, a1);
-      errn += verify("test_mulc_n: ", 0, a0[0], (Float.NaN*(-VALUE)));
-      errn += verify("test_mulc_n: ", 1, a0[1], (Float.POSITIVE_INFINITY*(-VALUE)));
-      errn += verify("test_mulc_n: ", 2, a0[2], (Float.NEGATIVE_INFINITY*(-VALUE)));
-      errn += verify("test_mulc_n: ", 3, a0[3], (Float.MAX_VALUE*(-VALUE)));
-      errn += verify("test_mulc_n: ", 4, a0[4], (Float.MIN_VALUE*(-VALUE)));
-      errn += verify("test_mulc_n: ", 5, a0[5], (Float.MIN_NORMAL*(-VALUE)));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_mulc_n: ", i, a0[i], ((ADD_INIT+i)*(-VALUE)));
-      }
-      test_mulv(a0, a1, -VALUE);
-      errn += verify("test_mulv_n: ", 0, a0[0], (Float.NaN*(-VALUE)));
-      errn += verify("test_mulv_n: ", 1, a0[1], (Float.POSITIVE_INFINITY*(-VALUE)));
-      errn += verify("test_mulv_n: ", 2, a0[2], (Float.NEGATIVE_INFINITY*(-VALUE)));
-      errn += verify("test_mulv_n: ", 3, a0[3], (Float.MAX_VALUE*(-VALUE)));
-      errn += verify("test_mulv_n: ", 4, a0[4], (Float.MIN_VALUE*(-VALUE)));
-      errn += verify("test_mulv_n: ", 5, a0[5], (Float.MIN_NORMAL*(-VALUE)));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_mulv_n: ", i, a0[i], ((ADD_INIT+i)*(-VALUE)));
-      }
-      test_mula(a0, a1, a3);
-      errn += verify("test_mula_n: ", 0, a0[0], (Float.NaN*(-VALUE)));
-      errn += verify("test_mula_n: ", 1, a0[1], (Float.POSITIVE_INFINITY*(-VALUE)));
-      errn += verify("test_mula_n: ", 2, a0[2], (Float.NEGATIVE_INFINITY*(-VALUE)));
-      errn += verify("test_mula_n: ", 3, a0[3], (Float.MAX_VALUE*(-VALUE)));
-      errn += verify("test_mula_n: ", 4, a0[4], (Float.MIN_VALUE*(-VALUE)));
-      errn += verify("test_mula_n: ", 5, a0[5], (Float.MIN_NORMAL*(-VALUE)));
-      errn += verify("test_mula_n: ", 6, a0[6], ((ADD_INIT+6)*(-Float.NaN)));
-      errn += verify("test_mula_n: ", 7, a0[7], ((ADD_INIT+7)*(-Float.POSITIVE_INFINITY)));
-      errn += verify("test_mula_n: ", 8, a0[8], ((ADD_INIT+8)*(-Float.NEGATIVE_INFINITY)));
-      errn += verify("test_mula_n: ", 9, a0[9], ((ADD_INIT+9)*(-Float.MAX_VALUE)));
-      errn += verify("test_mula_n: ", 10, a0[10], ((ADD_INIT+10)*(-Float.MIN_VALUE)));
-      errn += verify("test_mula_n: ", 11, a0[11], ((ADD_INIT+11)*(-Float.MIN_NORMAL)));
-      for (int i=12; i<ARRLEN; i++) {
-        errn += verify("test_mula_n: ", i, a0[i], ((ADD_INIT+i)*(-VALUE)));
-      }
-
-      test_divc_n(a0, a1);
-      errn += verify("test_divc_n: ", 0, a0[0], (Float.NaN/(-VALUE)));
-      errn += verify("test_divc_n: ", 1, a0[1], (Float.POSITIVE_INFINITY/(-VALUE)));
-      errn += verify("test_divc_n: ", 2, a0[2], (Float.NEGATIVE_INFINITY/(-VALUE)));
-      errn += verify("test_divc_n: ", 3, a0[3], (Float.MAX_VALUE/(-VALUE)));
-      errn += verify("test_divc_n: ", 4, a0[4], (Float.MIN_VALUE/(-VALUE)));
-      errn += verify("test_divc_n: ", 5, a0[5], (Float.MIN_NORMAL/(-VALUE)));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_divc_n: ", i, a0[i], ((ADD_INIT+i)/(-VALUE)));
-      }
-      test_divv(a0, a1, -VALUE);
-      errn += verify("test_divv_n: ", 0, a0[0], (Float.NaN/(-VALUE)));
-      errn += verify("test_divv_n: ", 1, a0[1], (Float.POSITIVE_INFINITY/(-VALUE)));
-      errn += verify("test_divv_n: ", 2, a0[2], (Float.NEGATIVE_INFINITY/(-VALUE)));
-      errn += verify("test_divv_n: ", 3, a0[3], (Float.MAX_VALUE/(-VALUE)));
-      errn += verify("test_divv_n: ", 4, a0[4], (Float.MIN_VALUE/(-VALUE)));
-      errn += verify("test_divv_n: ", 5, a0[5], (Float.MIN_NORMAL/(-VALUE)));
-      for (int i=6; i<ARRLEN; i++) {
-        errn += verify("test_divv_n: ", i, a0[i], ((ADD_INIT+i)/(-VALUE)));
-      }
-      test_diva(a0, a1, a3);
-      errn += verify("test_diva_n: ", 0, a0[0], (Float.NaN/(-VALUE)));
-      errn += verify("test_diva_n: ", 1, a0[1], (Float.POSITIVE_INFINITY/(-VALUE)));
-      errn += verify("test_diva_n: ", 2, a0[2], (Float.NEGATIVE_INFINITY/(-VALUE)));
-      errn += verify("test_diva_n: ", 3, a0[3], (Float.MAX_VALUE/(-VALUE)));
-      errn += verify("test_diva_n: ", 4, a0[4], (Float.MIN_VALUE/(-VALUE)));
-      errn += verify("test_diva_n: ", 5, a0[5], (Float.MIN_NORMAL/(-VALUE)));
-      errn += verify("test_diva_n: ", 6, a0[6], ((ADD_INIT+6)/(-Float.NaN)));
-      errn += verify("test_diva_n: ", 7, a0[7], ((ADD_INIT+7)/(-Float.POSITIVE_INFINITY)));
-      errn += verify("test_diva_n: ", 8, a0[8], ((ADD_INIT+8)/(-Float.NEGATIVE_INFINITY)));
-      errn += verify("test_diva_n: ", 9, a0[9], ((ADD_INIT+9)/(-Float.MAX_VALUE)));
-      errn += verify("test_diva_n: ", 10, a0[10], ((ADD_INIT+10)/(-Float.MIN_VALUE)));
-      errn += verify("test_diva_n: ", 11, a0[11], ((ADD_INIT+11)/(-Float.MIN_NORMAL)));
-      for (int i=12; i<ARRLEN; i++) {
-        errn += verify("test_diva_n: ", i, a0[i], ((ADD_INIT+i)/(-VALUE)));
-      }
-
-    }
-
-    if (errn > 0)
-      return errn;
-
-    System.out.println("Time");
-    long start, end;
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sum(a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sum: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_addc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_addc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_addv(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_addv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_adda(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_adda: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_subc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_subc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_subv(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_subv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_suba(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_suba: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulv(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mula(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mula: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divv(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_diva(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_diva: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulc_n(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulc_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulv(a0, a1, -VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulv_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mula(a0, a1, a3);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mula_n: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divc_n(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divc_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divv(a0, a1, -VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divv_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_diva(a0, a1, a3);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_diva_n: " + (end - start));
-
-    return errn;
-  }
-
-  static float test_sum(float[] a1) {
-    float sum = 0;
-    for (int i = 0; i < a1.length; i+=1) {
-      sum += a1[i];
-    }
-    return sum;
-  }
-
-  static void test_addc(float[] a0, float[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]+VALUE);
-    }
-  }
-  static void test_addv(float[] a0, float[] a1, float b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]+b);
-    }
-  }
-  static void test_adda(float[] a0, float[] a1, float[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]+a2[i]);
-    }
-  }
-
-  static void test_subc(float[] a0, float[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]-VALUE);
-    }
-  }
-  static void test_subv(float[] a0, float[] a1, float b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]-b);
-    }
-  }
-  static void test_suba(float[] a0, float[] a1, float[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]-a2[i]);
-    }
-  }
-
-  static void test_mulc(float[] a0, float[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]*VALUE);
-    }
-  }
-  static void test_mulc_n(float[] a0, float[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]*(-VALUE));
-    }
-  }
-  static void test_mulv(float[] a0, float[] a1, float b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]*b);
-    }
-  }
-  static void test_mula(float[] a0, float[] a1, float[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]*a2[i]);
-    }
-  }
-
-  static void test_divc(float[] a0, float[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]/VALUE);
-    }
-  }
-  static void test_divc_n(float[] a0, float[] a1) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]/(-VALUE));
-    }
-  }
-  static void test_divv(float[] a0, float[] a1, float b) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]/b);
-    }
-  }
-  static void test_diva(float[] a0, float[] a1, float[] a2) {
-    for (int i = 0; i < a0.length; i+=1) {
-      a0[i] = (a1[i]/a2[i]);
-    }
-  }
-
-  static int verify(String text, int i, float elem, float val) {
-    if (elem != val && !(Float.isNaN(elem) && Float.isNaN(val))) {
-      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
-      return 1;
-    }
-    return 0;
-  }
-}
--- a/test/compiler/6340864/TestIntVect.java	Wed Nov 26 18:01:10 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1225 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 6340864
- * @summary Implement vectorization optimizations in hotspot-server
- *
- * @run main/othervm/timeout=400 -Xbatch -Xmx64m TestIntVect
- */
-
-public class TestIntVect {
-  private static final int ARRLEN = 997;
-  private static final int ITERS  = 11000;
-  private static final int ADD_INIT = Integer.MAX_VALUE-500;
-  private static final int BIT_MASK = 0xEC80F731;
-  private static final int VALUE = 15;
-  private static final int SHIFT = 32;
-
-  public static void main(String args[]) {
-    System.out.println("Testing Integer vectors");
-    int errn = test();
-    if (errn > 0) {
-      System.err.println("FAILED: " + errn + " errors");
-      System.exit(97);
-    }
-    System.out.println("PASSED");
-  }
-
-  static int test() {
-    int[] a0 = new int[ARRLEN];
-    int[] a1 = new int[ARRLEN];
-    int[] a2 = new int[ARRLEN];
-    int[] a3 = new int[ARRLEN];
-    int[] a4 = new int[ARRLEN];
-    long[] p2 = new long[ARRLEN/2];
-    // Initialize
-    int gold_sum = 0;
-    for (int i=0; i<ARRLEN; i++) {
-      int val = (int)(ADD_INIT+i);
-      gold_sum += val;
-      a1[i] = val;
-      a2[i] = (int)VALUE;
-      a3[i] = (int)-VALUE;
-      a4[i] = (int)BIT_MASK;
-    }
-    System.out.println("Warmup");
-    for (int i=0; i<ITERS; i++) {
-      test_sum(a1);
-      test_addc(a0, a1);
-      test_addv(a0, a1, (int)VALUE);
-      test_adda(a0, a1, a2);
-      test_subc(a0, a1);
-      test_subv(a0, a1, (int)VALUE);
-      test_suba(a0, a1, a2);
-
-      test_mulc(a0, a1);
-      test_mulv(a0, a1, (int)VALUE);
-      test_mula(a0, a1, a2);
-      test_divc(a0, a1);
-      test_divv(a0, a1, (int)VALUE);
-      test_diva(a0, a1, a2);
-      test_mulc_n(a0, a1);
-      test_mulv(a0, a1, (int)-VALUE);
-      test_mula(a0, a1, a3);
-      test_divc_n(a0, a1);
-      test_divv(a0, a1, (int)-VALUE);
-      test_diva(a0, a1, a3);
-
-      test_andc(a0, a1);
-      test_andv(a0, a1, (int)BIT_MASK);
-      test_anda(a0, a1, a4);
-      test_orc(a0, a1);
-      test_orv(a0, a1, (int)BIT_MASK);
-      test_ora(a0, a1, a4);
-      test_xorc(a0, a1);
-      test_xorv(a0, a1, (int)BIT_MASK);
-      test_xora(a0, a1, a4);
-
-      test_sllc(a0, a1);
-      test_sllv(a0, a1, VALUE);
-      test_srlc(a0, a1);
-      test_srlv(a0, a1, VALUE);
-      test_srac(a0, a1);
-      test_srav(a0, a1, VALUE);
-
-      test_sllc_n(a0, a1);
-      test_sllv(a0, a1, -VALUE);
-      test_srlc_n(a0, a1);
-      test_srlv(a0, a1, -VALUE);
-      test_srac_n(a0, a1);
-      test_srav(a0, a1, -VALUE);
-
-      test_sllc_o(a0, a1);
-      test_sllv(a0, a1, SHIFT);
-      test_srlc_o(a0, a1);
-      test_srlv(a0, a1, SHIFT);
-      test_srac_o(a0, a1);
-      test_srav(a0, a1, SHIFT);
-
-      test_sllc_on(a0, a1);
-      test_sllv(a0, a1, -SHIFT);
-      test_srlc_on(a0, a1);
-      test_srlv(a0, a1, -SHIFT);
-      test_srac_on(a0, a1);
-      test_srav(a0, a1, -SHIFT);
-
-      test_sllc_add(a0, a1);
-      test_sllv_add(a0, a1, ADD_INIT);
-      test_srlc_add(a0, a1);
-      test_srlv_add(a0, a1, ADD_INIT);
-      test_srac_add(a0, a1);
-      test_srav_add(a0, a1, ADD_INIT);
-
-      test_sllc_and(a0, a1);
-      test_sllv_and(a0, a1, BIT_MASK);
-      test_srlc_and(a0, a1);
-      test_srlv_and(a0, a1, BIT_MASK);
-      test_srac_and(a0, a1);
-      test_srav_and(a0, a1, BIT_MASK);
-
-      test_pack2(p2, a1);
-      test_unpack2(a0, p2);
-      test_pack2_swap(p2, a1);
-      test_unpack2_swap(a0, p2);
-    }
-    // Test and verify results
-    System.out.println("Verification");
-    int errn = 0;
-    {
-      int sum = test_sum(a1);
-      if (sum != gold_sum) {
-        System.err.println("test_sum:  " + sum + " != " + gold_sum);
-        errn++;
-      }
-
-      test_addc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_addc: ", i, a0[i], (int)((int)(ADD_INIT+i)+VALUE));
-      }
-      test_addv(a0, a1, (int)VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_addv: ", i, a0[i], (int)((int)(ADD_INIT+i)+VALUE));
-      }
-      test_adda(a0, a1, a2);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_adda: ", i, a0[i], (int)((int)(ADD_INIT+i)+VALUE));
-      }
-
-      test_subc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_subc: ", i, a0[i], (int)((int)(ADD_INIT+i)-VALUE));
-      }
-      test_subv(a0, a1, (int)VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_subv: ", i, a0[i], (int)((int)(ADD_INIT+i)-VALUE));
-      }
-      test_suba(a0, a1, a2);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_suba: ", i, a0[i], (int)((int)(ADD_INIT+i)-VALUE));
-      }
-
-      test_mulc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_mulc: ", i, a0[i], (int)((int)(ADD_INIT+i)*VALUE));
-      }
-      test_mulv(a0, a1, (int)VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_mulv: ", i, a0[i], (int)((int)(ADD_INIT+i)*VALUE));
-      }
-      test_mula(a0, a1, a2);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_mula: ", i, a0[i], (int)((int)(ADD_INIT+i)*VALUE));
-      }
-
-      test_divc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_divc: ", i, a0[i], (int)((int)(ADD_INIT+i)/VALUE));
-      }
-      test_divv(a0, a1, (int)VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_divv: ", i, a0[i], (int)((int)(ADD_INIT+i)/VALUE));
-      }
-      test_diva(a0, a1, a2);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_diva: ", i, a0[i], (int)((int)(ADD_INIT+i)/VALUE));
-      }
-
-      test_mulc_n(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_mulc_n: ", i, a0[i], (int)((int)(ADD_INIT+i)*(-VALUE)));
-      }
-      test_mulv(a0, a1, (int)-VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_mulv_n: ", i, a0[i], (int)((int)(ADD_INIT+i)*(-VALUE)));
-      }
-      test_mula(a0, a1, a3);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_mula_n: ", i, a0[i], (int)((int)(ADD_INIT+i)*(-VALUE)));
-      }
-
-      test_divc_n(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_divc_n: ", i, a0[i], (int)((int)(ADD_INIT+i)/(-VALUE)));
-      }
-      test_divv(a0, a1, (int)-VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_divv_n: ", i, a0[i], (int)((int)(ADD_INIT+i)/(-VALUE)));
-      }
-      test_diva(a0, a1, a3);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_diva_n: ", i, a0[i], (int)((int)(ADD_INIT+i)/(-VALUE)));
-      }
-
-      test_andc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_andc: ", i, a0[i], (int)((int)(ADD_INIT+i)&BIT_MASK));
-      }
-      test_andv(a0, a1, (int)BIT_MASK);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_andv: ", i, a0[i], (int)((int)(ADD_INIT+i)&BIT_MASK));
-      }
-      test_anda(a0, a1, a4);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_anda: ", i, a0[i], (int)((int)(ADD_INIT+i)&BIT_MASK));
-      }
-
-      test_orc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_orc: ", i, a0[i], (int)((int)(ADD_INIT+i)|BIT_MASK));
-      }
-      test_orv(a0, a1, (int)BIT_MASK);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_orv: ", i, a0[i], (int)((int)(ADD_INIT+i)|BIT_MASK));
-      }
-      test_ora(a0, a1, a4);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_ora: ", i, a0[i], (int)((int)(ADD_INIT+i)|BIT_MASK));
-      }
-
-      test_xorc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_xorc: ", i, a0[i], (int)((int)(ADD_INIT+i)^BIT_MASK));
-      }
-      test_xorv(a0, a1, (int)BIT_MASK);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_xorv: ", i, a0[i], (int)((int)(ADD_INIT+i)^BIT_MASK));
-      }
-      test_xora(a0, a1, a4);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_xora: ", i, a0[i], (int)((int)(ADD_INIT+i)^BIT_MASK));
-      }
-
-      test_sllc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllc: ", i, a0[i], (int)((int)(ADD_INIT+i)<<VALUE));
-      }
-      test_sllv(a0, a1, VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllv: ", i, a0[i], (int)((int)(ADD_INIT+i)<<VALUE));
-      }
-
-      test_srlc(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlc: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>VALUE));
-      }
-      test_srlv(a0, a1, VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlv: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>VALUE));
-      }
-
-      test_srac(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srac: ", i, a0[i], (int)((int)(ADD_INIT+i)>>VALUE));
-      }
-      test_srav(a0, a1, VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srav: ", i, a0[i], (int)((int)(ADD_INIT+i)>>VALUE));
-      }
-
-      test_sllc_n(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllc_n: ", i, a0[i], (int)((int)(ADD_INIT+i)<<(-VALUE)));
-      }
-      test_sllv(a0, a1, -VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllv_n: ", i, a0[i], (int)((int)(ADD_INIT+i)<<(-VALUE)));
-      }
-
-      test_srlc_n(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlc_n: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>(-VALUE)));
-      }
-      test_srlv(a0, a1, -VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlv_n: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>(-VALUE)));
-      }
-
-      test_srac_n(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srac_n: ", i, a0[i], (int)((int)(ADD_INIT+i)>>(-VALUE)));
-      }
-      test_srav(a0, a1, -VALUE);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srav_n: ", i, a0[i], (int)((int)(ADD_INIT+i)>>(-VALUE)));
-      }
-
-      test_sllc_o(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllc_o: ", i, a0[i], (int)((int)(ADD_INIT+i)<<SHIFT));
-      }
-      test_sllv(a0, a1, SHIFT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllv_o: ", i, a0[i], (int)((int)(ADD_INIT+i)<<SHIFT));
-      }
-
-      test_srlc_o(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlc_o: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>SHIFT));
-      }
-      test_srlv(a0, a1, SHIFT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlv_o: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>SHIFT));
-      }
-
-      test_srac_o(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srac_o: ", i, a0[i], (int)((int)(ADD_INIT+i)>>SHIFT));
-      }
-      test_srav(a0, a1, SHIFT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srav_o: ", i, a0[i], (int)((int)(ADD_INIT+i)>>SHIFT));
-      }
-
-      test_sllc_on(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllc_on: ", i, a0[i], (int)((int)(ADD_INIT+i)<<(-SHIFT)));
-      }
-      test_sllv(a0, a1, -SHIFT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllv_on: ", i, a0[i], (int)((int)(ADD_INIT+i)<<(-SHIFT)));
-      }
-
-      test_srlc_on(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlc_on: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>(-SHIFT)));
-      }
-      test_srlv(a0, a1, -SHIFT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlv_on: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>(-SHIFT)));
-      }
-
-      test_srac_on(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srac_on: ", i, a0[i], (int)((int)(ADD_INIT+i)>>(-SHIFT)));
-      }
-      test_srav(a0, a1, -SHIFT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srav_on: ", i, a0[i], (int)((int)(ADD_INIT+i)>>(-SHIFT)));
-      }
-
-      test_sllc_add(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllc_add: ", i, a0[i], (int)(((int)(ADD_INIT+i) + ADD_INIT)<<VALUE));
-      }
-      test_sllv_add(a0, a1, ADD_INIT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllv_add: ", i, a0[i], (int)(((int)(ADD_INIT+i) + ADD_INIT)<<VALUE));
-      }
-
-      test_srlc_add(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlc_add: ", i, a0[i], (int)(((int)(ADD_INIT+i) + ADD_INIT)>>>VALUE));
-      }
-      test_srlv_add(a0, a1, ADD_INIT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlv_add: ", i, a0[i], (int)(((int)(ADD_INIT+i) + ADD_INIT)>>>VALUE));
-      }
-
-      test_srac_add(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srac_add: ", i, a0[i], (int)(((int)(ADD_INIT+i) + ADD_INIT)>>VALUE));
-      }
-      test_srav_add(a0, a1, ADD_INIT);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srav_add: ", i, a0[i], (int)(((int)(ADD_INIT+i) + ADD_INIT)>>VALUE));
-      }
-
-      test_sllc_and(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllc_and: ", i, a0[i], (int)(((int)(ADD_INIT+i) & BIT_MASK)<<VALUE));
-      }
-      test_sllv_and(a0, a1, BIT_MASK);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_sllv_and: ", i, a0[i], (int)(((int)(ADD_INIT+i) & BIT_MASK)<<VALUE));
-      }
-
-      test_srlc_and(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlc_and: ", i, a0[i], (int)(((int)(ADD_INIT+i) & BIT_MASK)>>>VALUE));
-      }
-      test_srlv_and(a0, a1, BIT_MASK);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srlv_and: ", i, a0[i], (int)(((int)(ADD_INIT+i) & BIT_MASK)>>>VALUE));
-      }
-
-      test_srac_and(a0, a1);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srac_and: ", i, a0[i], (int)(((int)(ADD_INIT+i) & BIT_MASK)>>VALUE));
-      }
-      test_srav_and(a0, a1, BIT_MASK);
-      for (int i=0; i<ARRLEN; i++) {
-        errn += verify("test_srav_and: ", i, a0[i], (int)(((int)(ADD_INIT+i) & BIT_MASK)>>VALUE));
-      }
-
-      test_pack2(p2, a1);
-      for (int i=0; i<ARRLEN/2; i++) {
-        errn += verify("test_pack2: ", i, p2[i], ((long)(ADD_INIT+2*i) & 0xFFFFFFFFl) | ((long)(ADD_INIT+2*i+1) << 32));
-      }
-      for (int i=0; i<ARRLEN; i++) {
-        a0[i] = -1;
-      }
-      test_unpack2(a0, p2);
-      for (int i=0; i<(ARRLEN&(-2)); i++) {
-        errn += verify("test_unpack2: ", i, a0[i], (ADD_INIT+i));
-      }
-
-      test_pack2_swap(p2, a1);
-      for (int i=0; i<ARRLEN/2; i++) {
-        errn += verify("test_pack2_swap: ", i, p2[i], ((long)(ADD_INIT+2*i+1) & 0xFFFFFFFFl) | ((long)(ADD_INIT+2*i) << 32));
-      }
-      for (int i=0; i<ARRLEN; i++) {
-        a0[i] = -1;
-      }
-      test_unpack2_swap(a0, p2);
-      for (int i=0; i<(ARRLEN&(-2)); i++) {
-        errn += verify("test_unpack2_swap: ", i, a0[i], (ADD_INIT+i));
-      }
-
-    }
-
-    if (errn > 0)
-      return errn;
-
-    System.out.println("Time");
-    long start, end;
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sum(a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sum: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_addc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_addc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_addv(a0, a1, (int)VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_addv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_adda(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_adda: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_subc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_subc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_subv(a0, a1, (int)VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_subv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_suba(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_suba: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulv(a0, a1, (int)VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mula(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mula: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divv(a0, a1, (int)VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_diva(a0, a1, a2);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_diva: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulc_n(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulc_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mulv(a0, a1, (int)-VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mulv_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_mula(a0, a1, a3);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_mula_n: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divc_n(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divc_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_divv(a0, a1, (int)-VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_divv_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_diva(a0, a1, a3);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_diva_n: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_andc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_andc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_andv(a0, a1, (int)BIT_MASK);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_andv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_anda(a0, a1, a4);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_anda: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_orc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_orc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_orv(a0, a1, (int)BIT_MASK);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_orv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_ora(a0, a1, a4);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_ora: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_xorc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_xorc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_xorv(a0, a1, (int)BIT_MASK);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_xorv: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_xora(a0, a1, a4);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_xora: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllv(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllv: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlc(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlc: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srlv(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srlv: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srac(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srac: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_srav(a0, a1, VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_srav: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllc_n(a0, a1);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllc_n: " + (end - start));
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {
-      test_sllv(a0, a1, -VALUE);
-    }
-    end = System.currentTimeMillis();
-    System.out.println("test_sllv_n: " + (end - start));
-
-    start = System.currentTimeMillis();
-    for (int i=0; i<ITERS; i++) {