blob: 5c4ebb27dde40cad6e2e7269e3ea999f1827d4f9 [file] [log] [blame]
Akira Hatanaka1daf8c22012-06-13 19:33:32 +00001; RUN: llc -march=mipsel < %s | FileCheck %s
2
3%struct.S1 = type { i32, [41 x i8] }
4
5@.str = private unnamed_addr constant [31 x i8] c"abcdefghijklmnopqrstuvwxyzABCD\00", align 1
6
7define void @foo1(%struct.S1* %s1, i8 signext %n) nounwind {
8entry:
9; CHECK-NOT: call16(memcpy
10
David Blaikie79e6c742015-02-27 19:29:02 +000011 %arraydecay = getelementptr inbounds %struct.S1, %struct.S1* %s1, i32 0, i32 1, i32 0
Pete Cooper67cf9a72015-11-19 05:56:52 +000012 tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %arraydecay, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i32 0, i32 0), i32 31, i32 1, i1 false)
David Blaikie79e6c742015-02-27 19:29:02 +000013 %arrayidx = getelementptr inbounds %struct.S1, %struct.S1* %s1, i32 0, i32 1, i32 40
Akira Hatanaka1daf8c22012-06-13 19:33:32 +000014 store i8 %n, i8* %arrayidx, align 1
15 ret void
16}
17
Pete Cooper67cf9a72015-11-19 05:56:52 +000018declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
Akira Hatanaka1daf8c22012-06-13 19:33:32 +000019