diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-08-08 16:52:53 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-08-08 16:52:53 +0000 |
| commit | 4e20bb0468b8d0db13287e666b482eb93689be99 (patch) | |
| tree | 852306cf8c98c56c9c7db1a0860802199b2b3253 /test/CodeGen/Mips/pr33978.ll | |
| parent | 3ad6a4b447326bc16c17df65637ca02330b8d090 (diff) | |
Vendor import of llvm release_50 branch r310316:vendor/llvm/llvm-release_50-r310316
Notes
svn path=/vendor/llvm/dist/; revision=322259
svn path=/vendor/llvm/llvm-release_50-r310316/; revision=322260; tag=vendor/llvm/llvm-release_50-r310316
Diffstat (limited to 'test/CodeGen/Mips/pr33978.ll')
| -rw-r--r-- | test/CodeGen/Mips/pr33978.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/pr33978.ll b/test/CodeGen/Mips/pr33978.ll new file mode 100644 index 000000000000..19fa1715baab --- /dev/null +++ b/test/CodeGen/Mips/pr33978.ll @@ -0,0 +1,20 @@ +; RUN: llc -march=mips -mcpu=mips32r2 < %s -o /dev/null + +; Test that SelectionDAG does not crash during DAGCombine when two pointers +; to the stack match with differing bases and offsets when expanding memcpy. +; This could result in one of the pointers being considered dereferenceable +; and other not. + +define void @foo(i8*) { +start: + %a = alloca [22 x i8] + %b = alloca [22 x i8] + %c = bitcast [22 x i8]* %a to i8* + %d = getelementptr inbounds [22 x i8], [22 x i8]* %b, i32 0, i32 2 + call void @llvm.memcpy.p0i8.p0i8.i32(i8* %c, i8* %d, i32 20, i32 1, i1 false) + %e = getelementptr inbounds [22 x i8], [22 x i8]* %b, i32 0, i32 6 + call void @llvm.memcpy.p0i8.p0i8.i32(i8* %0, i8* %e, i32 12, i32 1, i1 false) + ret void +} + +declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) |
