2007-04-15 09:21:47 +00:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \
|
|
|
|
; RUN: not grep select
|
2004-10-14 05:12:50 +00:00
|
|
|
|
|
|
|
;; The PHI node in this example should not be turned into a select, as we are
|
|
|
|
;; not able to ifcvt the entire block. As such, converting to a select just
|
|
|
|
;; introduces inefficiency without saving copies.
|
|
|
|
|
|
|
|
int %bar(bool %C) {
|
|
|
|
entry:
|
|
|
|
br bool %C, label %then, label %endif
|
|
|
|
|
|
|
|
then:
|
|
|
|
%tmp.3 = call int %qux()
|
|
|
|
br label %endif
|
|
|
|
|
|
|
|
endif:
|
|
|
|
%R = phi int [123, %entry], [12312, %then]
|
|
|
|
;; stuff to disable tail duplication
|
|
|
|
call int %qux()
|
|
|
|
call int %qux()
|
|
|
|
call int %qux()
|
|
|
|
call int %qux()
|
|
|
|
call int %qux()
|
|
|
|
call int %qux()
|
|
|
|
call int %qux()
|
|
|
|
ret int %R
|
|
|
|
}
|
|
|
|
|
|
|
|
declare int %qux()
|
|
|
|
|