From 60d410d7bb2eb11f36a004237e5948ffc5aff5a6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 14 Dec 2010 08:01:53 +0000 Subject: fix two significant issues with FoldTwoEntryPHINode: first, it can kick in on blocks whose conditions have been folded to a constant, even though one of the edges will be trivially folded. second, it doesn't clean up the "if diamond" that it just eliminated away. This is a problem because other simplifycfg xforms kick in depending on the order of block visitation, causing pointless work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121762 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/SimplifyCFG/PhiBlockMerge.ll | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/Transforms/SimplifyCFG/PhiBlockMerge.ll b/test/Transforms/SimplifyCFG/PhiBlockMerge.ll index a648efd174..c28d0bac37 100644 --- a/test/Transforms/SimplifyCFG/PhiBlockMerge.ll +++ b/test/Transforms/SimplifyCFG/PhiBlockMerge.ll @@ -1,12 +1,14 @@ ; Test merging of blocks that only have PHI nodes in them ; -; RUN: opt < %s -simplifycfg -S | not grep N: +; RUN: opt < %s -simplifycfg -S | FileCheck %s ; define i32 @test(i1 %a, i1 %b) { -;