[PATCH] D17289: [X86] Fix False Data Dependency in popcnt
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 16 22:38:14 PST 2016
mkuper added a subscriber: mkuper.
================
Comment at: ../llvm/lib/Target/X86/X86PopcntOpt.cpp:68
@@ +67,3 @@
+ const X86Subtarget &ST = MF.getSubtarget<X86Subtarget>();
+ if (!ST.hasAVX() || !ST.hasPOPCNT())
+ return false;
----------------
majnemer wrote:
> We don't do this dependency breaking if we `hasPOPCNT` but not `hasAVX` ? I'd think we'd do this if `hasPOPCNT` is true regardless of what `hasAVX` is because we might want to run our program on machines older and newer than Sandy Bridge.
This isn't like the other false dependency fixes we have, in the sense that this not an arch issue in the instruction definition, but rather a micro-arch bug. It doesn't exist in anything older than <arch-A>, and is supposed to be fixed in <arch-B> and above.
I think <arch-B> is Skylake, although I'm not entirely sure. Don't know what <arch-A> is. In any case, the point is - we do want a condition that's more complicated than hasPOPCNT(), I just don't know what it is.
Repository:
rL LLVM
http://reviews.llvm.org/D17289
More information about the llvm-commits
mailing list