[PATCH] [AArch64] Lower sdiv x, pow2 using add + select + shift.

Chad Rosier mcrosier at codeaurora.org
Thu Jul 10 10:00:59 PDT 2014


Tim,
Great, it sounds like this is a win in all cases.

>As for the code, that's a fairly nasty function to spot the idiom. It would be better if we could avoid forming the original pattern in the first place. What if we move the call to >BuildSDIV above the pow2 block in DAGCombiner::visitSDIV and override it on AArch64 to handle this specific case?

I can't agree more!  I'll post a revised patch when I have a moment to put it together.

Thanks to you both, James and Tim, for verifying the performance impact.

  Chad






More information about the llvm-commits mailing list