Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8262256

C2 intrinsincs should not modify IR when bailing out

    XMLWordPrintable

Details

    • b13

    Description

      The following assert triggers when running test/hotspot/jtreg/compiler/unsafe/OpaqueAccesses.java

      --- a/src/hotspot/share/opto/library_call.cpp
      +++ b/src/hotspot/share/opto/library_call.cpp
      @@ -108,7 +108,9 @@ JVMState* LibraryIntrinsic::generate(JVMState* jvms) {
       #endif
         ciMethod* callee = kit.callee();
         const int bci = kit.bci();
      -
      +#ifdef ASSERT
      + Node* ctrl = kit.control();
      +#endif
         // Try to inline the intrinsic.
         if ((CheckIntrinsics ? callee->intrinsic_candidate() : true) &&
             kit.try_to_inline(_last_predicate)) {
      @@ -132,6 +134,7 @@ JVMState* LibraryIntrinsic::generate(JVMState* jvms) {
         }
       
         // The intrinsic bailed out
      + assert(ctrl == kit.control(), "Control flow was added although we bailed out");
         if (jvms->has_method()) {
           // Not a root compile.
           const char* msg;

      Attachments

        Issue Links

          Activity

            People

              thartmann Tobias Hartmann
              thartmann Tobias Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: