[PATCH] D73804: [GVN] Add GVNOption to control load-pre more fine-grained.

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 14:29:01 PST 2020


fedor.sergeev added inline comments.


================
Comment at: llvm/test/Transforms/GVN/PRE/pre-load-in-loop.ll:1
+; RUN: opt < %s -basicaa -gvn -enable-load-in-loop-pre=false -S | FileCheck %s
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
----------------
hgreving wrote:
> fedor.sergeev wrote:
> > It makes sense to add both positive - checking that load-pre is performed when enabled,  and negative - checking that load-pre does not happen when disabled
> > (say, to catch a case when load-pre is not performed due to some bug or change in other defaults).
> The positive case is checked in load-pre.ll. Does this suffice? WDYT?
Shouldnt then -enable-load-in-loop-pre=true be added explicitly to load-pre.ll, to avoid its behavior being dependant on default setting?


================
Comment at: llvm/test/Transforms/GVN/PRE/pre-load-in-loop.ll:37
+
+; Should only be one load in the loop.
+; CHECK: bb:
----------------
Correct the comment to match behavior.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D73804





More information about the llvm-commits mailing list