RFR: 8370481: C2 SuperWord: Long/Integer.compareUnsigned return wrong value in SLP [v2]

Hamlin Li mli at openjdk.org
Thu Oct 23 13:44:42 UTC 2025


On Thu, 23 Oct 2025 13:22:36 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Not sure I understand you correctly.
>> Do you mean add some code like below?
>> 
>> @@ -1752,6 +1752,8 @@ VTransformBoolTest PackSet::get_bool_test(const Node_List* bool_pack) const {
>>    case Op_CmpUL3:
>>      mask = BoolTest::unsigned_mask(mask);
>>      break;
>> +  default:
>> +    ShouldNotReachHere(); // or assert
>>    } // switch
>> 
>> But besides of Op_CmpF/D, Op_CmpUxx, there could be other Cmp ops call into `PackSet::get_bool_test`.
>> 
>> Or maybe I misunderstood you?
>
> There could be, but then we should explicitly name them, and make sure that they are all ok.
> Just see what cases you need to add, until all testing passes. I hope it would only be a handfull of cmp nodes.
> 
> Doing it all explicitly means we know better that we thought about all cases.

Sure, added all the possible cases.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27942#discussion_r2455181935


More information about the hotspot-compiler-dev mailing list