From 7c393ccd9736428919f59443e8f5104906a0c8f6 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 2 Sep 2015 19:52:23 +0000 Subject: [PATCH] [RemoveDuplicatePHINodes] Start over after removing a PHI. This makes RemoveDuplicatePHINodes more effective and fixes an assertion failure. Triggering the assertions requires a DenseSet reallocation so this change only contains a constructive test. I'll explain the issue with a small example. In the following function there's a duplicate PHI, %4 and %5 are identical. When this is found the DenseSet in RemoveDuplicatePHINodes contains %2, %3 and %4. define void @F() { br label %1 ;