[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 29 16:38:17 PST 2017


craig.topper added a comment.

What are you planning to do with 16-bit instructions? Like I said XOR16 is insufficient to break a dependency.



================
Comment at: lib/Target/X86/X86InstrInfo.cpp:7972
 ///
-static bool hasPartialRegUpdate(unsigned Opcode) {
+static bool hasPartialRegUpdate(unsigned Opcode, X86Subtarget &Subtarget) {
   switch (Opcode) {
----------------
Pass subtarget by const reference.


================
Comment at: test/CodeGen/X86/bug3389.ll:1
+; RUN: llc < %s -mtriple=i386-unknown-linux-gnu -mcpu=haswell -mattr=+bmi,+lzcnt | FileCheck %s --check-prefix=HSW
+; RUN: llc < %s -mtriple=i386-unknown-linux-gnu -mcpu=skylake -mattr=+bmi,+lzcnt | FileCheck %s --check-prefix=SKL
----------------
The file name for this test case is missing a digit and we usually use "pr" instead of "bug". Though in this case I think you should name it something like more meaningful like bitcnt-false-dep.ll. We usually only name test cases with bug numbers when its a reduced test case for a crash or something where its harder to find a meaningful name.


================
Comment at: test/CodeGen/X86/bug3389.ll:4
+
+declare i32 @llvm.ctpop.i32(i32)
+declare i32 @llvm.cttz.i32(i32, i1)
----------------
Test 64-bit as well?


https://reviews.llvm.org/D40334





More information about the llvm-commits mailing list