[llvm] [AArch64] Disable loop alignment for Windows targets (PR #67894)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 05:56:24 PDT 2023


================
@@ -0,0 +1,21 @@
+; RUN: llc < %s -mtriple=aarch64-windows | FileCheck %s --check-prefix=WINDOWS
+; RUN: llc < %s -mtriple=aarch64-linux | FileCheck %s --check-prefix=LINUX
+
+define dso_local void @b() #0 {
+entry:
+  br label %for.cond
+
+for.cond:
+  tail call void @a()
+  br label %for.cond
+}
+
+declare dso_local void @a(...)
+
+attributes #0 = { noreturn nounwind uwtable "tune-cpu"="cortex-a53" }
----------------
mstorsjo wrote:

Kinda, although it's probably testable differently too. The issue I'm fixing, #66912, is that `-mtune=cortex-a53` did get added loop alignment in 7d676714fbf2dd4bcdd15bd63d6b43b467ceccb1 - which is what broke things. This test uses that tune in order to trigger the issue. I guess it could be tested a bit more explicitly with a direct option to `llc` as well; but if we'd pass an option requesting an explicit loop alignment (if there's such a thing?), things would break - the point here is that we want to disable the implicit loop alignment for these targets.

https://github.com/llvm/llvm-project/pull/67894


More information about the llvm-commits mailing list