1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=i386-apple-darwin9 -mcpu=yonah < %s | FileCheck %s
4 define fastcc void @t1() nounwind {
6 ; CHECK: ## %bb.0: ## %entry
7 ; CHECK-NEXT: subl $16, %esp
8 ; CHECK-NEXT: pushl $188
10 ; CHECK-NEXT: pushl $0
11 ; CHECK-NEXT: calll _memset
12 ; CHECK-NEXT: addl $16, %esp
15 call void @llvm.memset.p0i8.i32(i8* null, i8 0, i32 188, i1 false)
19 define fastcc void @t2(i8 signext %c) nounwind {
21 ; CHECK: ## %bb.0: ## %entry
22 ; CHECK-NEXT: subl $12, %esp
23 ; CHECK-NEXT: movl %ecx, {{[0-9]+}}(%esp)
24 ; CHECK-NEXT: movl $76, {{[0-9]+}}(%esp)
25 ; CHECK-NEXT: calll _memset
28 call void @llvm.memset.p0i8.i32(i8* undef, i8 %c, i32 76, i1 false)
32 declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i1) nounwind
34 define void @t3(i8* nocapture %s, i8 %a) nounwind {
36 ; CHECK: ## %bb.0: ## %entry
37 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
38 ; CHECK-NEXT: movzbl {{[0-9]+}}(%esp), %ecx
39 ; CHECK-NEXT: imull $16843009, %ecx, %ecx ## imm = 0x1010101
40 ; CHECK-NEXT: movl %ecx, 4(%eax)
41 ; CHECK-NEXT: movl %ecx, (%eax)
44 tail call void @llvm.memset.p0i8.i32(i8* %s, i8 %a, i32 8, i1 false)
48 define void @t4(i8* nocapture %s, i8 %a) nounwind {
50 ; CHECK: ## %bb.0: ## %entry
51 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
52 ; CHECK-NEXT: movzbl {{[0-9]+}}(%esp), %ecx
53 ; CHECK-NEXT: imull $16843009, %ecx, %ecx ## imm = 0x1010101
54 ; CHECK-NEXT: movl %ecx, 11(%eax)
55 ; CHECK-NEXT: movl %ecx, 8(%eax)
56 ; CHECK-NEXT: movl %ecx, 4(%eax)
57 ; CHECK-NEXT: movl %ecx, (%eax)
60 tail call void @llvm.memset.p0i8.i32(i8* %s, i8 %a, i32 15, i1 false)