diff options
author | Chris Lattner <sabre@nondot.org> | 2004-03-12 06:01:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-03-12 06:01:00 +0000 |
commit | f820e3b4b85a1c9c7c7cf00408656901b90a3f54 (patch) | |
tree | 121735ab11ae68e75fb6711c670296348308c76b | |
parent | ffb33a157424271b4c068ad9013a60fe1629d824 (diff) |
test instruction combiner opts for select instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12328 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Transforms/InstCombine/select.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/select.ll b/test/Transforms/InstCombine/select.ll new file mode 100644 index 0000000000..d635ffd8b5 --- /dev/null +++ b/test/Transforms/InstCombine/select.ll @@ -0,0 +1,18 @@ +; This test makes sure that these instructions are properly eliminated. +; + +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep select + +implementation + +int %test1(int %A, int %B) { + %C = select bool false, int %A, int %B + ret int %C +} + +int %test2(int %A, int %B) { + %C = select bool true, int %A, int %B + ret int %C +} + + |