[jdk19] RFR: 8288112: C2: Error: ShouldNotReachHere() in Type::typerr()
Dean Long
dlong at openjdk.org
Mon Jul 11 21:03:50 UTC 2022
On Mon, 11 Jul 2022 20:47:02 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>>> test\micro\org\openjdk\bench\java\lang\Longs.java:148: error: incompatible types: possible lossy conversion from long to in
>>
>>> Looks good to me, but I still have a problem with the error message. It seems like we could give a better error message if we detected the missing vectorization support earlier. What do you think?
>>
>> Hi @dean-long , Thanks for your comments, error occurs because SLP analysis passes all the checks to enable creation of vector ReverseByte IR, but SLP backend had this case missing due to which some of the IR nodes were vectorized and were feeding into a scalar ReverseByte node, thus while doing a value computation compiler encounters a meet operation b/w vector and scalar lattice. Since its an error related to internals of JIT compiler it will not be adding any value to user and just represent incorrect control path selected by compiler. With this patch we do not hit the trap any more.
>
>> @jatin-bhateja Right, a better error message wouldn't be a value-add to users, but if we could detect it sooner, like in SuperWord::output(), that might be useful to compiler engineers debugging issues.
>
> Hi @dean-long , Agree, I have changed the error message generated with -XX:+TraceLoopOpts to be more explicit like.
> **SWPointer::output: Unhandled scalar opcode (ReverseBytesI), ShouldNotReachHere, exiting SuperWord**
>
> Since patch already handles the missing scalar case, hence this message will not be generated.
@jatin-bhateja OK, thanks.
-------------
PR: https://git.openjdk.org/jdk19/pull/128
More information about the hotspot-compiler-dev
mailing list