1 ; RUN: llc < %s | grep "movl.*%ebx, 8(%esi)" 2 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" 3 target triple = "i386-apple-darwin9.0" 4 5 define void @cpuid(i32* %data) nounwind { 6 entry: 7 %arrayidx = getelementptr i32* %data, i32 1 ; <i32*> [#uses=1] 8 %arrayidx2 = getelementptr i32* %data, i32 2 ; <i32*> [#uses=1] 9 %arrayidx4 = getelementptr i32* %data, i32 3 ; <i32*> [#uses=1] 10 %arrayidx6 = getelementptr i32* %data, i32 4 ; <i32*> [#uses=1] 11 %arrayidx8 = getelementptr i32* %data, i32 5 ; <i32*> [#uses=1] 12 %tmp9 = load i32* %arrayidx8 ; <i32> [#uses=1] 13 %arrayidx11 = getelementptr i32* %data, i32 6 ; <i32*> [#uses=1] 14 %tmp12 = load i32* %arrayidx11 ; <i32> [#uses=1] 15 %arrayidx14 = getelementptr i32* %data, i32 7 ; <i32*> [#uses=1] 16 %tmp15 = load i32* %arrayidx14 ; <i32> [#uses=1] 17 %arrayidx17 = getelementptr i32* %data, i32 8 ; <i32*> [#uses=1] 18 %tmp18 = load i32* %arrayidx17 ; <i32> [#uses=1] 19 %0 = call i32 asm "cpuid", "={ax},=*{bx},=*{cx},=*{dx},{ax},{bx},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i32* %arrayidx2, i32* %arrayidx4, i32* %arrayidx6, i32 %tmp9, i32 %tmp12, i32 %tmp15, i32 %tmp18) nounwind ; <i32> [#uses=1] 20 store i32 %0, i32* %arrayidx 21 ret void 22 } 23