Home | History | Annotate | Download | only in Inline
      1 ; Test that the inliner can handle deleting functions within an SCC while still
      2 ; processing the calls in that SCC.
      3 ;
      4 ; RUN: opt < %s -S -inline | FileCheck %s
      5 ; RUN: opt < %s -S -passes=inline | FileCheck %s
      6 
      7 ; CHECK-LABEL: define internal void @test1_scc0()
      8 ; CHECK-NOT: call
      9 ; CHECK: call void @test1_scc0()
     10 ; CHECK-NOT: call
     11 ; CHECK: ret
     12 define internal void @test1_scc0() {
     13 entry:
     14   call void @test1_scc1()
     15   ret void
     16 }
     17 
     18 ; CHECK-NOT: @test1_scc1
     19 define internal void @test1_scc1() {
     20 entry:
     21   call void @test1_scc0()
     22   ret void
     23 }
     24 
     25 ; CHECK-LABEL: define void @test1()
     26 ; CHECK: call void @test1_scc0()
     27 define void @test1() {
     28 entry:
     29   call void @test1_scc0() noinline
     30   ret void
     31 }
     32