mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
7ff25998ae
... for the general case of returning a value.
22 lines
530 B
LLVM
22 lines
530 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -simplifycfg-dup-ret -S | FileCheck %s
|
|
|
|
declare void @bar()
|
|
declare void @baz()
|
|
|
|
define i8 @foo(i1 %c, i8 %v0, i8 %v1) {
|
|
; CHECK-LABEL: @foo(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[SPEC_SELECT:%.*]] = select i1 [[C:%.*]], i8 [[V0:%.*]], i8 [[V1:%.*]]
|
|
; CHECK-NEXT: ret i8 [[SPEC_SELECT]]
|
|
;
|
|
entry:
|
|
br i1 %c, label %true, label %false
|
|
|
|
true:
|
|
ret i8 %v0
|
|
|
|
false:
|
|
ret i8 %v1
|
|
}
|