49 lines · plain
1; RUN: llc %s -mtriple=i386-pc-linux -o - | FileCheck %s 2; RUN: llc %s -mtriple=i386-pc-win32 -o - | FileCheck -check-prefix=WIN %s3; 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 %s5 6 7 8target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"9target triple = "i386-unknown-linux-gnu"10 11; Function Attrs: argmemonly nounwind12declare void @llvm.memcpy.p0.p0.i32(ptr nocapture writeonly, ptr nocapture readonly, i32, i1) #113 14define void @use_memset(ptr inreg nocapture %dest, i8 inreg %c, i32 inreg %n) local_unnamed_addr #0 {15entry:16;CHECK-LABEL: @use_memset17;CHECK-NOT: push18;CHECK: jmp memset19;CHECK-NOT: retl20;WIN-LABEL: @use_memset21;WIN-NOT: push22;WIN: jmp _memset23;WIN-NOT: retl24;FAST-LABEL: @use_memset25;FAST: subl $12, %esp26;FAST-NEXT: movzbl %dl, %edx27;FAST-NEXT: calll memset28;FAST-NEXT: addl $12, %esp29;FASTWIN-LABEL: @use_memset30;FASTWIN: movzbl %dl, %edx31;FASTWIN-NEXT: calll _memset32;FASTWIN-NEXT: retl33 tail call void @llvm.memset.p0.i32(ptr %dest, i8 %c, i32 %n, i1 false)34 ret void35}36 37; Function Attrs: argmemonly nounwind38declare void @llvm.memset.p0.i32(ptr nocapture writeonly, i8, i32, i1) #139 40 41attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "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" "use-soft-float"="false" }42attributes #1 = { argmemonly nounwind }43 44!llvm.module.flags = !{!0}45!llvm.ident = !{!1}46 47!0 = !{i32 1, !"NumRegisterParameters", i32 3}48!1 = !{!"clang version 4.0.0 (trunk 288025) (llvm/trunk 288033)"}49