1 ; RUN: llc -mtriple=i386-apple-darwin -mcpu=yonah < %s | FileCheck %s 2 3 declare void @llvm.memset.i32(i8*, i8, i32, i32) nounwind 4 5 define fastcc void @t1() nounwind { 6 entry: 7 ; CHECK: t1: 8 ; CHECK: calll _memset 9 call void @llvm.memset.p0i8.i32(i8* null, i8 0, i32 188, i32 1, i1 false) 10 unreachable 11 } 12 13 define fastcc void @t2(i8 signext %c) nounwind { 14 entry: 15 ; CHECK: t2: 16 ; CHECK: calll _memset 17 call void @llvm.memset.p0i8.i32(i8* undef, i8 %c, i32 76, i32 1, i1 false) 18 unreachable 19 } 20 21 declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind 22 23 define void @t3(i8* nocapture %s, i8 %a) nounwind { 24 entry: 25 tail call void @llvm.memset.p0i8.i32(i8* %s, i8 %a, i32 8, i32 1, i1 false) 26 ret void 27 ; CHECK: t3: 28 ; CHECK: imull $16843009 29 } 30 31 define void @t4(i8* nocapture %s, i8 %a) nounwind { 32 entry: 33 tail call void @llvm.memset.p0i8.i32(i8* %s, i8 %a, i32 15, i32 1, i1 false) 34 ret void 35 ; CHECK: t4: 36 ; CHECK: imull $16843009 37 ; CHECK-NOT: imul 38 ; CHECK: ret 39 } 40