[PATCH] D41453: [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load in case of a loop

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 14:07:21 PST 2018


efriedma added inline comments.


================
Comment at: llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp:823
       if (const auto *Inst = dyn_cast<Instruction>(&Op))
         if (!DT->dominates(Inst->getParent(), HoistPt))
           return false;
----------------
This looks suspicious... specifically, it isn't clear what's supposed to happen when Inst->getParent() == HoistPt.  Granted, I'm not sure that can happen.


Repository:
  rL LLVM

https://reviews.llvm.org/D41453





More information about the llvm-commits mailing list