[llvm] [AArch64] Enable UseFixedOverScalableIfEqualCost for more Cortex-x cpus. (PR #122807)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 04:04:36 PST 2025
================
@@ -31,30 +38,4 @@ for.body:
br i1 %exitcond.not, label %for.cond.cleanup, label %for.body
}
-define void @GenericCPU() #1 {
-; CHECK-LABEL: define void @GenericCPU(
-; CHECK: store <vscale x 4 x float>
-;
-entry:
- br label %for.body
-
-for.cond.cleanup:
- ret void
-
-for.body:
- %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
- %arrayidx = getelementptr inbounds [32000 x float], ptr @a, i64 0, i64 %indvars.iv
- %0 = load float, ptr %arrayidx, align 4
- %arrayidx2 = getelementptr inbounds [32000 x float], ptr @b, i64 0, i64 %indvars.iv
- %1 = load float, ptr %arrayidx2, align 4
- %add = fadd fast float %1, %0
- %2 = add nuw nsw i64 %indvars.iv, 16000
- %arrayidx5 = getelementptr inbounds [32000 x float], ptr @a, i64 0, i64 %2
- store float %add, ptr %arrayidx5, align 4
- %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
- %exitcond.not = icmp eq i64 %indvars.iv.next, 16000
- br i1 %exitcond.not, label %for.cond.cleanup, label %for.body
-}
-
-attributes #0 = { vscale_range(1,16) "target-cpu"="neoverse-v2" "target-features"="+sve,+sve2,+v9a" }
-attributes #1 = { vscale_range(1,16) "target-cpu"="generic" "target-features"="+sve,+v9a" }
+attributes #0 = { vscale_range(1,16) "target-features"="+sve,+sve2,+v9a" }
----------------
david-arm wrote:
This looks a bit odd given that we're now setting the CPU on the RUN line which has the architectures in them already. It looks like the only reason you're doing this is for the generic CPU run line, which you could just do with `-mcpu=generic -mattr=+sve,+sve2,+armv9-a" I think? Doing it this way then means we're actually testing the CPU, which I think is what we care about.
https://github.com/llvm/llvm-project/pull/122807
More information about the llvm-commits
mailing list