[llvm] [DAGCombiner] Fix exact power-of-two signed division for large integers (PR #177340)
Steffen Larsen via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 25 21:46:02 PST 2026
================
@@ -4373,6 +4373,115 @@ define i128 @v_sdiv_i128_v_pow2k(i128 %lhs) {
ret i128 %div
}
+define i128 @v_sdiv_exact_i128_v_pow2k(i128 %lhs) {
----------------
steffenlarsen wrote:
Do you mean reordering these transformations to they don't have the current (slightly awkward) inter-dependence? If so, I like that idea. It would also let us avoid having to propagate the max supported division bitwidth (as discussed in https://github.com/llvm/llvm-project/pull/177340#discussion_r2725592808). Any chance you remember where this was discussed?
https://github.com/llvm/llvm-project/pull/177340
More information about the llvm-commits
mailing list