Home | History | Annotate | Download | only in Inline
      1 ; RUN: opt < %s -inline -S | not grep "tail call void @llvm.memcpy.p0i8.p0i8.i32"
      2 ; PR3550
      3 
      4 define internal void @foo(i32* %p, i32* %q) {
      5 ; CHECK-NOT: @foo
      6 entry:
      7   %pp = bitcast i32* %p to i8*
      8   %qq = bitcast i32* %q to i8*
      9   tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %pp, i8* %qq, i32 4, i1 false)
     10   ret void
     11 }
     12 
     13 define i32 @main() personality i32 (...)* @__gxx_personality_v0 {
     14 ; CHECK-LABEL: define i32 @main() personality i32 (...)* @__gxx_personality_v0
     15 entry:
     16   %a = alloca i32
     17   %b = alloca i32
     18   store i32 1, i32* %a, align 4
     19   store i32 0, i32* %b, align 4
     20   invoke void @foo(i32* %a, i32* %b)
     21       to label %invcont unwind label %lpad
     22 ; CHECK-NOT: invoke
     23 ; CHECK-NOT: @foo
     24 ; CHECK-NOT: tail
     25 ; CHECK: call void @llvm.memcpy.p0i8.p0i8.i32
     26 ; CHECK: br
     27 
     28 invcont:
     29   %retval = load i32, i32* %a, align 4
     30   ret i32 %retval
     31 
     32 lpad:
     33   %exn = landingpad {i8*, i32}
     34          catch i8* null
     35   unreachable
     36 }
     37 
     38 declare i32 @__gxx_personality_v0(...)
     39 
     40 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind
     41