1 ; RUN: llc < %s -mtriple=x86_64-- -mattr=-bmi | FileCheck %s
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, double* %p, i64 %t1
9 %t3 = load double, double* %t2, align 8
13 ; CHECK: movzbl %{{[abcd]}}h, %e
15 define float @foo4(float* nocapture inreg %p, i64 inreg %x) nounwind readonly {
17 %t1 = and i64 %t0, 255
18 %t2 = getelementptr float, float* %p, i64 %t1
19 %t3 = load float, float* %t2, align 8
23 ; CHECK: movzbl %{{[abcd]}}h, %e
25 define i16 @foo2(i16* nocapture inreg %p, i64 inreg %x) nounwind readonly {
27 %t1 = and i64 %t0, 255
28 %t2 = getelementptr i16, i16* %p, i64 %t1
29 %t3 = load i16, i16* %t2, align 8
33 ; CHECK: movzbl %{{[abcd]}}h, %e
35 define i8 @foo1(i8* nocapture inreg %p, i64 inreg %x) nounwind readonly {
37 %t1 = and i64 %t0, 255
38 %t2 = getelementptr i8, i8* %p, i64 %t1
39 %t3 = load i8, i8* %t2, align 8
43 ; CHECK: movzbl %{{[abcd]}}h, %e
45 define i8 @bar8(i8* nocapture inreg %p, i64 inreg %x) nounwind readonly {
47 %t1 = and i64 %t0, 2040
48 %t2 = getelementptr i8, i8* %p, i64 %t1
49 %t3 = load i8, i8* %t2, align 8
53 ; CHECK: movzbl %{{[abcd]}}h, %e
55 define i8 @bar4(i8* nocapture inreg %p, i64 inreg %x) nounwind readonly {
57 %t1 = and i64 %t0, 1020
58 %t2 = getelementptr i8, i8* %p, i64 %t1
59 %t3 = load i8, i8* %t2, align 8
63 ; CHECK: movzbl %{{[abcd]}}h, %e
65 define i8 @bar2(i8* nocapture inreg %p, i64 inreg %x) nounwind readonly {
67 %t1 = and i64 %t0, 510
68 %t2 = getelementptr i8, i8* %p, i64 %t1
69 %t3 = load i8, i8* %t2, align 8
73 ; CHECK: movzbl %{{[abcd]}}h, %e