On Mon, 30 Mar 2026 08:10:42 GMT, Emanuel Peter <[email protected]> wrote:
>> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/AbstractVector.java >> line 505: >> >>> 503: int resSizeLog2 = domSizeLog2 + laneChangeLog2; >>> 504: // resSizeLog2 = 0 => 1-lane vector shrinking to 1-byte >>> lane-size >>> 505: // resSizeLog2 < 0 => small vector shrinking by more than a >>> lane-size >> >> Do you mean `resSizeLog2 > 0 ...`? > > I did not write this - it was already there before! > But you are right it is obvious non-sense, given the assert below > `assert(resSizeLog2 >= 0);` > > I think I'm going to just delete these two lines. Given all the other > comments, they are now not very helpful any more. Let me know if you disagree. Ah no wait. It is sensible and correct. But maybe I can reformulate it. `resSizeLog2 = 0` means the logical result is exactly a single byte. `resSizeLog2 < 0` would mean we have less than a byte in total for the logial result. So a fractional byte. That is obviously non-sense, hence the assert below. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30113#discussion_r3008235888
