Imported Upstream version 5.18.0.207

Former-commit-id: 3b152f462918d427ce18620a2cbe4f8b79650449
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-11-17 08:23:10 +00:00
parent 8e12397d70
commit eb85e2fc17
28480 changed files with 72 additions and 3866936 deletions

View File

@ -1,10 +0,0 @@
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
; Verify the operand type of the ret instructions in a function match the
; declared return type of the function they live in.
; CHECK: value doesn't match function result type 'i32'
;
define i32 @testfunc() {
ret i32* null
}

View File

@ -1,10 +0,0 @@
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
; CHECK: invalid getelementptr indices
; This testcase is invalid because we are indexing into a pointer that is
; contained WITHIN a structure.
define void @test({i32, i32*} * %X) {
getelementptr {i32, i32*}, {i32, i32*} * %X, i32 0, i32 1, i32 0
ret void
}

View File

@ -1,13 +0,0 @@
; RUN: not llvm-as < %s > /dev/null 2>&1
int %main() {
start1:
switch uint 0, label %brt0 [int 3, label %brt1 ]
brt0:
ret int 0
brt1:
ret int 0
}

View File

@ -1,13 +0,0 @@
; RUN: llvm-as < %s 2>&1 | FileCheck %s
; CHECK-NOT: Instruction operands must be first-class
; This previously was for PR826, but structs are now first-class so
; the following is now valid.
%struct_4 = type { i32 }
define void @test() {
store %struct_4 zeroinitializer, %struct_4* null
unreachable
}

View File

@ -1,10 +0,0 @@
; RUN: not llvm-as < %s > /dev/null 2> %t
; RUN: FileCheck %s --input-file=%t
; CHECK: basic block pointers are invalid
define i32 @main() {
%foo = call i8* %llvm.stacksave()
%foop = bitcast i8* %foo to label*
%nret = load label, label* %foop
br label %nret
}

View File

@ -1,8 +0,0 @@
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
; CHECK: llvm intrinsics cannot be defined
; PR1047
define void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) {
entry:
ret void
}

View File

@ -1,10 +0,0 @@
; RUN: not llvm-as < %s > /dev/null 2>&1
declare void @foo(i8*)
define void @bar() {
invoke void @foo(i8* signext null)
to label %r unwind label %r
r:
ret void
}

View File

@ -1,10 +0,0 @@
; RUN: not llvm-as < %s > /dev/null 2>&1
%struct = type { }
declare void @foo(...)
define void @bar() {
call void (...) @foo(%struct* sret null )
ret void
}

View File

@ -1,9 +0,0 @@
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
; CHECK: invalid type for alloca
; PR2113
define void @test() {
%A = alloca void()
ret void
}

View File

@ -1,12 +0,0 @@
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
; CHECK: alignment argument of memory intrinsics must be a constant int
; PR2318
define void @x(i8* %a, i8* %src, i64 %len, i32 %align) nounwind {
entry:
tail call void @llvm.memcpy.p0i8.p0i8.i64( i8* %a, i8* %src, i64 %len, i32 %align, i1 false) nounwind
ret void
}
declare void @llvm.memcpy.p0i8.p0i8.i64( i8* %a, i8* %src, i64 %len, i32, i1)

View File

@ -1,6 +0,0 @@
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
; CHECK: value doesn't match function result type 'void'
define void @foo() {
ret i32 0
}

View File

@ -1,15 +0,0 @@
; RUN: not llvm-as < %s > /dev/null 2>&1
declare i32 @v()
define i32 @f() {
e:
%r = invoke i32 @v()
to label %c unwind label %u ; <i32> [#uses=2]
c: ; preds = %e
ret i32 %r
u: ; preds = %e
ret i32 %r
}

View File

@ -1,16 +0,0 @@
; RUN: not llvm-as < %s > /dev/null 2>&1
declare i32 @v()
define i32 @g() {
e:
%s = invoke i32 @v()
to label %c unwind label %u ; <i32> [#uses=2]
c: ; preds = %e
ret i32 %s
u: ; preds = %e
%t = phi i32 [ %s, %e ] ; <i32> [#uses=1]
ret i32 %t
}

View File

@ -1,19 +0,0 @@
; RUN: not llvm-as < %s > /dev/null 2>&1
declare i32 @v()
define i32 @h() {
e:
%s = invoke i32 @v()
to label %c unwind label %u ; <i32> [#uses=2]
c: ; preds = %e
br label %d
d: ; preds = %u, %c
%p = phi i32 [ %s, %c ], [ %s, %u ] ; <i32> [#uses=1]
ret i32 %p
u: ; preds = %e
br label %d
}

View File

@ -1,29 +0,0 @@
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
; CHECK: assembly parsed, but does not verify as correct
; PR7316
; XFAIL: *
; The test case is buggy, it supposed to check that we reject memcpy with vector
; pointer arguments. Now we don't reject such memcpy and the test case would
; fail if it was correct. Because it used the wrong signature for memcpy (the
; last isVolatile argument was missing) it was rejected by the verifier and
; didn't fail. Fix the memcpy signature and mark it as an expected failure
; for now.
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32"
target triple = "x86-unknown-unknown"
@aa = global [32 x i8] zeroinitializer, align 1
@bb = global [16 x i8] zeroinitializer, align 1
define void @x() nounwind {
L.0:
%0 = getelementptr [32 x i8], [32 x i8]* @aa, i32 0, i32 4
%1 = bitcast i8* %0 to [16 x i8]*
%2 = bitcast [16 x i8]* %1 to [0 x i8]*
%3 = getelementptr [16 x i8], [16 x i8]* @bb
%4 = bitcast [16 x i8]* %3 to [0 x i8]*
call void @llvm.memcpy.p0a0i8.p0a0i8.i32([0 x i8]* %2, [0 x i8]* %4, i32 16, i32 1, i1 false)
br label %return
return:
ret void
}
declare void @llvm.memcpy.p0a0i8.p0a0i8.i32([0 x i8]* nocapture, [0 x i8]* nocapture readonly, i32, i32, i1) nounwind

View File

@ -1,9 +0,0 @@
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
; CHECK: multiple entries for the same basic block
define i32 @test(i32 %i, i32 %j, i1 %c) {
br i1 %c, label %A, label %A
A:
%a = phi i32 [%i, %0], [%j, %0] ; Error, different values from same block!
ret i32 %a
}

View File

@ -1,36 +0,0 @@
; RUN: llvm-as -disable-output %s -o - 2>&1 | FileCheck %s
source_filename = "t.c"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.12.0"
define void @f() !dbg !4 {
entry:
; CHECK: scope points into the type hierarchy
; CHECK: DILocation
ret void, !dbg !7
}
define void @g() !dbg !8 {
entry:
; CHECK: scope points into the type hierarchy
; CHECK: DILexicalBlockFile
ret void, !dbg !9
}
; CHECK: warning: ignoring invalid debug info
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!2, !3}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, emissionKind: FullDebug)
!1 = !DIFile(filename: "t.c", directory: "/tmp")
!2 = !{i32 2, !"Dwarf Version", i32 4}
!3 = !{i32 2, !"Debug Info Version", i32 3}
!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !5, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, unit: !0)
!5 = !DISubroutineType(types: !{})
!6 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !5, isDefinition: false, scopeLine: 2)
!7 = !DILocation(line: 2, scope: !6)
!8 = distinct !DISubprogram(name: "g", scope: !1, file: !1, line: 2, type: !5, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, unit: !0)
!9 = !DILocation(line: 2, scope: !10, inlinedAt: !11)
!10 = !DILexicalBlockFile(scope: !6, file: !2, discriminator: 0)
!11 = !DILocation(line: 2, scope: !8)

View File

@ -1,23 +0,0 @@
; RUN: llvm-as -disable-output <%s 2>&1| FileCheck %s
define void @f() !dbg !14 {
ret void
}
!0 = !{null}
!1 = distinct !DICompositeType(tag: DW_TAG_structure_type)
!2 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
!3 = !DISubroutineType(types: !0)
!4 = distinct !DICompositeType(tag: DW_TAG_structure_type)
!8 = distinct !DICompileUnit(language: DW_LANG_Swift, producer: "clang",
file: !2, emissionKind: 2)
; CHECK: invalid thrown type
; CHECK: warning: ignoring invalid debug info
!13 = !{!14}
!14 = distinct !DISubprogram(name: "f", scope: !1,
file: !2, line: 1, type: !3, isLocal: true,
isDefinition: true, scopeLine: 2,
unit: !8, thrownTypes: !13)
!15 = !{i32 1, !"Debug Info Version", i32 3}
!llvm.module.flags = !{!15}
!llvm.dbg.cu = !{!8}

View File

@ -1,16 +0,0 @@
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
; CHECK: PHI nodes not grouped at top
define i32 @test(i32 %i, i32 %j, i1 %c) {
br i1 %c, label %A, label %B
A:
br label %C
B:
br label %C
C:
%a = phi i32 [%i, %A], [%j, %B]
%x = add i32 %a, 0 ; Error, PHI's should be grouped!
%b = phi i32 [%i, %A], [%j, %B]
ret i32 %x
}

View File

@ -1,3 +0,0 @@
This directory contains testcases that the verifier is supposed to detect as
malformed LLVM code. Testcases for situations that the verifier incorrectly
identifies as malformed should go in the test/Assembler directory.

Some files were not shown because too many files have changed in this diff Show More