1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- -mattr=-bmi | FileCheck %s
4 ; Use h-register extract and zero-extend.
6 define double @foo8(ptr nocapture inreg %p, i32 inreg %x) nounwind readonly {
9 ; CHECK-NEXT: movzbl %dh, %ecx
10 ; CHECK-NEXT: fldl (%eax,%ecx,8)
13 %t1 = and i32 %t0, 255
14 %t2 = getelementptr double, ptr %p, i32 %t1
15 %t3 = load double, ptr %t2, align 8
19 define float @foo4(ptr nocapture inreg %p, i32 inreg %x) nounwind readonly {
22 ; CHECK-NEXT: movzbl %dh, %ecx
23 ; CHECK-NEXT: flds (%eax,%ecx,4)
26 %t1 = and i32 %t0, 255
27 %t2 = getelementptr float, ptr %p, i32 %t1
28 %t3 = load float, ptr %t2, align 8
32 define i16 @foo2(ptr nocapture inreg %p, i32 inreg %x) nounwind readonly {
35 ; CHECK-NEXT: movzbl %dh, %ecx
36 ; CHECK-NEXT: movzwl (%eax,%ecx,2), %eax
39 %t1 = and i32 %t0, 255
40 %t2 = getelementptr i16, ptr %p, i32 %t1
41 %t3 = load i16, ptr %t2, align 8
45 define i8 @foo1(ptr nocapture inreg %p, i32 inreg %x) nounwind readonly {
48 ; CHECK-NEXT: movzbl %dh, %ecx
49 ; CHECK-NEXT: movzbl (%eax,%ecx), %eax
52 %t1 = and i32 %t0, 255
53 %t2 = getelementptr i8, ptr %p, i32 %t1
54 %t3 = load i8, ptr %t2, align 8
58 define i8 @bar8(ptr nocapture inreg %p, i32 inreg %x) nounwind readonly {
61 ; CHECK-NEXT: movzbl %dh, %ecx
62 ; CHECK-NEXT: movzbl (%eax,%ecx,8), %eax
65 %t1 = and i32 %t0, 2040
66 %t2 = getelementptr i8, ptr %p, i32 %t1
67 %t3 = load i8, ptr %t2, align 8
71 define i8 @bar4(ptr nocapture inreg %p, i32 inreg %x) nounwind readonly {
74 ; CHECK-NEXT: movzbl %dh, %ecx
75 ; CHECK-NEXT: movzbl (%eax,%ecx,4), %eax
78 %t1 = and i32 %t0, 1020
79 %t2 = getelementptr i8, ptr %p, i32 %t1
80 %t3 = load i8, ptr %t2, align 8
84 define i8 @bar2(ptr nocapture inreg %p, i32 inreg %x) nounwind readonly {
87 ; CHECK-NEXT: movzbl %dh, %ecx
88 ; CHECK-NEXT: movzbl (%eax,%ecx,2), %eax
91 %t1 = and i32 %t0, 510
92 %t2 = getelementptr i8, ptr %p, i32 %t1
93 %t3 = load i8, ptr %t2, align 8