1 ; RUN: llc %s -mtriple=i386-pc-linux -o - | FileCheck %s
2 ; RUN: llc %s -mtriple=i386-pc-win32 -o - | FileCheck -check-prefix=WIN %s
3 ; RUN: llc %s -mtriple=i386-pc-linux -fast-isel -o - | FileCheck -check-prefix=FAST %s
4 ; RUN: llc %s -mtriple=i386-pc-win32 -fast-isel -o - | FileCheck -check-prefix=FASTWIN %s
8 target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
9 target triple = "i386-unknown-linux-gnu"
11 ; Function Attrs: argmemonly nounwind
12 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture writeonly, i8* nocapture readonly, i32, i1) #1
14 define void @use_memset(i8* inreg nocapture %dest, i8 inreg %c, i32 inreg %n) local_unnamed_addr #0 {
16 ;CHECK-LABEL: @use_memset
20 ;WIN-LABEL: @use_memset
24 ;FAST-LABEL: @use_memset
26 ;FAST-NEXT: movzbl %dl, %edx
27 ;FAST-NEXT: calll memset
28 ;FAST-NEXT: addl $12, %esp
29 ;FASTWIN-LABEL: @use_memset
30 ;FASTWIN: movzbl %dl, %edx
31 ;FASTWIN-NEXT: calll _memset
33 tail call void @llvm.memset.p0i8.i32(i8* %dest, i8 %c, i32 %n, i1 false)
37 ; Function Attrs: argmemonly nounwind
38 declare void @llvm.memset.p0i8.i32(i8* nocapture writeonly, i8, i32, i1) #1
41 attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="pentium4" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
42 attributes #1 = { argmemonly nounwind }
44 !llvm.module.flags = !{!0}
47 !0 = !{i32 1, !"NumRegisterParameters", i32 3}
48 !1 = !{!"clang version 4.0.0 (trunk 288025) (llvm/trunk 288033)"}