1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -o - %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
4 %struct.sk_buff = type { i8* }
5 %struct.xt_action_param = type { i8*, i8*, i8*, i32, i32, i8 }
7 define i32 @ipt_do_table(%struct.sk_buff* noalias nocapture readonly) {
8 ; CHECK-LABEL: ipt_do_table:
10 ; CHECK-NEXT: subq $40, %rsp
11 ; CHECK-NEXT: .cfi_def_cfa_offset 48
12 ; CHECK-NEXT: movq (%rdi), %rax
13 ; CHECK-NEXT: xorps %xmm0, %xmm0
14 ; CHECK-NEXT: movaps %xmm0, {{[0-9]+}}(%rsp)
15 ; CHECK-NEXT: movq $170, {{[0-9]+}}(%rsp)
16 ; CHECK-NEXT: movaps {{.*#+}} xmm0 = [12297829382473034410,12297829382473034410]
17 ; CHECK-NEXT: movaps %xmm0, (%rsp)
18 ; CHECK-NEXT: movabsq $-6148914691236517206, %rcx # imm = 0xAAAAAAAAAAAAAAAA
19 ; CHECK-NEXT: movq %rcx, {{[0-9]+}}(%rsp)
20 ; CHECK-NEXT: movq %rcx, {{[0-9]+}}(%rsp)
21 ; CHECK-NEXT: movzwl 2(%rax), %ecx
22 ; CHECK-NEXT: andl $8191, %ecx # imm = 0x1FFF
23 ; CHECK-NEXT: movl %ecx, {{[0-9]+}}(%rsp)
24 ; CHECK-NEXT: movzbl (%rax), %eax
25 ; CHECK-NEXT: andl $15, %eax
26 ; CHECK-NEXT: movl %eax, {{[0-9]+}}(%rsp)
27 ; CHECK-NEXT: movb $0, {{[0-9]+}}(%rsp)
28 ; CHECK-NEXT: movq %rsp, %rdi
29 ; CHECK-NEXT: callq use_it
30 ; CHECK-NEXT: addq $40, %rsp
31 ; CHECK-NEXT: .cfi_def_cfa_offset 8
33 %2 = alloca %struct.xt_action_param, align 16
34 %3 = getelementptr inbounds %struct.sk_buff, %struct.sk_buff* %0, i64 0, i32 0
35 %4 = load i8*, i8** %3, align 8
36 %5 = bitcast %struct.xt_action_param* %2 to i8*
37 call void @llvm.lifetime.start.p0i8(i64 40, i8* nonnull %5) #3
38 call void @llvm.memset.p0i8.i64(i8* nonnull align 16 %5, i8 0, i64 40, i1 false)
39 %6 = bitcast %struct.xt_action_param* %2 to <2 x i8*>*
40 store <2 x i8*> <i8* inttoptr (i64 -6148914691236517206 to i8*), i8* inttoptr (i64 -6148914691236517206 to i8*)>, <2 x i8*>* %6, align 16
41 %7 = getelementptr inbounds %struct.xt_action_param, %struct.xt_action_param* %2, i64 0, i32 2
42 store i8* inttoptr (i64 -6148914691236517206 to i8*), i8** %7, align 16
43 %8 = getelementptr inbounds %struct.xt_action_param, %struct.xt_action_param* %2, i64 0, i32 3
44 %9 = getelementptr inbounds %struct.xt_action_param, %struct.xt_action_param* %2, i64 0, i32 4
45 %10 = getelementptr inbounds %struct.xt_action_param, %struct.xt_action_param* %2, i64 0, i32 5
46 %11 = getelementptr inbounds i8, i8* %4, i64 2
47 %12 = bitcast i8* %11 to i16*
48 %13 = bitcast i32* %8 to i8*
49 call void @llvm.memset.p0i8.i64(i8* nonnull align 8 %13, i8 -86, i64 9, i1 false)
50 %14 = load i16, i16* %12, align 2
51 %15 = and i16 %14, 8191
52 %16 = zext i16 %15 to i32
53 store i32 %16, i32* %8, align 8
54 %17 = load i8, i8* %4, align 2
56 %19 = zext i8 %18 to i32
57 store i32 %19, i32* %9, align 4
58 store i8 0, i8* %10, align 16
59 %20 = call i32 @use_it(%struct.xt_action_param* nonnull %2)
60 call void @llvm.lifetime.end.p0i8(i64 40, i8* nonnull %5)
64 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
66 declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1)
68 declare dso_local i32 @use_it(%struct.xt_action_param*) local_unnamed_addr
70 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)