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 { ptr }
5 %struct.xt_action_param = type { ptr, ptr, ptr, i32, i32, i8 }
7 define i32 @ipt_do_table(ptr 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 $0, {{[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: movb $-86, {{[0-9]+}}(%rsp)
22 ; CHECK-NEXT: movzwl 2(%rax), %ecx
23 ; CHECK-NEXT: andl $8191, %ecx # imm = 0x1FFF
24 ; CHECK-NEXT: movl %ecx, {{[0-9]+}}(%rsp)
25 ; CHECK-NEXT: movzbl (%rax), %eax
26 ; CHECK-NEXT: andl $15, %eax
27 ; CHECK-NEXT: movl %eax, {{[0-9]+}}(%rsp)
28 ; CHECK-NEXT: movb $0, {{[0-9]+}}(%rsp)
29 ; CHECK-NEXT: movq %rsp, %rdi
30 ; CHECK-NEXT: callq use_it
31 ; CHECK-NEXT: addq $40, %rsp
32 ; CHECK-NEXT: .cfi_def_cfa_offset 8
34 %2 = alloca %struct.xt_action_param, align 16
35 %3 = load ptr, ptr %0, align 8
36 call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #3
37 call void @llvm.memset.p0.i64(ptr nonnull align 16 %2, i8 0, i64 40, i1 false)
38 store <2 x ptr> <ptr inttoptr (i64 -6148914691236517206 to ptr), ptr inttoptr (i64 -6148914691236517206 to ptr)>, ptr %2, align 16
39 %4 = getelementptr inbounds %struct.xt_action_param, ptr %2, i64 0, i32 2
40 store ptr inttoptr (i64 -6148914691236517206 to ptr), ptr %4, align 16
41 %5 = getelementptr inbounds %struct.xt_action_param, ptr %2, i64 0, i32 3
42 %6 = getelementptr inbounds %struct.xt_action_param, ptr %2, i64 0, i32 4
43 %7 = getelementptr inbounds %struct.xt_action_param, ptr %2, i64 0, i32 5
44 %8 = getelementptr inbounds i8, ptr %3, i64 2
45 call void @llvm.memset.p0.i64(ptr nonnull align 8 %5, i8 -86, i64 9, i1 false)
46 %9 = load i16, ptr %8, align 2
47 %10 = and i16 %9, 8191
48 %11 = zext i16 %10 to i32
49 store i32 %11, ptr %5, align 8
50 %12 = load i8, ptr %3, align 2
52 %14 = zext i8 %13 to i32
53 store i32 %14, ptr %6, align 4
54 store i8 0, ptr %7, align 16
55 %15 = call i32 @use_it(ptr nonnull %2)
56 call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2)
60 declare void @llvm.lifetime.start.p0(i64, ptr nocapture)
62 declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1)
64 declare dso_local i32 @use_it(ptr) local_unnamed_addr
66 declare void @llvm.lifetime.end.p0(i64, ptr nocapture)