aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-07-22 21:44:06 +0000
committerChris Lattner <sabre@nondot.org>2003-07-22 21:44:06 +0000
commita73fede7143911085186458d8b28d52cfb26396c (patch)
tree28792ac8f1959bebd108c86b70de6f6186a31e83 /test
parentb13092b05367268a4aebaae799d8440b549e10c5 (diff)
downloadexternal_llvm-a73fede7143911085186458d8b28d52cfb26396c.zip
external_llvm-a73fede7143911085186458d8b28d52cfb26396c.tar.gz
external_llvm-a73fede7143911085186458d8b28d52cfb26396c.tar.bz2
New testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7240 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/and.ll11
-rw-r--r--test/Transforms/InstCombine/cast.ll17
2 files changed, 22 insertions, 6 deletions
diff --git a/test/Transforms/InstCombine/and.ll b/test/Transforms/InstCombine/and.ll
index f01de78..23a20fd 100644
--- a/test/Transforms/InstCombine/and.ll
+++ b/test/Transforms/InstCombine/and.ll
@@ -47,3 +47,14 @@ ubyte %test8(ubyte %A) { ; AND associates
ret ubyte %C
}
+bool %test9(int %A) {
+ %B = and int %A, -2147483648 ; Test of sign bit, convert to setle %A, 0
+ %C = cast int %B to bool
+ ret bool %C
+}
+
+bool %test9(uint %A) {
+ %B = and uint %A, 2147483648 ; Test of sign bit, convert to setle %A, 0
+ %C = cast uint %B to bool
+ ret bool %C
+}
diff --git a/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll
index a19a2f1..3b5b14b 100644
--- a/test/Transforms/InstCombine/cast.ll
+++ b/test/Transforms/InstCombine/cast.ll
@@ -68,19 +68,24 @@ short %test10(short %A) {
bool %test11(ubyte %A, ubyte %B) {
%C = sub ubyte %A, %B
- %D = cast ubyte %C to bool ; == setne A, B
- ret bool %D
+ %cD = cast ubyte %C to bool ; == setne A, B
+ ret bool %cD
}
bool %test12(ubyte %A) {
%B = add ubyte %A, 255
- %C = cast ubyte %B to bool ; === A != 1
- ret bool %C
+ %c = cast ubyte %B to bool ; === A != 1
+ ret bool %c
}
bool %test13(ubyte %A, ubyte %b) {
%B = add ubyte %A, %b
- %C = cast ubyte %B to bool ; === A != -b
- ret bool %C
+ %c = cast ubyte %B to bool ; === A != -b
+ ret bool %c
}
+bool %test14(ubyte %A) {
+ %B = xor ubyte %A, 4
+ %c = cast ubyte %B to bool
+ ret bool %c
+}