• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Test that llvm-reduce inserts valid return instructions for functions with
2; on-void return types.
3;
4; RUN: llvm-reduce --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
5; RUN: cat %t | FileCheck %s
6
7; CHECK-INTERESTINGNESS: interesting:
8; CHECK-INTERESTINGNESS: interesting2:
9
10define i32 @main(i1 %c) {
11; CHECK-LABEL: define i32 @main() {
12; CHECK-LABEL: interesting:
13; CHECK-NEXT:    br label %interesting2
14
15; CHECK-LABEL: interesting2:
16; CHECK-NEXT:    ret i32 undef
17
18interesting:
19  br label %interesting2
20
21interesting2:
22  br i1 true, label %uninteresting1, label %uninteresting
23
24uninteresting:
25  br label %uninteresting1
26
27uninteresting1:
28  ret i32 10
29}
30