mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
7bfde8133e
Under normal circumstances, use of CR bits is disabled when running at -O0, but it is enabled by default otherwise, and if you have optnone functions, they'll still generally be generated with crbits turned on (because nothing else turns them off). FastISel can't handle most things dealing with i1 values when using CR bits, and checks for that, but was not checking the return type on functions; we can't fast-isel function calls with i1 return values either when using CR bits for boolean values. Fixes PR22664. llvm-svn: 233775
38 lines
541 B
LLVM
38 lines
541 B
LLVM
; RUN: llc < %s | FileCheck %s
|
|
target datalayout = "E-m:e-i64:64-n32:64"
|
|
target triple = "powerpc64-bgq-linux"
|
|
|
|
declare zeroext i1 @ri1()
|
|
declare void @se1()
|
|
declare void @se2()
|
|
|
|
define void @test() #0 {
|
|
entry:
|
|
%b = call zeroext i1 @ri1()
|
|
br label %next
|
|
|
|
; CHECK-LABEL: @test
|
|
; CHECK: bl ri1
|
|
; CHECK-NEXT: nop
|
|
; CHECK: andi. 3, 3, 1
|
|
|
|
next:
|
|
br i1 %b, label %case1, label %case2
|
|
|
|
case1:
|
|
call void @se1()
|
|
br label %end
|
|
|
|
case2:
|
|
call void @se2()
|
|
br label %end
|
|
|
|
end:
|
|
ret void
|
|
|
|
; CHECK: blr
|
|
}
|
|
|
|
attributes #0 = { noinline optnone }
|
|
|