It appears that using branches is almost always better than using isel for P7 and P8, because of branch prediction — the decision outcome has to be almost completely random for isel to win. Also isel has a way higher latency for P8 than for A2, for instance. This patch disables the usage of isel for P7 and P8, and employs regular branches instead.
Had to change some regression tests to use A2 instead of P7 for checking that isel is generated. There are still 2 tests for which I have problems:
LLVM :: CodeGen/PowerPC/ifcvt.ll LLVM :: CodeGen/PowerPC/p8-isel-sched.ll
ifcvt.ll: using A2 does not generate isel (Hal: seems fishy, right?)
p8-isel-sched.ll: shall we remove this testcase?
Thanks,
Olivier
I don't want to do it this way. Either just remove HasISEL from the P7/P8 processor definitions, or add a ISELIsSlow (or whatever) to PPC.td, but we shouldn't hard code it like this here.