summaryrefslogtreecommitdiff
path: root/test/ExecutionEngine
diff options
context:
space:
mode:
authorZhou Sheng <zhousheng00@gmail.com>2009-01-30 08:59:51 +0000
committerZhou Sheng <zhousheng00@gmail.com>2009-01-30 08:59:51 +0000
commit1ff06b231fb84080398518b9fb49f13b25d2259c (patch)
tree3ffe39ab4c0ed75bfc3a2d442e34266aadf22824 /test/ExecutionEngine
parentd6f175b3ec8d40e33ab8110020ca8feb98295834 (diff)
downloadllvm-1ff06b231fb84080398518b9fb49f13b25d2259c.tar.gz
llvm-1ff06b231fb84080398518b9fb49f13b25d2259c.tar.bz2
llvm-1ff06b231fb84080398518b9fb49f13b25d2259c.tar.xz
This is case is to uncover the bug in IntrinsicLowering.cpp,
the LowerPartSet(). It didn't handle the situation correctly when the low, high argument values are in reverse order (low > high) with 'Val' type is i32 (a corner case). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63386 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ExecutionEngine')
-rw-r--r--test/ExecutionEngine/2009-01-29-PartSet.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/ExecutionEngine/2009-01-29-PartSet.ll b/test/ExecutionEngine/2009-01-29-PartSet.ll
new file mode 100644
index 0000000000..ae766876fc
--- /dev/null
+++ b/test/ExecutionEngine/2009-01-29-PartSet.ll
@@ -0,0 +1,17 @@
+; RUN: llvm-as %s -o - | lli -force-interpreter | grep FF8F
+
+; ModuleID = 'partset.c.bc'
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
+target triple = "x86_64-unknown-linux-gnu"
+@.str = internal constant [4 x i8] c"%X\0A\00" ; <[4 x i8]*> [#uses=1]
+
+define i32 @main() nounwind {
+entry:
+ %part_set = tail call i32 @llvm.part.set.i32.i8( i32 65535, i8 1, i32 7, i32 4 ) ; <i32> [#uses=1]
+ %tmp4 = tail call i32 (i8*, ...)* @printf( i8* noalias getelementptr ([4 x i8]* @.str, i32 0, i64 0), i32 %part_set ) nounwind ; <i32> [#uses=0]
+ ret i32 0
+}
+
+declare i32 @llvm.part.set.i32.i8(i32, i8, i32, i32) nounwind readnone
+
+declare i32 @printf(i8*, ...) nounwind