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(ptr nocapture %s) nounwind {
6 ; CHECK: ## %bb.0: ## %entry
7 ; CHECK-NEXT: subl $16, %esp
8 ; CHECK-NEXT: pushl $188
10 ; CHECK-NEXT: pushl %ecx
11 ; CHECK-NEXT: calll _memset
12 ; CHECK-NEXT: addl $16, %esp
15 call void @llvm.memset.p0.i32(ptr %s, i8 0, i32 188, i1 false)
19 define fastcc void @t2(ptr nocapture %s, i8 signext %c) nounwind {
21 ; CHECK: ## %bb.0: ## %entry
22 ; CHECK-NEXT: subl $16, %esp
23 ; CHECK-NEXT: pushl $76
24 ; CHECK-NEXT: pushl %edx
25 ; CHECK-NEXT: pushl %ecx
26 ; CHECK-NEXT: calll _memset
27 ; CHECK-NEXT: addl $16, %esp
30 call void @llvm.memset.p0.i32(ptr %s, i8 %c, i32 76, i1 false)
34 declare void @llvm.memset.p0.i32(ptr nocapture, i8, i32, i1) nounwind
36 define void @t3(ptr nocapture %s, i8 %a) nounwind {
38 ; CHECK: ## %bb.0: ## %entry
39 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
40 ; CHECK-NEXT: movzbl {{[0-9]+}}(%esp), %ecx
41 ; CHECK-NEXT: imull $16843009, %ecx, %ecx ## imm = 0x1010101
42 ; CHECK-NEXT: movl %ecx, 4(%eax)
43 ; CHECK-NEXT: movl %ecx, (%eax)
46 tail call void @llvm.memset.p0.i32(ptr %s, i8 %a, i32 8, i1 false)
50 define void @t4(ptr nocapture %s, i8 %a) nounwind {
52 ; CHECK: ## %bb.0: ## %entry
53 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
54 ; CHECK-NEXT: movzbl {{[0-9]+}}(%esp), %ecx
55 ; CHECK-NEXT: imull $16843009, %ecx, %ecx ## imm = 0x1010101
56 ; CHECK-NEXT: movl %ecx, 11(%eax)
57 ; CHECK-NEXT: movl %ecx, 8(%eax)
58 ; CHECK-NEXT: movl %ecx, 4(%eax)
59 ; CHECK-NEXT: movl %ecx, (%eax)
62 tail call void @llvm.memset.p0.i32(ptr %s, i8 %a, i32 15, i1 false)