I took the minimal repro from [1] and took a look at the code generated between clang 17 -O0 [2] and clang 17 -O3 [3]. I saw that -O3 (and actually -O1 and -O2) generated the following code for:
Reading vpxorq's pseudocode [4], it seems that it zeroes out the leading bits:
DEST[MAXVL-1:VL] := 0
Same thing for clang 17 -O0, if we are using _mm512_zextsi128_si512 instead [5] - vpxor and vbroadcast128 are used which seem to also zero out leading bits.
So, -O1..-O3 were indeed emitting instructions that zero-extend and, thus