aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-03-09 22:50:27 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-03-09 22:50:27 +0000
commit31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 (patch)
tree0d37937ef37e76e4d410039516390662899f7caa /test
parent365919ebc13fcd6ddae24bfcc7c4720dc682c78b (diff)
downloadsrc-31bbf64f3a4974a2d6c8b3b27ad2f519caf74057.tar.gz
src-31bbf64f3a4974a2d6c8b3b27ad2f519caf74057.zip
Vendor import of llvm 4.0.0 release r297347:vendor/llvm/llvm-release_400-r297347
Notes
Notes: svn path=/vendor/llvm/dist/; revision=314975 svn path=/vendor/llvm/llvm-release_400-r297347/; revision=314976; tag=vendor/llvm/llvm-release_400-r297347
Diffstat (limited to 'test')
-rw-r--r--test/DebugInfo/Inputs/split-dwarf-empty.obin0 -> 1648 bytes
-rw-r--r--test/Feature/optnone-opt.ll1
-rwxr-xr-xtest/Object/Inputs/dynamic-reloc.sobin0 -> 2088 bytes
-rw-r--r--test/Object/Inputs/macho-bad-archive1.abin0 -> 5544 bytes
-rw-r--r--test/Object/Inputs/macho-bad-archive2.abin0 -> 1084 bytes
-rw-r--r--test/Object/Inputs/macho-toc64-archive-x86_64.abin0 -> 1576 bytes
-rw-r--r--test/Transforms/GVNHoist/hoist-unsafe-pr31729.ll81
-rw-r--r--test/tools/dsymutil/Inputs/common.macho.x86_64.obin0 -> 2404 bytes
-rw-r--r--test/tools/dsymutil/Inputs/thumb.obin0 -> 1224 bytes
-rw-r--r--test/tools/llvm-objdump/Inputs/eh_frame_zero_cie.obin0 -> 456 bytes
10 files changed, 81 insertions, 1 deletions
diff --git a/test/DebugInfo/Inputs/split-dwarf-empty.o b/test/DebugInfo/Inputs/split-dwarf-empty.o
new file mode 100644
index 000000000000..95e2ae125915
--- /dev/null
+++ b/test/DebugInfo/Inputs/split-dwarf-empty.o
Binary files differ
diff --git a/test/Feature/optnone-opt.ll b/test/Feature/optnone-opt.ll
index a00013ec1797..f53877d4aea9 100644
--- a/test/Feature/optnone-opt.ll
+++ b/test/Feature/optnone-opt.ll
@@ -41,7 +41,6 @@ attributes #0 = { optnone noinline }
; OPT-O1-DAG: Skipping pass 'Combine redundant instructions'
; OPT-O1-DAG: Skipping pass 'Dead Store Elimination'
; OPT-O1-DAG: Skipping pass 'Early CSE'
-; OPT-O1-DAG: Skipping pass 'Early GVN Hoisting of Expressions'
; OPT-O1-DAG: Skipping pass 'Jump Threading'
; OPT-O1-DAG: Skipping pass 'MemCpy Optimization'
; OPT-O1-DAG: Skipping pass 'Reassociate expressions'
diff --git a/test/Object/Inputs/dynamic-reloc.so b/test/Object/Inputs/dynamic-reloc.so
new file mode 100755
index 000000000000..8de35691ba08
--- /dev/null
+++ b/test/Object/Inputs/dynamic-reloc.so
Binary files differ
diff --git a/test/Object/Inputs/macho-bad-archive1.a b/test/Object/Inputs/macho-bad-archive1.a
new file mode 100644
index 000000000000..42ef43f59325
--- /dev/null
+++ b/test/Object/Inputs/macho-bad-archive1.a
Binary files differ
diff --git a/test/Object/Inputs/macho-bad-archive2.a b/test/Object/Inputs/macho-bad-archive2.a
new file mode 100644
index 000000000000..006822f00019
--- /dev/null
+++ b/test/Object/Inputs/macho-bad-archive2.a
Binary files differ
diff --git a/test/Object/Inputs/macho-toc64-archive-x86_64.a b/test/Object/Inputs/macho-toc64-archive-x86_64.a
new file mode 100644
index 000000000000..e73f3dce6bd4
--- /dev/null
+++ b/test/Object/Inputs/macho-toc64-archive-x86_64.a
Binary files differ
diff --git a/test/Transforms/GVNHoist/hoist-unsafe-pr31729.ll b/test/Transforms/GVNHoist/hoist-unsafe-pr31729.ll
new file mode 100644
index 000000000000..654d5b6a5585
--- /dev/null
+++ b/test/Transforms/GVNHoist/hoist-unsafe-pr31729.ll
@@ -0,0 +1,81 @@
+; RUN: opt -gvn-hoist -S < %s | FileCheck %s
+
+; Check that urem is not hoisted.
+; CHECK-LABEL: @main
+; CHECK: urem
+; CHECK: urem
+; CHECK: urem
+
+@g_x_s = global i32 -470211272, align 4
+@g_z_s = global i32 2007237709, align 4
+@g_x_u = global i32 282475249, align 4
+@g_z_u = global i32 984943658, align 4
+@g_m = global i32 16807, align 4
+@res = common global i32 0, align 4
+
+; Function Attrs:
+define i64 @func() #0 {
+entry:
+ ret i64 1
+}
+
+; Function Attrs:
+define i32 @main() {
+entry:
+ %0 = load volatile i32, i32* @g_x_s, align 4
+ %1 = load volatile i32, i32* @g_z_s, align 4
+ %2 = load volatile i32, i32* @g_x_u, align 4
+ %3 = load volatile i32, i32* @g_z_u, align 4
+ %4 = load volatile i32, i32* @g_m, align 4
+ %call = call i64 @func() #4
+ %conv = sext i32 %1 to i64
+ %cmp = icmp ne i64 %call, %conv
+ br i1 %cmp, label %if.end, label %lor.lhs.false
+
+lor.lhs.false:
+ %div = udiv i32 %4, %1
+ %rem = urem i32 %0, %div
+ %cmp2 = icmp eq i32 %rem, 0
+ br i1 %cmp2, label %if.end, label %if.then
+
+if.then:
+ br label %cleanup
+
+if.end:
+ %call4 = call i64 @func() #4
+ %conv5 = zext i32 %3 to i64
+ %cmp6 = icmp ne i64 %call4, %conv5
+ br i1 %cmp6, label %if.end14, label %lor.lhs.false8
+
+lor.lhs.false8:
+ %div9 = udiv i32 %4, %3
+ %rem10 = urem i32 %0, %div9
+ %cmp11 = icmp eq i32 %rem10, 0
+ br i1 %cmp11, label %if.end14, label %if.then13
+
+if.then13:
+ br label %cleanup
+
+if.end14:
+ %call15 = call i64 @func() #4
+ %cmp17 = icmp ne i64 %call15, %conv
+ br i1 %cmp17, label %if.end25, label %lor.lhs.false19
+
+lor.lhs.false19:
+ %div20 = udiv i32 %4, %1
+ %rem21 = urem i32 %0, %div20
+ %cmp22 = icmp eq i32 %rem21, 0
+ br i1 %cmp22, label %if.end25, label %if.then24
+
+if.then24:
+ br label %cleanup
+
+if.end25:
+ br label %cleanup
+
+cleanup:
+ %retval.0 = phi i32 [ 0, %if.end25 ], [ 1, %if.then24 ], [ 1, %if.then13 ], [ 1, %if.then ]
+ ret i32 %retval.0
+}
+
+attributes #0 = { minsize noinline nounwind optsize uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
diff --git a/test/tools/dsymutil/Inputs/common.macho.x86_64.o b/test/tools/dsymutil/Inputs/common.macho.x86_64.o
new file mode 100644
index 000000000000..491009bc866e
--- /dev/null
+++ b/test/tools/dsymutil/Inputs/common.macho.x86_64.o
Binary files differ
diff --git a/test/tools/dsymutil/Inputs/thumb.o b/test/tools/dsymutil/Inputs/thumb.o
new file mode 100644
index 000000000000..8bac2a1e484c
--- /dev/null
+++ b/test/tools/dsymutil/Inputs/thumb.o
Binary files differ
diff --git a/test/tools/llvm-objdump/Inputs/eh_frame_zero_cie.o b/test/tools/llvm-objdump/Inputs/eh_frame_zero_cie.o
new file mode 100644
index 000000000000..ce159ad52f41
--- /dev/null
+++ b/test/tools/llvm-objdump/Inputs/eh_frame_zero_cie.o
Binary files differ