mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
7c5464a31a
Reviewers: sebpop, uabelho, fhahn Reviewed by: fhahn Differential Revision: https://reviews.llvm.org/D85881
33 lines
511 B
LLVM
33 lines
511 B
LLVM
; RUN: opt < %s -gvn-hoist -S | FileCheck %s
|
|
|
|
; gvn-hoist shouldn't crash in this case.
|
|
; CHECK-LABEL: @func(i1 %b)
|
|
; CHECK: entry:
|
|
; CHECK-NEXT: br i1
|
|
; CHECK: bb1:
|
|
; CHECK-NEXT: ret void
|
|
; CHECK: bb2:
|
|
; CHECK-NEXT: call
|
|
; CHECK-NEXT: call
|
|
; CHECK-NEXT: ret void
|
|
|
|
define void @v_1_0() #0 {
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
define void @func(i1 %b) {
|
|
entry:
|
|
br i1 %b, label %bb1, label %bb2
|
|
|
|
bb1:
|
|
ret void
|
|
|
|
bb2:
|
|
call void @v_1_0()
|
|
call void @v_1_0()
|
|
ret void
|
|
}
|
|
|
|
attributes #0 = { nounwind readonly }
|