[PATCH] D29874: [X86] Generate VZEROUPPER for Skylake-avx512

Amjad Aboud via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 23:02:40 PST 2017


aaboud marked an inline comment as done.
aaboud added a comment.

Thanks Craig for the comments, see answers inline.



================
Comment at: lib/Target/X86/X86VZeroUpper.cpp:222
+    // explicitly specified.
+    if (IsCall && !callHasRegMask(MI))
       continue;
----------------
craig.topper wrote:
> Why did this change to not check specific register clobbers?
We can get to this point only if ClobberAllTmmReg is true, in such case ClobberAnyYmmReg will also be true, and we will fall-through exactly as we do with this implementation.
This was a kind of did code.

Also, can you explain what is unique with "cannot clobber any" and "cannot clobber all" regarding these lines?


================
Comment at: lib/Target/X86/X86VZeroUpper.cpp:225
 
     // The VZEROUPPER instruction resets the upper 128 bits of all AVX
     // registers. In addition, the processor changes back to Clean state, after
----------------
craig.topper wrote:
> This comments is stale with ZMM. It's not upper 128 bits.
Actually, this is what it does. even for the ZMM registers it reset the upper 128bits of the YMM corresponding register. Is not it?

The important behavior is the next sentence, which emphasize that processor changes back to Clean state.


https://reviews.llvm.org/D29874





More information about the llvm-commits mailing list