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

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


davide updated this revision to Diff 77126.
davide added a comment.

Updated testcase.


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
+
+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.77126.patch
Type: text/x-patch
Size: 793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161108/2d79f31d/attachment.bin>


More information about the llvm-commits mailing list