Imported Upstream version 5.18.0.167

Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-20 08:25:10 +00:00
parent e19d552987
commit b084638f15
28489 changed files with 184 additions and 3866856 deletions

View File

@ -1,21 +0,0 @@
; RUN: llvm-c-test --disassemble < %s | FileCheck %s
armv8-linux-gnu +crypto 02 00 81 e0 02 03 b0 f3
;CHECK: triple: armv8-linux-gnu, features: +crypto
;CHECK: 02 00 81 e0 add r0, r1, r2
;CHECK: 02 03 b0 f3 aese.8 q0, q1
armv8-linux-gnu -crypto 02 00 81 e0 02 03 b0 f3
;CHECK: triple: armv8-linux-gnu, features: -crypto
;CHECK: 02 00 81 e0 add r0, r1, r2
;CHECK: 02 ???
;CHECK: 03 ???
;CHECK: b0 ???
;CHECK: f3 ???
arm-linux-android NULL 44 26 1f e5 0c 10 4b e2 02 20 81 e0
;CHECK: triple: arm-linux-android, features: NULL
;CHECK: ldr r2, [pc, #-1604]
;CHECK: sub r1, r11, #12
;CHECK: 02 20 81 e0
;CHECK: add r2, r1, r2

View File

@ -1,2 +0,0 @@
if not "ARM" in config.root.targets:
config.unsupported = True

View File

@ -1,23 +0,0 @@
; RUN: llvm-c-test --disassemble < %s | FileCheck %s
x86_64-linux-unknown NULL 48 83 c4 38 5b 5d 41 5c 41 5d 41 5e 41 5f c3
;CHECK: triple: x86_64-linux-unknown, features: NULL
;CHECK: addq $56, %rsp
;CHECK: popq %rbx
;CHECK: popq %rbp
;CHECK: popq %r12
;CHECK: popq %r13
;CHECK: popq %r14
;CHECK: popq %r15
;CHECK: ret
i686-apple-darwin NULL 0f b7 4c 24 0a e8 29 ce ff ff
;CHECK: triple: i686-apple-darwin, features: NULL
;CHECK: movzwl 10(%esp), %ecx
;CHECK: calll -12759
i686-linux-unknown NULL dd 44 24 04 d9 e1 c3
;CHECK: triple: i686-linux-unknown, features: NULL
;CHECK: fldl 4(%esp)
;CHECK: fabs
;CHECK: ret

View File

@ -1,2 +0,0 @@
if not "X86" in config.root.targets:
config.unsupported = True

View File

@ -1,2 +0,0 @@
; RUN: llvm-c-test --add-named-metadata-operand < /dev/null
; This used to trigger an assertion

View File

@ -1,10 +0,0 @@
; RUN: llvm-as < %s | llvm-dis > %t.orig
; RUN: llvm-as < %s | llvm-c-test --echo > %t.echo
; RUN: diff -w %t.orig %t.echo
define i32 @main() {
%1 = alloca i32
%2 = cmpxchg i32* %1, i32 2, i32 3 seq_cst acquire
%3 = extractvalue { i32, i1 } %2, 0
ret i32 %3
}

View File

@ -1,15 +0,0 @@
; RUN: llvm-c-test --calc <%s | FileCheck %s
; constant folding
test 100 200 +
;CHECK: ModuleID = 'test'
;CHECK: define i64 @test
;CHECK: {
;CHECK: ret i64 300
;CHECK: }
arg1 0 @ 0 @ * 1 @ 1 @ * +
;CHECK: ModuleID = 'arg1'
;CHECK: getelementptr
;CHECK: load
;CHECK: ret

View File

@ -1,12 +0,0 @@
; RUN: llvm-as %s -o %t.bc
; RUN: llvm-c-test --test-callsite-attributes < %t.bc
; This used to segfault
define void @Y() {
ret void
}
define void @X() {
call void @X()
ret void
}

View File

@ -1,8 +0,0 @@
; RUN: llvm-c-test --test-dibuilder | FileCheck %s
; CHECK: ; ModuleID = 'debuginfo.c'
; CHECK-NEXT: source_filename = "debuginfo.c"
; CHECK: !llvm.dbg.cu = !{!0}
; CHECK: !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "llvm-c-test", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false)
; CHECK-NEXT: !1 = !DIFile(filename: "debuginfo.c\00", directory: ".")

View File

@ -1,122 +0,0 @@
; RUN: llvm-as < %s | llvm-dis > %t.orig
; RUN: llvm-as < %s | llvm-c-test --echo > %t.echo
; RUN: diff -w %t.orig %t.echo
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.11.0"
%S = type { i64, %S* }
@var = global i32 42
@ext = external global i32*
@cst = constant %S { i64 1, %S* @cst }
@tl = thread_local global { i64, %S* } { i64 1, %S* @cst }
@arr = linkonce_odr global [5 x i8] [ i8 2, i8 3, i8 5, i8 7, i8 11 ]
@str = private unnamed_addr constant [13 x i8] c"hello world\0A\00"
@hidden = hidden global i32 7
@protected = protected global i32 23
@section = global i32 27, section ".custom"
@align = global i32 31, align 4
define { i64, %S* } @unpackrepack(%S %s) {
%1 = extractvalue %S %s, 0
%2 = extractvalue %S %s, 1
%3 = insertvalue { i64, %S* } undef, %S* %2, 1
%4 = insertvalue { i64, %S* } %3, i64 %1, 0
ret { i64, %S* } %4
}
declare void @decl()
; TODO: label and metadata types
define void @types() {
%1 = alloca half
%2 = alloca float
%3 = alloca double
%4 = alloca x86_fp80
%5 = alloca fp128
%6 = alloca ppc_fp128
%7 = alloca i7
%8 = alloca void (i1)*
%9 = alloca [3 x i22]
%10 = alloca i328 addrspace(5)*
%11 = alloca <5 x i23*>
%12 = alloca x86_mmx
ret void
}
define i32 @iops(i32 %a, i32 %b) {
%1 = add i32 %a, %b
%2 = mul i32 %a, %1
%3 = sub i32 %2, %1
%4 = udiv i32 %3, %b
%5 = sdiv i32 %2, %4
%6 = urem i32 %3, %5
%7 = srem i32 %2, %6
%8 = shl i32 %1, %b
%9 = lshr i32 %a, %7
%10 = ashr i32 %b, %8
%11 = and i32 %9, %10
%12 = or i32 %2, %11
%13 = xor i32 %12, %4
ret i32 %13
}
define i32 @call() {
%1 = call i32 @iops(i32 23, i32 19)
ret i32 %1
}
define i32 @cond(i32 %a, i32 %b) {
br label %br
unreachable:
unreachable
br:
%1 = icmp eq i32 %a, %b
br i1 %1, label %next0, label %unreachable
next0:
%2 = icmp ne i32 %a, %b
br i1 %2, label %next1, label %unreachable
next1:
%3 = icmp ugt i32 %a, %b
br i1 %3, label %next2, label %unreachable
next2:
%4 = icmp uge i32 %a, %b
br i1 %4, label %next3, label %unreachable
next3:
%5 = icmp ult i32 %a, %b
br i1 %5, label %next4, label %unreachable
next4:
%6 = icmp ule i32 %a, %b
br i1 %6, label %next5, label %unreachable
next5:
%7 = icmp sgt i32 %a, %b
br i1 %7, label %next6, label %unreachable
next6:
%8 = icmp sge i32 %a, %b
br i1 %8, label %next7, label %unreachable
next7:
%9 = icmp slt i32 %a, %b
br i1 %9, label %next8, label %unreachable
next8:
%10 = icmp sle i32 %a, %b
br i1 %10, label %next9, label %unreachable
next9:
ret i32 0
}
define i32 @loop(i32 %i) {
br label %cond
cond:
%c = phi i32 [ %i, %0 ], [ %j, %do ]
%p = phi i32 [ %r, %do ], [ 789, %0 ]
%1 = icmp eq i32 %c, 0
br i1 %1, label %do, label %done
do:
%2 = sub i32 %p, 23
%j = sub i32 %i, 1
%r = mul i32 %2, 3
br label %cond
done:
ret i32 %p
}

View File

@ -1,5 +0,0 @@
; RUN: llvm-as < %s | llvm-dis > %t.orig
; RUN: llvm-as < %s | llvm-c-test --echo > %t.echo
; RUN: diff -w %t.orig %t.echo
; RUN: llvm-as < %s | llvm-c-test --test-diagnostic-handler 2>&1 | FileCheck %s
; CHECK: Diagnostic handler was not called while loading module

View File

@ -1,7 +0,0 @@
; RUN: llvm-as %s -o %t.bc
; RUN: llvm-c-test --test-function-attributes < %t.bc
; This used to segfault
define void @X() {
ret void
}

View File

@ -1,40 +0,0 @@
; RUN: llvm-as %s -o %t.bc
; RUN: llvm-c-test --module-list-functions < %t.bc| FileCheck %s
; RUN: llvm-c-test --module-dump < %t.bc| FileCheck --check-prefix=MOD %s
; RUN: llvm-c-test --lazy-module-dump < %t.bc| FileCheck --check-prefix=LMOD %s
; MOD: define i32 @X() {
; MOD-NEXT: entry:
; LMOD: ; Materializable
; LMOD-NEXT: define i32 @X() {}
define i32 @X() {
entry:
br label %l1
l1:
br label %l2
l2:
br label %l3
l3:
ret i32 1234
}
;CHECK: FunctionDefinition: X [#bb=4]
define i32 @Z(i32 %a) {
entry:
%0 = tail call i32 @Y(i32 %a)
ret i32 %0
}
;CHECK: FunctionDefinition: Z [#bb=1]
;CHECK: calls: Y
;CHECK: #isn: 2
declare i32 @Y(i32)
;CHECK: FunctionDeclaration: Y

View File

@ -1,7 +0,0 @@
; RUN: llvm-as < %s | llvm-c-test --module-list-globals | FileCheck %s
@foo = constant [7 x i8] c"foobar\00", align 1
;CHECK: GlobalDefinition: foo [7 x i8]*
@bar = common global i32 0, align 4
;CHECK: GlobalDefinition: bar i32*

View File

@ -1,16 +0,0 @@
; RUN: not llvm-c-test --module-dump < %S/Inputs/invalid.ll.bc 2>&1 | FileCheck %s
; RUN: not llvm-c-test --lazy-module-dump < %S/Inputs/invalid.ll.bc 2>&1 | FileCheck %s
CHECK: Error parsing bitcode: Unknown attribute kind (63)
; RUN: not llvm-c-test --new-module-dump < %S/Inputs/invalid.ll.bc 2>&1 | FileCheck --check-prefix=NEW %s
; RUN: not llvm-c-test --lazy-new-module-dump < %S/Inputs/invalid.ll.bc 2>&1 | FileCheck --check-prefix=NEW %s
NEW: Error with new bitcode parser: Unknown attribute kind (63)
; RUN: llvm-c-test --test-diagnostic-handler < %S/Inputs/invalid.ll.bc 2>&1 | FileCheck --check-prefix=DIAGNOSTIC %s
DIAGNOSTIC: Executing diagnostic handler
DIAGNOSTIC: Diagnostic severity is of type error
DIAGNOSTIC: Diagnostic handler was called while loading module

View File

@ -1,83 +0,0 @@
; RUN: llvm-as < %s | llvm-dis > %t.orig
; RUN: llvm-as < %s | llvm-c-test --echo > %t.echo
; RUN: diff -w %t.orig %t.echo
%C6object9ClassInfo = type { %C6object9ClassInfo__vtbl*, %C6object9ClassInfo* }
%C6object9ClassInfo__vtbl = type { %C6object9ClassInfo* }
%C6object9Exception__vtbl = type { %C6object9ClassInfo* }
%C6object6Object = type { %C6object6Object__vtbl* }
%C6object6Object__vtbl = type { %C6object9ClassInfo* }
%C6object9Throwable = type { %C6object9Throwable__vtbl* }
%C6object9Throwable__vtbl = type { %C6object9ClassInfo* }
@C6object9ClassInfo__ClassInfo = linkonce_odr constant %C6object9ClassInfo { %C6object9ClassInfo__vtbl* @C6object9ClassInfo__vtblZ, %C6object9ClassInfo* @C6object8TypeInfo__ClassInfo }
@C6object9ClassInfo__vtblZ = linkonce_odr constant %C6object9ClassInfo__vtbl { %C6object9ClassInfo* @C6object9ClassInfo__ClassInfo }
@C6object8TypeInfo__ClassInfo = linkonce_odr constant %C6object9ClassInfo { %C6object9ClassInfo__vtbl* @C6object9ClassInfo__vtblZ, %C6object9ClassInfo* @C6object6Object__ClassInfo }
@C6object6Object__ClassInfo = linkonce_odr constant %C6object9ClassInfo { %C6object9ClassInfo__vtbl* @C6object9ClassInfo__vtblZ, %C6object9ClassInfo* @C6object6Object__ClassInfo }
@C6object9Throwable__ClassInfo = linkonce_odr constant %C6object9ClassInfo { %C6object9ClassInfo__vtbl* @C6object9ClassInfo__vtblZ, %C6object9ClassInfo* @C6object6Object__ClassInfo }
@C6object9Exception__ClassInfo = linkonce_odr constant %C6object9ClassInfo { %C6object9ClassInfo__vtbl* @C6object9ClassInfo__vtblZ, %C6object9ClassInfo* @C6object9Throwable__ClassInfo }
@C6object9Exception__vtblZ = linkonce_odr constant %C6object9Exception__vtbl { %C6object9ClassInfo* @C6object9Exception__ClassInfo }
@C6object5Error__ClassInfo = linkonce_odr constant %C6object9ClassInfo { %C6object9ClassInfo__vtbl* @C6object9ClassInfo__vtblZ, %C6object9ClassInfo* @C6object9Throwable__ClassInfo }
define i32 @_D8test01494mainFMZi() personality i32 (i32, i32, i64, i8*, i8*)* @__sd_eh_personality {
body:
%0 = invoke noalias i8* @_d_allocmemory(i64 8)
to label %then unwind label %landingPad
then: ; preds = %body
%1 = bitcast i8* %0 to i8**
store i8* bitcast (%C6object9Exception__vtbl* @C6object9Exception__vtblZ to i8*), i8** %1, align 8
%2 = bitcast i8* %0 to %C6object6Object*
invoke void @_D6object6Object6__ctorFMC6object6ObjectZv(%C6object6Object* %2)
to label %then1 unwind label %landingPad
then1: ; preds = %then
%3 = bitcast i8* %0 to %C6object9Throwable*
invoke void @__sd_eh_throw(%C6object9Throwable* nonnull %3)
to label %then2 unwind label %landingPad
then2: ; preds = %then1
unreachable
landingPad: ; preds = %then1, %then, %body
%4 = landingpad { i8*, i32 }
cleanup
catch %C6object9ClassInfo* @C6object5Error__ClassInfo
catch %C6object9ClassInfo* @C6object9Exception__ClassInfo
catch %C6object9ClassInfo* @C6object9Throwable__ClassInfo
%5 = extractvalue { i8*, i32 } %4, 1
%6 = tail call i32 @llvm.eh.typeid.for(i8* nonnull bitcast (%C6object9ClassInfo* @C6object5Error__ClassInfo to i8*))
%7 = icmp eq i32 %6, %5
br i1 %7, label %catch, label %unwind3
catch: ; preds = %unwind5, %unwind3, %landingPad
%merge = phi i32 [ 23, %landingPad ], [ 19, %unwind3 ], [ 13, %unwind5 ]
ret i32 %merge
unwind3: ; preds = %landingPad
%8 = tail call i32 @llvm.eh.typeid.for(i8* nonnull bitcast (%C6object9ClassInfo* @C6object9Exception__ClassInfo to i8*))
%9 = icmp eq i32 %8, %5
br i1 %9, label %catch, label %unwind5
unwind5: ; preds = %unwind3
%10 = tail call i32 @llvm.eh.typeid.for(i8* nonnull bitcast (%C6object9ClassInfo* @C6object9Throwable__ClassInfo to i8*))
%11 = icmp eq i32 %10, %5
br i1 %11, label %catch, label %unwind7
unwind7: ; preds = %unwind5
resume { i8*, i32 } %4
}
declare void @_D6object6Object6__ctorFMC6object6ObjectZv(%C6object6Object*)
declare noalias i8* @_d_allocmemory(i64)
declare i32 @__sd_eh_personality(i32, i32, i64, i8*, i8*)
declare void @__sd_eh_throw(%C6object9Throwable* nonnull) #0
; Function Attrs: nounwind readnone
declare i32 @llvm.eh.typeid.for(i8*) #1
attributes #0 = { noreturn }
attributes #1 = { nounwind readnone }

View File

@ -1,37 +0,0 @@
; RUN: llvm-as < %s | llvm-dis > %t.orig
; RUN: llvm-as < %s | llvm-c-test --echo > %t.echo
; RUN: diff -w %t.orig %t.echo
%S = type { i32, i32 }
define i32 @method(%S* %this, i32 %arg.a, i32 %arg.b) {
%a = alloca i32
store i32 %arg.a, i32* %a, align 4
%b = alloca i32
store i32 %arg.b, i32* %b
%1 = load i32, i32* %a, align 4
%2 = load i32, i32* %b, align 4
%3 = add i32 %1, %2
%4 = getelementptr inbounds %S, %S* %this, i32 0, i32 0
%5 = load i32, i32* %4, align 4
%6 = add i32 %3, %5
%7 = getelementptr inbounds %S, %S* %this, i32 0, i32 1
%8 = load i32, i32* %7, align 4
%9 = add i32 %6, %8
ret i32 %9
}
define i32 @main() {
%s = alloca %S
store %S zeroinitializer, %S* %s
%1 = getelementptr inbounds %S, %S* %s, i32 0, i32 0
%2 = getelementptr inbounds %S, %S* %s, i32 0, i32 1
store i32 1, i32* %2
store i32 1, i32* %1
%3 = insertvalue { %S*, i32 (%S*, i32, i32)* } undef, %S* %s, 0
%4 = insertvalue { %S*, i32 (%S*, i32, i32)* } %3, i32 (%S*, i32, i32)* @method, 1
%5 = extractvalue { %S*, i32 (%S*, i32, i32)* } %4, 0
%6 = extractvalue { %S*, i32 (%S*, i32, i32)* } %4, 1
%7 = call i32 %6(%S* %5, i32 38, i32 2)
ret i32 %7
}

View File

@ -1,2 +0,0 @@
; RUN: not llvm-c-test --object-list-sections < /dev/null
; This used to cause a segfault

View File

@ -1,2 +0,0 @@
; RUN: llvm-c-test --set-metadata < /dev/null
; This used to trigger an assertion