From ebe69fe11e48d322045d5949c83283927a0d790b Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Mon, 23 Mar 2015 12:10:34 -0700 Subject: Update aosp/master LLVM for rebase to r230699. Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9 --- test/Transforms/SLPVectorizer/X86/atomics.ll | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 test/Transforms/SLPVectorizer/X86/atomics.ll (limited to 'test/Transforms/SLPVectorizer/X86/atomics.ll') diff --git a/test/Transforms/SLPVectorizer/X86/atomics.ll b/test/Transforms/SLPVectorizer/X86/atomics.ll new file mode 100644 index 0000000..6cb322e --- /dev/null +++ b/test/Transforms/SLPVectorizer/X86/atomics.ll @@ -0,0 +1,31 @@ +; RUN: opt < %s -basicaa -slp-vectorizer -S |FileCheck %s +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" + +@x = global [4 x i32] zeroinitializer, align 16 +@a = global [4 x i32] zeroinitializer, align 16 + +; The SLPVectorizer should not vectorize atomic stores and it should not +; schedule regular stores around atomic stores. + +; CHECK-LABEL: test +; CHECK: store i32 +; CHECK: store atomic i32 +; CHECK: store i32 +; CHECK: store atomic i32 +; CHECK: store i32 +; CHECK: store atomic i32 +; CHECK: store i32 +; CHECK: store atomic i32 +define void @test() { +entry: + store i32 0, i32* getelementptr inbounds ([4 x i32]* @a, i64 0, i64 0), align 16 + store atomic i32 0, i32* getelementptr inbounds ([4 x i32]* @x, i64 0, i64 0) release, align 16 + store i32 0, i32* getelementptr inbounds ([4 x i32]* @a, i64 0, i64 1), align 4 + store atomic i32 1, i32* getelementptr inbounds ([4 x i32]* @x, i64 0, i64 1) release, align 4 + store i32 0, i32* getelementptr inbounds ([4 x i32]* @a, i64 0, i64 2), align 8 + store atomic i32 2, i32* getelementptr inbounds ([4 x i32]* @x, i64 0, i64 2) release, align 8 + store i32 0, i32* getelementptr inbounds ([4 x i32]* @a, i64 0, i64 3), align 4 + store atomic i32 3, i32* getelementptr inbounds ([4 x i32]* @x, i64 0, i64 3) release, align 4 + ret void +} + -- cgit v1.1