[PATCH] D22652: GVH-hoist: only clone GEPs (PR28606)
Sebastian Pop via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 21 15:53:47 PDT 2016
sebpop added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/GVNHoist.cpp:588
@@ +587,3 @@
+ // Check that the stored value is available.
+ if (Val && !allOperandsAvailable(Val, HoistPt))
+ return false;
----------------
eli.friedman wrote:
> I think you want "Val && !DT->dominates(Val->getParent(), HoistPt)", or something like that? You care whether the value itself is available, not its operands.
This is correct. We do not need to check all operands of the Val instruction.
https://reviews.llvm.org/D22652
More information about the llvm-commits
mailing list