[llvm-commits] PATCH: instcombine switch on select of constants to br

Frits van Bommel fvbommel at gmail.com
Tue Jan 11 05:02:28 PST 2011


On Tue, Jan 11, 2011 at 9:36 AM, Frits van Bommel <fvbommel at gmail.com> wrote:
> I still think turning the end of SimplifyIndirectBrOnSelect into a
> separate helper function is the easiest way to make sure you're not
> missing anything.

I just did this myself (r123234). Instead of rolling your own updating
code, just substitute

  return SimplifyTerminatorOnSelect(SI, Select->getCondition(),
TrueBB, FalseBB);

for it and it should Just Work.
This replaces everything in your last patch after the declaration of
FalseBB to the end of the if block.



More information about the llvm-commits mailing list