[PATCH] D28196: [X86] Tune bypassing of slow division for Intel CPUs

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 1 11:20:29 PST 2017


spatel added a reviewer: RKSimon.
spatel added a comment.

cc'ing Simon for AMD knowledge. Based on Agner's tables, it seems like some/most of the AMD uarch's do this in hardware? Ie, the *minimum* reported latency is often the same for 32-bit and 64-bit divides even thought the maximum may be substantially longer for 64-bit. This suggests that the divider unit has some shortcut paths when the operands are determined to fit into a smaller width.

That said, it probably shouldn't hold this patch up because we can always add the feature flag to more CPUs as needed.


https://reviews.llvm.org/D28196





More information about the llvm-commits mailing list