[PATCH] [SimplifyCFG] Teach when it is profitable to speculate calls to @llvm.cttz/ctlz.

Quentin Colombet qcolombet at apple.com
Tue Dec 16 11:56:19 PST 2014


Hi Andrea,

> On X86 (not x86-64) targets with no LZCNT/TZCNT and no CMOV instructions, the backend would futher expand the conditional moves introducing machine basic blocks. Basically it would revert this optimization re-introducing the if-else structure.


Have you checked that the output assembly is the same (or equivalent) performance-wise on such targets?

> My only questions are: is SimplifyCFG the correct place where to put this logic? If not, then where do you think I should put it?


Assuming the answer of my previous question is yes, I think it makes sense to have that in SimplifyCFG.

Thanks,
-Quentin


http://reviews.llvm.org/D6679

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list