summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/apint-shl-trunc.ll
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-03-23 20:48:34 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-03-23 20:48:34 +0000
commitea8b07ee6badc731c52a0e1668c7a8eacf9a3b1d (patch)
tree9c0b8d2ca1fb929ef8028f6689ee28114e409e83 /llvm/test/Transforms/InstCombine/apint-shl-trunc.ll
parent6d39206bc2bd818180b798483188899716410554 (diff)
downloadbcm5719-llvm-ea8b07ee6badc731c52a0e1668c7a8eacf9a3b1d.tar.gz
bcm5719-llvm-ea8b07ee6badc731c52a0e1668c7a8eacf9a3b1d.zip
Add test case for testing InstCombine with arbitrary precision integer
types. These tests mimic the integer test cases in the normal InstCombine test suite but use "strange" integer bit widths. Most tests written by Zhou Sheng, a few by me. llvm-svn: 35284
Diffstat (limited to 'llvm/test/Transforms/InstCombine/apint-shl-trunc.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/apint-shl-trunc.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/apint-shl-trunc.ll b/llvm/test/Transforms/InstCombine/apint-shl-trunc.ll
new file mode 100644
index 00000000000..cf5b1f86834
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/apint-shl-trunc.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis > /tmp/sht.rel &&
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep shl
+
+define i1 @test0(i39 %X, i39 %A) {
+ %B = lshr i39 %X, %A
+ %D = trunc i39 %B to i1
+ ret i1 %D
+}
+
+define i1 @test1(i799 %X, i799 %A) {
+ %B = lshr i799 %X, %A
+ %D = trunc i799 %B to i1
+ ret i1 %D
+}
OpenPOWER on IntegriCloud