diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-03-30 19:36:54 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-03-30 19:36:54 +0000 |
| commit | b785d280ec5a548f94f3ab9f64733358fa70b2d8 (patch) | |
| tree | 3abdaab7c8f4b27f730e27957aa01d070f8c5f66 /llvm/test/Regression/Transforms/InstCombine/select.ll | |
| parent | 0048e574fb94c898affb7f9787751fc870d1a79d (diff) | |
| download | bcm5719-llvm-b785d280ec5a548f94f3ab9f64733358fa70b2d8.tar.gz bcm5719-llvm-b785d280ec5a548f94f3ab9f64733358fa70b2d8.zip | |
Add some testcases for select simplification
llvm-svn: 12543
Diffstat (limited to 'llvm/test/Regression/Transforms/InstCombine/select.ll')
| -rw-r--r-- | llvm/test/Regression/Transforms/InstCombine/select.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/InstCombine/select.ll b/llvm/test/Regression/Transforms/InstCombine/select.ll index d635ffd8b5a..6a7ff1a6adb 100644 --- a/llvm/test/Regression/Transforms/InstCombine/select.ll +++ b/llvm/test/Regression/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 +} |

