1 ; RUN: llc < %s -mtriple=i386-apple-macosx | FileCheck %s --check-prefix=X32
2 ; RUN: llc < %s -mtriple=x86_64-apple-macosx | FileCheck %s --check-prefix=X64
4 define i32 @t1(i32 %t, i32 %val) nounwind {
12 %shamt = and i32 %t, 31
13 %res = shl i32 %val, %shamt
17 define i32 @t2(i32 %t, i32 %val) nounwind {
25 %shamt = and i32 %t, 63
26 %res = shl i32 %val, %shamt
30 @X = internal global i16 0
32 define void @t3(i16 %t) nounwind {
40 %shamt = and i16 %t, 31
41 %tmp = load i16, i16* @X
42 %tmp1 = ashr i16 %tmp, %shamt
43 store i16 %tmp1, i16* @X
47 define i64 @t4(i64 %t, i64 %val) nounwind {
51 %shamt = and i64 %t, 63
52 %res = lshr i64 %val, %shamt
56 define i64 @t5(i64 %t, i64 %val) nounwind {
60 %shamt = and i64 %t, 191
61 %res = lshr i64 %val, %shamt
67 define i64 @t6(i64 %key, i64* nocapture %val) nounwind {
73 %shr = lshr i64 %key, 3
74 %0 = load i64, i64* %val, align 8
75 %sub = add i64 %0, 2305843009213693951
76 %and = and i64 %sub, %shr