1; RUN: opt < %s -inline -S | FileCheck %s 2; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s 3; PR1335 4 5target triple = "i686-pc-linux-gnu" 6 7declare i32 @__gxx_personality_v0(...) 8 9declare void @a() 10 11declare void @b() 12 13declare void @c() 14 15define void @f() { 16; CHECK-LABEL: define void @f() 17entry: 18 call void asm "rdtsc\0A\09movl %eax, $0\0A\09movl %edx, $1", "=*imr,=*imr,~{dirflag},~{fpsr},~{flags},~{dx},~{ax}"( i32* null, i32* null ) nounwind 19; CHECK: call void asm 20 unreachable 21} 22 23define void @g() personality i32 (...)* @__gxx_personality_v0 { 24; CHECK-LABEL: define void @g() personality i32 (...)* @__gxx_personality_v0 25entry: 26 invoke void @a() to label %invcont1 unwind label %cleanup 27; CHECK-NOT: {{call|invoke}} 28; CHECK: invoke void @a() 29 30invcont1: 31 invoke void @b() to label %invcont2 unwind label %cleanup 32; CHECK-NOT: {{call|invoke}} 33; CHECK: invoke void @b() 34 35invcont2: 36 invoke void @c() to label %invcont3 unwind label %cleanup 37; CHECK-NOT: {{call|invoke}} 38; CHECK: invoke void @c() 39 40invcont3: 41 invoke void @f() to label %invcont4 unwind label %cleanup 42; CHECK-NOT: {{call|invoke}} 43; CHECK: call void asm 44; CHECK-NOT: {{call|invoke}} 45 46invcont4: 47 ret void 48 49cleanup: 50 %ex = landingpad {i8*, i32} cleanup 51 resume { i8*, i32 } %ex 52} 53 54define void @h() { 55; CHECK-LABEL: define void @h() personality i32 (...)* @__gxx_personality_v0 56entry: 57 call void @g() 58; CHECK-NOT: {{call|invoke}} 59; CHECK: invoke void @a() 60; CHECK-NOT: {{call|invoke}} 61; CHECK: invoke void @b() 62; CHECK-NOT: {{call|invoke}} 63; CHECK: invoke void @c() 64; CHECK-NOT: {{call|invoke}} 65; CHECK: call void asm 66; CHECK-NOT: {{call|invoke}} 67 68 ret void 69} 70