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