[PATCH] D99926: [GVN] Introduce loop load PRE

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 22:00:54 PDT 2021


mkazantsev added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:1517
+  AvailableLoads[LoopBlock] = LoadPtr;
+  AvailableLoads[Preheader] = LoadPtr;
+
----------------
reames wrote:
> nikic wrote:
> > Where do we check that LoadPtr is loop invariant (and thus available in preheader)?
> Er good question, and good catch.  I remember this being here, but maybe it got lost in rebase.
> 
> Max, please add back the check, and a test which would have caught this.
Wow, I was sure it was there. Thanks for catching!


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

https://reviews.llvm.org/D99926



More information about the llvm-commits mailing list