[PATCH] D26381: LibcallsShrinkWrap doesn't preserve the CFG

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 17:33:25 PST 2016


davide created this revision.
davide added reviewers: xur, eli.friedman.
davide added a subscriber: llvm-commits.

This is the dominator before/after

Computed:
=========

Inorder Dominator Tree:

  [1] %0 {0,1}

Actual:
=======

Inorder Dominator Tree:

  [1] %0 {0,5}
    [2] %cdce.call {1,2}
    [2] %cdce.end {3,4}


https://reviews.llvm.org/D26381

Files:
  lib/Transforms/Utils/LibCallsShrinkWrap.cpp
  test/Transforms/InstCombine/shrinkwrap-nopreserve.ll


Index: test/Transforms/InstCombine/shrinkwrap-nopreserve.ll
===================================================================
--- /dev/null
+++ test/Transforms/InstCombine/shrinkwrap-nopreserve.ll
@@ -0,0 +1,8 @@
+; RUN: opt -instcombine -libcalls-shrinkwrap -gvn | FileCheck %s
+
+define void @TEST__MAIN() {
+  %_tmp31 = call float @acosf(float 2.000000e+00)
+  ret void
+}
+
+declare float @acosf(float)
Index: lib/Transforms/Utils/LibCallsShrinkWrap.cpp
===================================================================
--- lib/Transforms/Utils/LibCallsShrinkWrap.cpp
+++ lib/Transforms/Utils/LibCallsShrinkWrap.cpp
@@ -529,7 +529,6 @@
 }

 void LibCallsShrinkWrapLegacyPass::getAnalysisUsage(AnalysisUsage &AU) const {
-  AU.setPreservesCFG();
   AU.addRequired<TargetLibraryInfoWrapperPass>();
 }



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26381.77125.patch
Type: text/x-patch
Size: 808 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161108/2cd91ea3/attachment.bin>


More information about the llvm-commits mailing list