[PATCH] D37460: [GVN] Prevent LoadPRE from hoisting across instructions that don't pass control flow to successors

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 11:25:12 PDT 2017


efriedma added inline comments.


================
Comment at: test/Transforms/GVN/PRE/local-pre.ll:48
+  call void @may_exit() nounwind
+  %b = sdiv i32 %p, %q
+  ret i32 %b
----------------
GVN got smarter, so this isn't actually testing what it's supposed to test anymore.  Maybe try replacing "icmp eq i32 %p, %q" with "icmp eq i32 %p, %r", where "%r" is a parameter.  And I guess pass %a to may_exit(), so it won't get moved if we come up with some new form of sinking in the future.


https://reviews.llvm.org/D37460





More information about the llvm-commits mailing list