aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-10-30 20:34:30 +0000
committerDuncan Sands <baldrick@free.fr>2008-10-30 20:34:30 +0000
commit54e79034b63f76c867bdf14f355b1dedb83dacfa (patch)
tree530faf442326eb36807470f0f64baf9cb1bf0c55 /test/CodeGen
parent5bb3f8d5b27776c7e048767617a37c4f13bfdd72 (diff)
downloadexternal_llvm-54e79034b63f76c867bdf14f355b1dedb83dacfa.zip
external_llvm-54e79034b63f76c867bdf14f355b1dedb83dacfa.tar.gz
external_llvm-54e79034b63f76c867bdf14f355b1dedb83dacfa.tar.bz2
Testcase for PR2986.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58456 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/PowerPC/2008-10-30-IllegalShift.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/2008-10-30-IllegalShift.ll b/test/CodeGen/PowerPC/2008-10-30-IllegalShift.ll
new file mode 100644
index 0000000..af9a54e
--- /dev/null
+++ b/test/CodeGen/PowerPC/2008-10-30-IllegalShift.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | llc -march=ppc32
+; PR2986
+@argc = external global i32 ; <i32*> [#uses=1]
+@buffer = external global [32 x i8], align 4 ; <[32 x i8]*> [#uses=1]
+
+define void @test1() nounwind noinline {
+entry:
+ %0 = load i32* @argc, align 4 ; <i32> [#uses=1]
+ %1 = trunc i32 %0 to i8 ; <i8> [#uses=1]
+ tail call void @llvm.memset.i32(i8* getelementptr ([32 x i8]* @buffer, i32 0, i32 0), i8 %1, i32 17, i32 4)
+ unreachable
+}
+
+declare void @llvm.memset.i32(i8*, i8, i32, i32) nounwind