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;