Branch simplification

Hi,

I have a CFG built by LLVM with blocks that look like this:

myBlock: ; preds = %predA, %predB
   %cond = phi bool [ false, %predA ], [ %otherCond, %predB ]
   br bool %cond, %succA, %succB

Is there a pass or sequence of passes that will see the constant
'false' in the PHI instruction and change the target of %predA to
point directly to %succB? I tried -simplifycfg but it didn't seem to
help.

Thanks,
Eric

Currently there isn't. -simplifycfg does some of this sort of thing, but isn't smart enough to see through PHI nodes yet.

-Chris