1 ; RUN: llvm-as < %s | llc -march=x86-64 | grep {movzbl %\[abcd\]h,} | count 7
3 ; Use h-register extract and zero-extend.
5 define double @foo8(double* nocapture inreg %p, i64 inreg %x) nounwind readonly {
8 %t2 = getelementptr double* %p, i64 %t1
9 %t3 = load double* %t2, align 8
12 define float @foo4(float* nocapture inreg %p, i64 inreg %x) nounwind readonly {
14 %t1 = and i64 %t0, 255
15 %t2 = getelementptr float* %p, i64 %t1
16 %t3 = load float* %t2, align 8
19 define i16 @foo2(i16* nocapture inreg %p, i64 inreg %x) nounwind readonly {
21 %t1 = and i64 %t0, 255
22 %t2 = getelementptr i16* %p, i64 %t1
23 %t3 = load i16* %t2, align 8
26 define i8 @foo1(i8* nocapture inreg %p, i64 inreg %x) nounwind readonly {
28 %t1 = and i64 %t0, 255
29 %t2 = getelementptr i8* %p, i64 %t1
30 %t3 = load i8* %t2, align 8
33 define i8 @bar8(i8* nocapture inreg %p, i64 inreg %x) nounwind readonly {
35 %t1 = and i64 %t0, 2040
36 %t2 = getelementptr i8* %p, i64 %t1
37 %t3 = load i8* %t2, align 8
40 define i8 @bar4(i8* nocapture inreg %p, i64 inreg %x) nounwind readonly {
42 %t1 = and i64 %t0, 1020
43 %t2 = getelementptr i8* %p, i64 %t1
44 %t3 = load i8* %t2, align 8
47 define i8 @bar2(i8* nocapture inreg %p, i64 inreg %x) nounwind readonly {
49 %t1 = and i64 %t0, 510
50 %t2 = getelementptr i8* %p, i64 %t1
51 %t3 = load i8* %t2, align 8