Add some testcases for select simplification

llvm-svn: 12543
This commit is contained in:
Chris Lattner 2004-03-30 19:36:54 +00:00
parent 0048e574fb
commit b785d280ec
1 changed files with 19 additions and 0 deletions

View File

@ -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
}