[PATCH] D12082: [X86] Do not lower scalar sdiv/udiv to a shifts + mul sequence when optimizing for minsize

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 01:08:44 PDT 2015


mkuper added a comment.

Thanks, Sanjay.

I was thinking about preserving the API for out-of-tree targets, but, I agree, it does look somewhat redundant. You're probably right, the state variables can go away.

Also, it doesn't look like there are any in-tree targets that actually have different settings for isPow2SDivCheap() and isIntDivCheap(). 
Looking at the history, isPow2SDivCheap() was introduced in 2005 for the benefit of PPC (with the comment "This will probably go away in the future."), and PPC was the only in-tree user until 2014, at which point Hal removed that use.

I'll update the patch to remove the Pow2SDiv interface entirely, and remove the state variable for IntDiv.


http://reviews.llvm.org/D12082





More information about the llvm-commits mailing list