As it can be see in the changed test, while div is really costly,
we were speculating it. This does not seem correct.
Also, the old code would run for every single insturuction in BB,
instead of eagerly bailing out as soon as there are too many instructions.
This function still has a problem that PHINodeFoldingThreshold is
per-basic-block, while it should be for all the basic blocks.