summaryrefslogtreecommitdiff
path: root/test/Bitcode/memintrinsics.3.7.ll
blob: 242aad6dec9a8daf39addf8db233bbb5b54dee50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
; RUN:  llvm-dis < %s.bc| FileCheck %s

; memintrinsics.3.7.ll.bc was generated by passing this file to llvm-as-3.7.
; The test checks that LLVM does not misread memcpy/memmove/memset intrinsic functions
; of older bitcode files.

define void @memcpyintrinsic(i8* %dest, i8* %src, i32 %len) {
entry:

; CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %dest, i8* align 4 %src, i32 %len, i1 true)
  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 %len, i32 4, i1 true)
  ret void
}

define void @memmoveintrinsic(i8* %dest, i8* %src, i32 %len) {
entry:

; CHECK: call void @llvm.memmove.p0i8.p0i8.i32(i8* align 8 %dest, i8* align 8 %src, i32 %len, i1 true)
  call void @llvm.memmove.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 %len, i32 8, i1 true)
  ret void
}

define void @memsetintrinsic(i8* %dest, i8* %src, i32 %len) {
entry:

; CHECK: call void @llvm.memset.p0i8.i32(i8* align 16 %dest, i8 0, i32 %len, i1 true)
  call void @llvm.memset.p0i8.i32(i8* %dest, i8 0, i32 %len, i32 16, i1 true)
  ret void
}

declare void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 %len, i32 %align, i1 %isvolatile)
declare void @llvm.memmove.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 %len, i32 %align, i1 %isvolatile)
declare void @llvm.memset.p0i8.i32(i8* %dest, i8 %src, i32 %len, i32 %align, i1 %isvolatile)