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 | 6d0996866c3beab23a4b0036fc13c2ed057a4570 (patch) | |
tree | a72ceabd7c2acc36128e576556160e2b8019f12e | |
parent | 6f2ab04e91b191e4631bc8c6a526dcb78c439e8a (diff) | |
download | external_llvm-6d0996866c3beab23a4b0036fc13c2ed057a4570.zip external_llvm-6d0996866c3beab23a4b0036fc13c2ed057a4570.tar.gz external_llvm-6d0996866c3beab23a4b0036fc13c2ed057a4570.tar.bz2 |
Add some testcases for select simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12543 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Transforms/InstCombine/select.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/select.ll b/test/Transforms/InstCombine/select.ll index d635ffd..6a7ff1a 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 +} |