aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Transforms/InstCombine/cast.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll
index ac92b959ef..2ef6240a75 100644
--- a/test/Transforms/InstCombine/cast.ll
+++ b/test/Transforms/InstCombine/cast.ll
@@ -68,3 +68,16 @@ short %test10(short %A) {
%c2 = cast uint %c1 to short
ret short %c2
}
+
+bool %test11(ubyte %A, ubyte %B) {
+ %C = sub ubyte %A, %B
+ %D = cast ubyte %C to bool ; == setne A, B
+ ret bool %D
+}
+
+bool %test12(ubyte %A) {
+ %B = add ubyte %A, 255
+ %C = cast ubyte %B to bool ; === A != 1
+ ret bool %C
+}
+