[PATCH] D14788: Fix bug 24715

Wenxiang Qiu via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 14:17:07 PST 2015


vincentqiuuu created this revision.
vincentqiuuu added a reviewer: joker.eph.
vincentqiuuu added a subscriber: llvm-commits.

Fix for https://llvm.org/bugs/show_bug.cgi?id=24715
Boolean flag Changed in GVN::performPRE(Function &F) is not correctly updated.

http://reviews.llvm.org/D14788

Files:
  lib/Transforms/Scalar/GVN.cpp

Index: lib/Transforms/Scalar/GVN.cpp
===================================================================
--- lib/Transforms/Scalar/GVN.cpp
+++ lib/Transforms/Scalar/GVN.cpp
@@ -2709,7 +2709,7 @@
                               BE = CurrentBlock->end();
          BI != BE;) {
       Instruction *CurInst = &*BI++;
-      Changed = performScalarPRE(CurInst);
+      Changed |= performScalarPRE(CurInst);
     }
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14788.40559.patch
Type: text/x-patch
Size: 416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151118/dd08f89f/attachment.bin>


More information about the llvm-commits mailing list