test instruction combiner opts for select instruction

llvm-svn: 12328
This commit is contained in:
Chris Lattner 2004-03-12 06:01:00 +00:00
parent 8988f92470
commit fd747f8db8
1 changed files with 18 additions and 0 deletions

View File

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