[llvm-commits] [llvm] r141177 - in /llvm/trunk: lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/condprop.ll test/Transforms/GVN/phi-translate.ll

Duncan Sands baldrick at free.fr
Tue Oct 11 02:11:56 PDT 2011


Hi David,

> It's really close, but not quite. Given the attached llvm assembly, the function
> call is correctly devirtualized (but the branch is left in). But if you comment
> out the first ret void (in the vtable.ne <http://vtable.ne> block) & comment in
> the unreachable instruction then the branch is removed by the simplifycfg pass &
> no interesting information about the condition is preserved for use by the GVN
> pass so the call is still indirect/virtual.

I thought there was a plan that a branch to a block containing only unreachable
shouldn't be removed by the IR optimizers (instead codegen would remove it).  I
even though Nick implemented this.  But apparently not...

Ciao, Duncan.



More information about the llvm-commits mailing list