[PATCH] D93585: [AArch64] Enable out-of-line atomics by default.
Pavel Iliin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 19 12:45:41 PST 2020
ilinpv created this revision.
ilinpv added reviewers: t.p.northover, mstorsjo, jyknight, eli.friedman.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
ilinpv requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Generate outline atomics when compiling for a baseline armv8-a targets
to use LSE instructions if they are available (check at runtime).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D93585
Files:
llvm/lib/Target/AArch64/AArch64.td
llvm/test/CodeGen/AArch64/arm64_32-atomics.ll
llvm/test/CodeGen/AArch64/atomic-ops-not-barriers.ll
llvm/test/CodeGen/AArch64/atomic-ops.ll
llvm/test/CodeGen/AArch64/cmpxchg-O0.ll
llvm/test/CodeGen/AArch64/cmpxchg-idioms.ll
llvm/test/Transforms/AtomicExpand/AArch64/expand-atomicrmw-xchg-fp.ll
Index: llvm/test/Transforms/AtomicExpand/AArch64/expand-atomicrmw-xchg-fp.ll
===================================================================
--- llvm/test/Transforms/AtomicExpand/AArch64/expand-atomicrmw-xchg-fp.ll
+++ llvm/test/Transforms/AtomicExpand/AArch64/expand-atomicrmw-xchg-fp.ll
@@ -1,6 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -mtriple=aarch64-- -atomic-expand %s | FileCheck %s
-; RUN: opt -S -mtriple=aarch64-- -mattr=+outline-atomics -atomic-expand %s | FileCheck %s --check-prefix=OUTLINE-ATOMICS
+; RUN: opt -S -mtriple=aarch64-- -mattr=-outline-atomics -atomic-expand %s | FileCheck %s
+; RUN: opt -S -mtriple=aarch64-- -atomic-expand %s | FileCheck %s --check-prefix=OUTLINE-ATOMICS
define void @atomic_swap_f16(half* %ptr, half %val) nounwind {
; CHECK-LABEL: @atomic_swap_f16(
Index: llvm/test/CodeGen/AArch64/cmpxchg-idioms.ll
===================================================================
--- llvm/test/CodeGen/AArch64/cmpxchg-idioms.ll
+++ llvm/test/CodeGen/AArch64/cmpxchg-idioms.ll
@@ -1,5 +1,5 @@
-; RUN: llc -mtriple=aarch64-apple-ios7.0 -o - %s | FileCheck %s
-; RUN: llc -mtriple=aarch64-apple-ios7.0 -mattr=+outline-atomics -o - %s | FileCheck %s --check-prefix=OUTLINE-ATOMICS
+; RUN: llc -mtriple=aarch64-apple-ios7.0 -mattr=-outline-atomics -o - %s | FileCheck %s
+; RUN: llc -mtriple=aarch64-apple-ios7.0 -o - %s | FileCheck %s --check-prefix=OUTLINE-ATOMICS
define i32 @test_return(i32* %p, i32 %oldval, i32 %newval) {
; OUTLINE-ATOMICS: bl ___aarch64_cas4_acq_rel
Index: llvm/test/CodeGen/AArch64/cmpxchg-O0.ll
===================================================================
--- llvm/test/CodeGen/AArch64/cmpxchg-O0.ll
+++ llvm/test/CodeGen/AArch64/cmpxchg-O0.ll
@@ -1,5 +1,5 @@
-; RUN: llc -verify-machineinstrs -mtriple=aarch64-linux-gnu -O0 -fast-isel=0 -global-isel=false %s -o - | FileCheck -enable-var-scope %s
-; RUN: llc -verify-machineinstrs -mtriple=aarch64-linux-gnu -O0 -fast-isel=0 -global-isel=false -mattr=+outline-atomics %s -o - | FileCheck -enable-var-scope %s --check-prefix=OUTLINE-ATOMICS
+; RUN: llc -verify-machineinstrs -mtriple=aarch64-linux-gnu -O0 -fast-isel=0 -global-isel=false -mattr=-outline-atomics %s -o - | FileCheck -enable-var-scope %s
+; RUN: llc -verify-machineinstrs -mtriple=aarch64-linux-gnu -O0 -fast-isel=0 -global-isel=false %s -o - | FileCheck -enable-var-scope %s --check-prefix=OUTLINE-ATOMICS
define { i8, i1 } @test_cmpxchg_8(i8* %addr, i8 %desired, i8 %new) nounwind {
; OUTLINE-ATOMICS: bl __aarch64_cas1_acq_rel
Index: llvm/test/CodeGen/AArch64/atomic-ops.ll
===================================================================
--- llvm/test/CodeGen/AArch64/atomic-ops.ll
+++ llvm/test/CodeGen/AArch64/atomic-ops.ll
@@ -1,6 +1,6 @@
-; RUN: llc -mtriple=aarch64-none-linux-gnu -disable-post-ra -verify-machineinstrs < %s | FileCheck %s
-; RUN: llc -mtriple=aarch64-none-linux-gnu -disable-post-ra -verify-machineinstrs < %s | FileCheck %s --check-prefix=CHECK-REG
-; RUN: llc -mtriple=aarch64-none-linux-gnu -disable-post-ra -verify-machineinstrs -mattr=+outline-atomics < %s | FileCheck %s --check-prefix=OUTLINE_ATOMICS
+; RUN: llc -mtriple=aarch64-none-linux-gnu -disable-post-ra -verify-machineinstrs -mattr=-outline-atomics < %s | FileCheck %s
+; RUN: llc -mtriple=aarch64-none-linux-gnu -disable-post-ra -verify-machineinstrs -mattr=-outline-atomics < %s | FileCheck %s --check-prefix=CHECK-REG
+; RUN: llc -mtriple=aarch64-none-linux-gnu -disable-post-ra -verify-machineinstrs < %s | FileCheck %s --check-prefix=OUTLINE_ATOMICS
; Point of CHECK-REG is to make sure UNPREDICTABLE instructions aren't created
Index: llvm/test/CodeGen/AArch64/atomic-ops-not-barriers.ll
===================================================================
--- llvm/test/CodeGen/AArch64/atomic-ops-not-barriers.ll
+++ llvm/test/CodeGen/AArch64/atomic-ops-not-barriers.ll
@@ -1,5 +1,5 @@
-; RUN: llc -mtriple=aarch64-none-linux-gnu -verify-machineinstrs < %s | FileCheck %s
-; RUN: llc -mtriple=aarch64-none-linux-gnu -verify-machineinstrs -mattr=+outline-atomics < %s | FileCheck %s --check-prefix=OUTLINE-ATOMICS
+; RUN: llc -mtriple=aarch64-none-linux-gnu -verify-machineinstrs -mattr=-outline-atomics < %s | FileCheck %s
+; RUN: llc -mtriple=aarch64-none-linux-gnu -verify-machineinstrs < %s | FileCheck %s --check-prefix=OUTLINE-ATOMICS
define i32 @foo(i32* %var, i1 %cond) {
; OUTLINE-ATOMICS: bl __aarch64_ldadd4_relax
Index: llvm/test/CodeGen/AArch64/arm64_32-atomics.ll
===================================================================
--- llvm/test/CodeGen/AArch64/arm64_32-atomics.ll
+++ llvm/test/CodeGen/AArch64/arm64_32-atomics.ll
@@ -1,5 +1,5 @@
-; RUN: llc -mtriple=arm64_32-apple-ios7.0 -o - %s | FileCheck %s
-; RUN: llc -mtriple=arm64_32-apple-ios7.0 -mattr=+outline-atomics -o - %s | FileCheck %s -check-prefix=OUTLINE-ATOMICS
+; RUN: llc -mtriple=arm64_32-apple-ios7.0 -mattr=-outline-atomics -o - %s | FileCheck %s
+; RUN: llc -mtriple=arm64_32-apple-ios7.0 -o - %s | FileCheck %s -check-prefix=OUTLINE-ATOMICS
define i8 @test_load_8(i8* %addr) {
; CHECK-LABAL: test_load_8:
Index: llvm/lib/Target/AArch64/AArch64.td
===================================================================
--- llvm/lib/Target/AArch64/AArch64.td
+++ llvm/lib/Target/AArch64/AArch64.td
@@ -1059,6 +1059,7 @@
FeatureFPARMv8,
FeatureFuseAES,
FeatureNEON,
+ FeatureOutlineAtomics,
FeaturePerfMon,
FeaturePostRAScheduler,
// ETE and TRBE are future architecture extensions. We temporarily enable them
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93585.312946.patch
Type: text/x-patch
Size: 5694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201219/a3e40f53/attachment.bin>
More information about the llvm-commits
mailing list