[PATCH] D79971: [X86] Rewrite how X86PartialReduction find candidates to consider optimizing.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 29 12:02:16 PDT 2020


craig.topper marked an inline comment as done.
craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/X86PartialReduction.cpp:123
     if (auto *BO = dyn_cast<BinaryOperator>(Op)) {
-      if (BO->getParent() == BB &&
+      if (BO->getParent() == BO->getParent() &&
           IsFreeTruncation(BO->getOperand(0)) &&
----------------
spatel wrote:
> Either we still need a parent block check here or this always true comparison should be removed.
There's a shadowing issue here. There are two BOs and I was trying to compare their parents. But obviously only one is in scope.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79971/new/

https://reviews.llvm.org/D79971





More information about the llvm-commits mailing list