From c6a4f5e819217e1e12c458aed8e7b122e23a3a58 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Mon, 21 Jul 2014 00:45:20 -0700 Subject: Update LLVM for rebase to r212749. Includes a cherry-pick of: r212948 - fixes a small issue with atomic calls Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18 --- test/Assembler/addrspacecast-alias.ll | 4 ++-- test/Assembler/alias-addrspace.ll | 6 ----- test/Assembler/alias-to-alias.ll | 5 ---- test/Assembler/alias-to-alias2.ll | 7 ------ test/Assembler/alias-type.ll | 6 ----- test/Assembler/atomic.ll | 2 ++ test/Assembler/invalid-comdat.ll | 4 ++++ test/Assembler/invalid-comdat2.ll | 5 ++++ test/Assembler/upgrade-loop-metadata.ll | 41 +++++++++++++++++++++++++++++++++ 9 files changed, 54 insertions(+), 26 deletions(-) delete mode 100644 test/Assembler/alias-addrspace.ll delete mode 100644 test/Assembler/alias-to-alias.ll delete mode 100644 test/Assembler/alias-to-alias2.ll delete mode 100644 test/Assembler/alias-type.ll create mode 100644 test/Assembler/invalid-comdat.ll create mode 100644 test/Assembler/invalid-comdat2.ll create mode 100644 test/Assembler/upgrade-loop-metadata.ll (limited to 'test/Assembler') diff --git a/test/Assembler/addrspacecast-alias.ll b/test/Assembler/addrspacecast-alias.ll index 052a141..d751659 100644 --- a/test/Assembler/addrspacecast-alias.ll +++ b/test/Assembler/addrspacecast-alias.ll @@ -3,5 +3,5 @@ ; Test that global aliases are allowed to be constant addrspacecast @i = internal addrspace(1) global i8 42 -@ia = alias internal addrspace(2) i8 addrspace(3)*, i8 addrspace(1)* @i -; CHECK: @ia = alias internal addrspace(2) i8 addrspace(3)*, i8 addrspace(1)* @i +@ia = alias internal addrspacecast (i8 addrspace(1)* @i to i8 addrspace(2)* addrspace(3)*) +; CHECK: @ia = alias internal addrspacecast (i8 addrspace(2)* addrspace(1)* bitcast (i8 addrspace(1)* @i to i8 addrspace(2)* addrspace(1)*) to i8 addrspace(2)* addrspace(3)*) diff --git a/test/Assembler/alias-addrspace.ll b/test/Assembler/alias-addrspace.ll deleted file mode 100644 index 6d378e4..0000000 --- a/test/Assembler/alias-addrspace.ll +++ /dev/null @@ -1,6 +0,0 @@ -; RUN: not llvm-as %s 2>&1 | FileCheck %s - -@foo = global i32 42 -@bar = alias internal addrspace(1) i32* @foo - -CHECK: error: A type is required if addrspace is given diff --git a/test/Assembler/alias-to-alias.ll b/test/Assembler/alias-to-alias.ll deleted file mode 100644 index 1ea99bb..0000000 --- a/test/Assembler/alias-to-alias.ll +++ /dev/null @@ -1,5 +0,0 @@ -; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s -; CHECK: Alias must point to function or variable - -@b1 = alias i32* @c1 -@c1 = alias i32* @b1 diff --git a/test/Assembler/alias-to-alias2.ll b/test/Assembler/alias-to-alias2.ll deleted file mode 100644 index a8a0196..0000000 --- a/test/Assembler/alias-to-alias2.ll +++ /dev/null @@ -1,7 +0,0 @@ -; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s -; CHECK: error: Alias is pointed by alias b1 - -@g = global i32 42 - -@b1 = alias i32* @c1 -@c1 = alias i32* @g diff --git a/test/Assembler/alias-type.ll b/test/Assembler/alias-type.ll deleted file mode 100644 index ead3e95..0000000 --- a/test/Assembler/alias-type.ll +++ /dev/null @@ -1,6 +0,0 @@ -; RUN: not llvm-as %s 2>&1 | FileCheck %s - -@foo = global i32 42 -@bar = alias i32 @foo - -CHECK: error: An alias must have pointer type diff --git a/test/Assembler/atomic.ll b/test/Assembler/atomic.ll index a2ae58e..d7ccd99 100644 --- a/test/Assembler/atomic.ll +++ b/test/Assembler/atomic.ll @@ -16,6 +16,8 @@ define void @f(i32* %x) { cmpxchg volatile i32* %x, i32 0, i32 1 acq_rel acquire ; CHECK: cmpxchg i32* %x, i32 42, i32 0 acq_rel monotonic cmpxchg i32* %x, i32 42, i32 0 acq_rel monotonic + ; CHECK: cmpxchg weak i32* %x, i32 13, i32 0 seq_cst monotonic + cmpxchg weak i32* %x, i32 13, i32 0 seq_cst monotonic ; CHECK: atomicrmw add i32* %x, i32 10 seq_cst atomicrmw add i32* %x, i32 10 seq_cst ; CHECK: atomicrmw volatile xchg i32* %x, i32 10 monotonic diff --git a/test/Assembler/invalid-comdat.ll b/test/Assembler/invalid-comdat.ll new file mode 100644 index 0000000..987e1e1 --- /dev/null +++ b/test/Assembler/invalid-comdat.ll @@ -0,0 +1,4 @@ +; RUN: not llvm-as < %s 2>&1 | FileCheck %s + +@v = global i32 0, comdat $v +; CHECK: use of undefined comdat '$v' diff --git a/test/Assembler/invalid-comdat2.ll b/test/Assembler/invalid-comdat2.ll new file mode 100644 index 0000000..ed656ef --- /dev/null +++ b/test/Assembler/invalid-comdat2.ll @@ -0,0 +1,5 @@ +; RUN: not llvm-as < %s 2>&1 | FileCheck %s + +$v = comdat any +$v = comdat any +; CHECK: redefinition of comdat '$v' diff --git a/test/Assembler/upgrade-loop-metadata.ll b/test/Assembler/upgrade-loop-metadata.ll new file mode 100644 index 0000000..f664bdf --- /dev/null +++ b/test/Assembler/upgrade-loop-metadata.ll @@ -0,0 +1,41 @@ +; Test to make sure loop vectorizer metadata is automatically upgraded. +; +; Run using opt as well to ensure that the metadata is upgraded when parsing +; assembly. +; +; RUN: llvm-as < %s | llvm-dis | FileCheck %s +; RUN: opt -S < %s | FileCheck %s + +define void @_Z28loop_with_vectorize_metadatav() { +entry: + %i = alloca i32, align 4 + store i32 0, i32* %i, align 4 + br label %for.cond + +for.cond: ; preds = %for.inc, %entry + %0 = load i32* %i, align 4 + %cmp = icmp slt i32 %0, 16 + br i1 %cmp, label %for.body, label %for.end, !llvm.loop !1 + +for.body: ; preds = %for.cond + br label %for.inc + +for.inc: ; preds = %for.body + %1 = load i32* %i, align 4 + %inc = add nsw i32 %1, 1 + store i32 %inc, i32* %i, align 4 + br label %for.cond + +for.end: ; preds = %for.cond + ret void +} + +; CHECK: !{metadata !"llvm.loop.vectorize.unroll", i32 4} +; CHECK: !{metadata !"llvm.loop.vectorize.width", i32 8} +; CHECK: !{metadata !"llvm.loop.vectorize.enable", i1 true} + +!0 = metadata !{metadata !"clang version 3.5.0 (trunk 211528)"} +!1 = metadata !{metadata !1, metadata !2, metadata !3, metadata !4, metadata !4} +!2 = metadata !{metadata !"llvm.vectorizer.unroll", i32 4} +!3 = metadata !{metadata !"llvm.vectorizer.width", i32 8} +!4 = metadata !{metadata !"llvm.vectorizer.enable", i1 true} -- cgit v1.1