[PATCH] D40334: [X86] Break false dependencies for POPCNT, LZCNT, TZCNT
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 22 14:21:53 PST 2017
craig.topper added inline comments.
================
Comment at: lib/Target/X86/X86InstrInfo.cpp:8244
+ } else if (X86::GR16RegClass.contains(Reg)) {
+ BuildMI(*MI.getParent(), MI, MI.getDebugLoc(), get(X86::XOR16rr), Reg)
+ .addReg(Reg, RegState::Undef)
----------------
craig.topper wrote:
> XOR16rr is not a dependency breaking instruction. It still reads bits 31:16 of the register and passes them through.
It doesn't look like gcc breaks the dependency on 16-bit versions. There is a real dependency there due to the need to preserve bits 31:16. But I would think the zeroing would still break the dependency on the previous iteration of the loop since the zeroing xor doesn't require execution resources.
Repository:
rL LLVM
https://reviews.llvm.org/D40334
More information about the llvm-commits
mailing list