aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/Transforms/InstCombine/div.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/div.ll b/test/Transforms/InstCombine/div.ll
index 19e0d40..8e03fc0 100644
--- a/test/Transforms/InstCombine/div.ll
+++ b/test/Transforms/InstCombine/div.ll
@@ -30,3 +30,28 @@ uint %test5(uint %A) {
%C = div uint %B, 4294967292
ret uint %C
}
+
+bool %test6(uint %A) {
+ %B = div uint %A, 123
+ %C = seteq uint %B, 0 ; A < 123
+ ret bool %C
+}
+
+bool %test7(uint %A) {
+ %B = div uint %A, 10
+ %C = seteq uint %B, 2 ; A >= 20 && A < 30
+ ret bool %C
+}
+
+bool %test8(ubyte %A) {
+ %B = div ubyte %A, 123
+ %C = seteq ubyte %B, 2 ; A >= 246
+ ret bool %C
+}
+
+bool %test9(ubyte %A) {
+ %B = div ubyte %A, 123
+ %C = setne ubyte %B, 2 ; A < 246
+ ret bool %C
+}
+