1 ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X64 2 ; X64: mov 3 ; X64-NEXT: movb %ah, (%rsi) 4 ; X64: mov 5 ; X64-NEXT: movb %ah, (%rsi) 6 ; X64: mov 7 ; X64-NEXT: movb %ah, (%rsi) 8 ; X64-NOT: mov 9 10 ; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -check-prefix=W64 11 ; W64-NOT: mov 12 ; W64: movb %ch, (%rdx) 13 ; W64-NOT: mov 14 ; W64: movb %ch, (%rdx) 15 ; W64-NOT: mov 16 ; W64: movb %ch, (%rdx) 17 ; W64-NOT: mov 18 19 ; RUN: llc < %s -march=x86 | FileCheck %s -check-prefix=X32 20 ; X32-NOT: mov 21 ; X32: movb %ah, (%e 22 ; X32-NOT: mov 23 ; X32: movb %ah, (%e 24 ; X32-NOT: mov 25 ; X32: movb %ah, (%e 26 ; X32-NOT: mov 27 28 ; Use h-register extract and store. 29 30 define void @foo16(i16 inreg %p, i8* inreg %z) nounwind { 31 %q = lshr i16 %p, 8 32 %t = trunc i16 %q to i8 33 store i8 %t, i8* %z 34 ret void 35 } 36 define void @foo32(i32 inreg %p, i8* inreg %z) nounwind { 37 %q = lshr i32 %p, 8 38 %t = trunc i32 %q to i8 39 store i8 %t, i8* %z 40 ret void 41 } 42 define void @foo64(i64 inreg %p, i8* inreg %z) nounwind { 43 %q = lshr i64 %p, 8 44 %t = trunc i64 %q to i8 45 store i8 %t, i8* %z 46 ret void 47 } 48