[LLVMdev] Branch simplification

Eric Zimmerman ezimmerm at uiuc.edu
Wed Mar 30 10:57:25 CST 2005


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



More information about the LLVMdev mailing list