blob: 8eac7da7986b0602d350021634c7694eb81f774f [file] [log] [blame]
Dan Gohmanc1be92f2010-10-18 18:04:47 +00001; RUN: opt < %s -basicaa -memcpyopt -S | not grep {call.*memcpy}
Owen Anderson5aa4f2a2008-02-18 09:24:53 +00002
3target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
4target triple = "i686-apple-darwin9"
5
Chris Lattnerb85e4eb2011-06-18 06:05:24 +00006%0 = type { x86_fp80, x86_fp80 }
7
8define void @ccosl(%0* noalias sret %agg.result, %0* byval align 8 %z) nounwind {
Owen Anderson5aa4f2a2008-02-18 09:24:53 +00009entry:
Chris Lattnerb85e4eb2011-06-18 06:05:24 +000010 %iz = alloca %0
11 %memtmp = alloca %0, align 16
12 %tmp1 = getelementptr %0* %z, i32 0, i32 1
13 %tmp2 = load x86_fp80* %tmp1, align 16
14 %tmp3 = fsub x86_fp80 0xK80000000000000000000, %tmp2
15 %tmp4 = getelementptr %0* %iz, i32 0, i32 1
16 %real = getelementptr %0* %iz, i32 0, i32 0
17 %tmp7 = getelementptr %0* %z, i32 0, i32 0
18 %tmp8 = load x86_fp80* %tmp7, align 16
19 store x86_fp80 %tmp3, x86_fp80* %real, align 16
20 store x86_fp80 %tmp8, x86_fp80* %tmp4, align 16
21 call void @ccoshl(%0* noalias sret %memtmp, %0* byval align 8 %iz) nounwind
22 %memtmp14 = bitcast %0* %memtmp to i8*
23 %agg.result15 = bitcast %0* %agg.result to i8*
24 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %agg.result15, i8* %memtmp14, i32 32, i32 16, i1 false)
25 ret void
Owen Anderson5aa4f2a2008-02-18 09:24:53 +000026}
27
Chris Lattnerb85e4eb2011-06-18 06:05:24 +000028declare void @ccoshl(%0* noalias sret, %0* byval) nounwind
Owen Anderson5aa4f2a2008-02-18 09:24:53 +000029
Chris Lattnerb85e4eb2011-06-18 06:05:24 +000030declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind