aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Transforms/InstCombine/select.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/select.ll b/test/Transforms/InstCombine/select.ll
index d635ffd8b5..6a7ff1a6ad 100644
--- a/test/Transforms/InstCombine/select.ll
+++ b/test/Transforms/InstCombine/select.ll
@@ -15,4 +15,23 @@ int %test2(int %A, int %B) {
ret int %C
}
+int %test3(bool %C, int %I) {
+ %V = select bool %C, int %I, int %I ; V = I
+ ret int %V
+}
+
+bool %test4(bool %C) {
+ %V = select bool %C, bool true, bool false ; V = C
+ ret bool %V
+}
+
+bool %test5(bool %C) {
+ %V = select bool %C, bool false, bool true ; V = !C
+ ret bool %V
+}
+
+int %test6(bool %C) {
+ %V = select bool %C, int 1, int 0 ; V = cast C to int
+ ret int %V
+}