From 36b56886974eae4f9c5ebc96befd3e7bfe5de338 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Wed, 23 Apr 2014 16:57:46 -0700 Subject: Update to LLVM 3.5a. Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617 --- test/Assembler/2007-09-10-AliasFwdRef.ll | 4 +++- test/Assembler/ConstantExprFoldSelect.ll | 8 ++++++++ test/Assembler/addrspacecast-alias.ll | 6 ++++++ test/Assembler/atomic.ll | 10 ++++++---- test/Assembler/functionlocal-metadata.ll | 2 +- test/Assembler/getInt.ll | 3 +++ test/Assembler/inalloca.ll | 16 ++++++++++++++++ test/Assembler/invalid-name.ll | 6 ++++++ test/Assembler/invalid_cast3.ll | 7 +++++++ 9 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 test/Assembler/ConstantExprFoldSelect.ll create mode 100644 test/Assembler/addrspacecast-alias.ll create mode 100644 test/Assembler/getInt.ll create mode 100644 test/Assembler/inalloca.ll create mode 100644 test/Assembler/invalid-name.ll create mode 100644 test/Assembler/invalid_cast3.ll (limited to 'test/Assembler') diff --git a/test/Assembler/2007-09-10-AliasFwdRef.ll b/test/Assembler/2007-09-10-AliasFwdRef.ll index b21491b..2ebfc27 100644 --- a/test/Assembler/2007-09-10-AliasFwdRef.ll +++ b/test/Assembler/2007-09-10-AliasFwdRef.ll @@ -6,4 +6,6 @@ -declare extern_weak i32 @pthread_cancel(i32) +define weak i32 @pthread_cancel(i32) { + ret i32 0 +} diff --git a/test/Assembler/ConstantExprFoldSelect.ll b/test/Assembler/ConstantExprFoldSelect.ll new file mode 100644 index 0000000..b000e02 --- /dev/null +++ b/test/Assembler/ConstantExprFoldSelect.ll @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | llvm-dis | FileCheck %s +; PR18319 + +define void @function() { + %c = trunc <4 x i16> select (<4 x i1> , <4 x i16> , <4 x i16> ) to <4 x i8> +; CHECK: + ret void +} diff --git a/test/Assembler/addrspacecast-alias.ll b/test/Assembler/addrspacecast-alias.ll new file mode 100644 index 0000000..6623a25 --- /dev/null +++ b/test/Assembler/addrspacecast-alias.ll @@ -0,0 +1,6 @@ +; RUN: llvm-as -disable-output %s + +; Test that global aliases are allowed to be constant addrspacecast + +@i = internal addrspace(1) global i8 42 +@ia = alias internal i8 addrspace(2)* addrspacecast (i8 addrspace(1)* @i to i8 addrspace(2)*) diff --git a/test/Assembler/atomic.ll b/test/Assembler/atomic.ll index b245cde..a2ae58e 100644 --- a/test/Assembler/atomic.ll +++ b/test/Assembler/atomic.ll @@ -10,10 +10,12 @@ define void @f(i32* %x) { store atomic i32 3, i32* %x release, align 4 ; CHECK: store atomic volatile i32 3, i32* %x singlethread monotonic, align 4 store atomic volatile i32 3, i32* %x singlethread monotonic, align 4 - ; CHECK: cmpxchg i32* %x, i32 1, i32 0 singlethread monotonic - cmpxchg i32* %x, i32 1, i32 0 singlethread monotonic - ; CHECK: cmpxchg volatile i32* %x, i32 0, i32 1 acq_rel - cmpxchg volatile i32* %x, i32 0, i32 1 acq_rel + ; CHECK: cmpxchg i32* %x, i32 1, i32 0 singlethread monotonic monotonic + cmpxchg i32* %x, i32 1, i32 0 singlethread monotonic monotonic + ; CHECK: cmpxchg volatile i32* %x, i32 0, i32 1 acq_rel acquire + 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: 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/functionlocal-metadata.ll b/test/Assembler/functionlocal-metadata.ll index 0d93bfd..f9b1d74 100644 --- a/test/Assembler/functionlocal-metadata.ll +++ b/test/Assembler/functionlocal-metadata.ll @@ -53,4 +53,4 @@ declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone ; CHECK: ![[ID0]] = metadata !{i32 662302, i32 26, metadata ![[ID1]], null} ; CHECK: ![[ID1]] = metadata !{i32 4, metadata !"foo"} ; CHECK: ![[ID2]] = metadata !{metadata !"bar"} -; CHECK; ![[ID3]] = metadata !{metadata !"foo"} +; CHECK: ![[ID3]] = metadata !{metadata !"foo"} diff --git a/test/Assembler/getInt.ll b/test/Assembler/getInt.ll new file mode 100644 index 0000000..8e2537a --- /dev/null +++ b/test/Assembler/getInt.ll @@ -0,0 +1,3 @@ +; RUN: not opt < %s 2>&1 | grep 'not a number, or does not fit in an unsigned int' + +target datalayout = "p:4294967296:64:64" diff --git a/test/Assembler/inalloca.ll b/test/Assembler/inalloca.ll new file mode 100644 index 0000000..ff7a87e --- /dev/null +++ b/test/Assembler/inalloca.ll @@ -0,0 +1,16 @@ +; RUN: llvm-as %s -o /dev/null + +define void @a() { +entry: + %0 = alloca inalloca i32 + %1 = alloca inalloca [2 x i32] + %2 = alloca inalloca i32, i32 2 + %3 = alloca inalloca i32, i32 2, align 16 + %4 = alloca inalloca i32, i32 2, align 16, !foo !0 + %5 = alloca i32, i32 2, align 16, !foo !0 + %6 = alloca i32, i32 2, align 16 + ret void +} + +!0 = metadata !{i32 662302, null} +!foo = !{ !0 } diff --git a/test/Assembler/invalid-name.ll b/test/Assembler/invalid-name.ll new file mode 100644 index 0000000..d9d7a11 --- /dev/null +++ b/test/Assembler/invalid-name.ll @@ -0,0 +1,6 @@ +; RUN: not llvm-as %s 2>&1 | FileCheck %s + +; CHECK: expected function name +define void @"zed\00bar"() { + ret void +} diff --git a/test/Assembler/invalid_cast3.ll b/test/Assembler/invalid_cast3.ll new file mode 100644 index 0000000..cc956ce --- /dev/null +++ b/test/Assembler/invalid_cast3.ll @@ -0,0 +1,7 @@ +; RUN: not llvm-as < %s 2>&1 | FileCheck %s + +; CHECK: invalid cast opcode for cast from '<4 x i32*>' to '<2 x i32*>' +define <2 x i32*> @illegal_vector_pointer_bitcast_num_elements(<4 x i32*> %c) { + %bc = bitcast <4 x i32*> %c to <2 x i32*> + ret <2 x i32*> %bc +} -- cgit v1.1