1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
4 define i8 @t1(i8* %X, i64 %i) {
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: andq $-255, %rsi
8 ; CHECK-NEXT: movb (%rdi,%rsi,4), %al
13 %tmp4 = and i64 %tmp2, -1020
14 %tmp7 = getelementptr i8, i8* %X, i64 %tmp4
15 %tmp9 = load i8, i8* %tmp7
19 define i8 @t2(i8* %X, i64 %i) {
21 ; CHECK: # %bb.0: # %entry
22 ; CHECK-NEXT: andq $-14, %rsi
23 ; CHECK-NEXT: movb (%rdi,%rsi,4), %al
28 %tmp4 = and i64 %tmp2, -56
29 %tmp7 = getelementptr i8, i8* %X, i64 %tmp4
30 %tmp9 = load i8, i8* %tmp7
34 define i8 @t3(i8* %X, i64 %i) {
36 ; CHECK: # %bb.0: # %entry
37 ; CHECK-NEXT: movl %esi, %eax
38 ; CHECK-NEXT: movb (%rdi,%rax,4), %al
43 %tmp4 = and i64 %tmp2, 17179869180
44 %tmp7 = getelementptr i8, i8* %X, i64 %tmp4
45 %tmp9 = load i8, i8* %tmp7
49 define i8 @t4(i8* %X, i64 %i) {
51 ; CHECK: # %bb.0: # %entry
52 ; CHECK-NEXT: andl $-2, %esi
53 ; CHECK-NEXT: movb (%rdi,%rsi,4), %al
58 %tmp4 = and i64 %tmp2, 17179869176
59 %tmp7 = getelementptr i8, i8* %X, i64 %tmp4
60 %tmp9 = load i8, i8* %tmp7
64 define i8 @t5(i8* %X, i64 %i) {
66 ; CHECK: # %bb.0: # %entry
67 ; CHECK-NEXT: andl $-250002, %esi # imm = 0xFFFC2F6E
68 ; CHECK-NEXT: movb (%rdi,%rsi,4), %al
73 %tmp4 = and i64 %tmp2, 17178869176
74 %tmp7 = getelementptr i8, i8* %X, i64 %tmp4
75 %tmp9 = load i8, i8* %tmp7
79 define i8 @t6(i8* %X, i32 %i) {
81 ; CHECK: # %bb.0: # %entry
82 ; CHECK-NEXT: # kill: def $esi killed $esi def $rsi
83 ; CHECK-NEXT: andl $15, %esi
84 ; CHECK-NEXT: movb (%rdi,%rsi,4), %al
88 %tmp3 = zext i32 %tmp2 to i64
89 %tmp4 = and i64 %tmp3, 60
90 %tmp7 = getelementptr i8, i8* %X, i64 %tmp4
91 %tmp9 = load i8, i8* %tmp7