From 25b98030569d863e605f398d5f97211008c58ca3 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Wed, 31 May 2023 13:17:45 +0000 Subject: [PATCH] 8308917: C2 SuperWord::output: assert before bailout with CountedLoopReserveKit Reviewed-by: kvn, thartmann --- src/hotspot/share/opto/superword.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index a3625afe815..23970656d23 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -2664,6 +2664,7 @@ bool SuperWord::output() { // Create a vector mask node for post loop, bail out if not created vmask = create_post_loop_vmask(); if (vmask == nullptr) { + // create_post_loop_vmask checks many conditions, any of them could fail return false; // and reverse to backup IG } } @@ -2718,6 +2719,7 @@ bool SuperWord::output() { if (val == nullptr) { if (do_reserve_copy()) { NOT_PRODUCT(if(is_trace_loop_reverse() || TraceLoopOpts) {tty->print_cr("SWPointer::output: val should not be null, exiting SuperWord");}) + assert(false, "input to vector store was not created"); return false; //and reverse to backup IG } ShouldNotReachHere(); @@ -2857,6 +2859,7 @@ bool SuperWord::output() { if (in1 == nullptr) { if (do_reserve_copy()) { NOT_PRODUCT(if(is_trace_loop_reverse() || TraceLoopOpts) {tty->print_cr("SWPointer::output: in1 should not be null, exiting SuperWord");}) + assert(false, "input in1 to vector operand was not created"); return false; //and reverse to backup IG } ShouldNotReachHere(); @@ -2866,6 +2869,7 @@ bool SuperWord::output() { if (in2 == nullptr) { if (do_reserve_copy()) { NOT_PRODUCT(if(is_trace_loop_reverse() || TraceLoopOpts) {tty->print_cr("SWPointer::output: in2 should not be null, exiting SuperWord");}) + assert(false, "input in2 to vector operand was not created"); return false; //and reverse to backup IG } ShouldNotReachHere(); @@ -2939,6 +2943,7 @@ bool SuperWord::output() { } else { if (do_reserve_copy()) { NOT_PRODUCT(if(is_trace_loop_reverse() || TraceLoopOpts) {tty->print_cr("SWPointer::output: Unhandled scalar opcode (%s), ShouldNotReachHere, exiting SuperWord", NodeClassNames[opc]);}) + assert(false, "Unhandled scalar opcode (%s)", NodeClassNames[opc]); return false; //and reverse to backup IG } ShouldNotReachHere();