[llvm] r301037 - AArch64: add test for "fence singlethread"

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 21 13:56:37 PDT 2017


On Fri, Apr 21, 2017 at 1:36 PM, Tim Northover via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: tnorthover
> Date: Fri Apr 21 15:36:08 2017
> New Revision: 301037
>
> URL: http://llvm.org/viewvc/llvm-project?rev=301037&view=rev
> Log:
> AArch64: add test for "fence singlethread"
>

Out of curiosity, why is this supposed to lower to two consecutive
`dmb` instructions instead of one? (at least you're checking for the
absence of two `dmb`).
(I'm also not sure FileCheck can currently distinguish between the
absence of a single `dmb` or two, when they're consecutive).

> Forgot a git add yesterday.
>
> Added:
>     llvm/trunk/test/CodeGen/AArch64/fence-singlethread.ll
>
> Added: llvm/trunk/test/CodeGen/AArch64/fence-singlethread.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/fence-singlethread.ll?rev=301037&view=auto
> ==============================================================================
> --- llvm/trunk/test/CodeGen/AArch64/fence-singlethread.ll (added)
> +++ llvm/trunk/test/CodeGen/AArch64/fence-singlethread.ll Fri Apr 21 15:36:08 2017
> @@ -0,0 +1,21 @@
> +; RUN: llc -mtriple=aarch64-linux-gnu %s -o - | FileCheck %s --check-prefix=LINUX
> +; RUN: llc -mtriple=aarch64-apple-ios %s -o - | FileCheck %s --check-prefix=IOS
> +; RUN: llc -mtriple=aarch64-linux-gnueabihf %s -filetype=obj -o %t
> +; RUN: llvm-objdump -d %t | FileCheck %s --check-prefix=OBJ
> +
> +; OBJ-NOT: dmb
> +
> +define void @fence_singlethread() {
> +; LINUX-LABEL: fence_singlethread:
> +; LINUX-NOT: dmb
> +; LINUX: // COMPILER BARRIER
> +; LINUX-NOT: dmb
> +
> +; IOS-LABEL: fence_singlethread:
> +; IOS-NOT: dmb
> +; IOS: ; COMPILER BARRIER
> +; IOS-NOT: dmb
> +
> +  fence singlethread seq_cst
> +  ret void
> +}
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list