[PATCH] D29092: PR31729: [GVNHoist] Don't hoist unsafe scalars at -Oz

David Majnemer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 11:26:33 PST 2017


majnemer added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/GVNHoist.cpp:510
     // where they are partially needed.
-    if (OptForMinSize)
+    if (OptForMinSize && isSafeToSpeculativelyExecute(I))
       return true;
----------------
Shouldn't we unconditionally do `isSafeToSpeculativelyExecute`?


================
Comment at: llvm/test/Transforms/GVNHoist/hoist-unsafe-pr31729.ll:1
+; RUN: opt -tti -tbaa -scoped-noalias -assumption-cache-tracker -targetlibinfo -verify -simplifycfg -domtree -sroa -early-cse -basicaa -aa -memdep -memoryssa -gvn-hoist -S < %s | FileCheck %s
+
----------------
Er, please don't run all these passes. Just run gvn-hoist.


https://reviews.llvm.org/D29092





More information about the llvm-commits mailing list