[llvm] [LV] Don't predicate divs with invariant divisor when folding tail (PR #98904)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 24 14:31:21 PDT 2024
================
@@ -254,117 +227,9 @@ define void @udiv_urem_feeding_gep(i64 %x, ptr %dst, i64 %N) {
; CHECK-NEXT: [[ENTRY:.*]]:
; CHECK-NEXT: [[MUL_1_I:%.*]] = mul i64 [[X]], [[X]]
; CHECK-NEXT: [[MUL_2_I:%.*]] = mul i64 [[MUL_1_I]], [[X]]
-; CHECK-NEXT: [[TMP0:%.*]] = add i64 [[N]], 1
-; CHECK-NEXT: br i1 false, label %[[SCALAR_PH:.*]], label %[[VECTOR_SCEVCHECK:.*]]
----------------
fhahn wrote:
It looks this is down to a large difference in the costs of `udiv <4 x i64>` vs 4 * `udiv i64` + scalarization overhead estimate in LV (80 vs 7!). This looks like an X86 cost-model issue independent of the patch
https://github.com/llvm/llvm-project/pull/98904
More information about the llvm-commits
mailing list