[PATCH] D11239: [LoopUnswitch] Add an else clause to IsTrivialUnswitchCondition() when checking HeaderTerm instruction type

Chen Li meloli87 at gmail.com
Wed Jul 15 14:34:16 PDT 2015


chenli updated this revision to Diff 29832.
chenli added a comment.

Revise wrt Philip's comments.


http://reviews.llvm.org/D11239

Files:
  lib/Transforms/Scalar/LoopUnswitch.cpp

Index: lib/Transforms/Scalar/LoopUnswitch.cpp
===================================================================
--- lib/Transforms/Scalar/LoopUnswitch.cpp
+++ lib/Transforms/Scalar/LoopUnswitch.cpp
@@ -641,7 +641,8 @@
         break;
       }
     }
-  }
+  } else
+	  return false;
 
   // If we didn't find a single unique LoopExit block, or if the loop exit block
   // contains phi nodes, this isn't trivial.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11239.29832.patch
Type: text/x-patch
Size: 415 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150715/82aa3ff5/attachment.bin>


More information about the llvm-commits mailing list