The pattern that sets a mask register to all-ones
KXNOR %kn, %kn, %kn
is replaced with
KXNOR %k0, %k0, %kn - KNL optimization.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
../lib/Target/X86/X86InstrInfo.cpp | ||
---|---|---|
5287 ↗ | (On Diff #43510) | It would be a good idea to explain why it is preferable to read %k0 here, e.g. "KNL does not recognize dependency-breaking idioms for mask registers, so kxnor %k1, %k1, %k2 has a RAW dependence on %k1. Using %k0 as the undef input register is a performance heuristic based on the assumption that %k0 is used less frequently than the other mask registers, since it is not usable as a write mask. FIXME: A more advanced approach would be to choose the best input mask register based on context." |
5373 ↗ | (On Diff #43510) | These SET0 opcodes should also call Expand2AddrKreg with %k0, as KNL doesn't recognize kxor as an idiom either. |