Compiler projects using llvm
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -o - %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s

%struct.sk_buff = type { ptr }
%struct.xt_action_param = type { ptr, ptr, ptr, i32, i32, i8 }

define i32 @ipt_do_table(ptr noalias nocapture readonly) {
; CHECK-LABEL: ipt_do_table:
; CHECK:       # %bb.0:
; CHECK-NEXT:    subq $40, %rsp
; CHECK-NEXT:    .cfi_def_cfa_offset 48
; CHECK-NEXT:    movq (%rdi), %rax
; CHECK-NEXT:    xorps %xmm0, %xmm0
; CHECK-NEXT:    movaps %xmm0, {{[0-9]+}}(%rsp)
; CHECK-NEXT:    movq $0, {{[0-9]+}}(%rsp)
; CHECK-NEXT:    movaps {{.*#+}} xmm0 = [12297829382473034410,12297829382473034410]
; CHECK-NEXT:    movaps %xmm0, (%rsp)
; CHECK-NEXT:    movabsq $-6148914691236517206, %rcx # imm = 0xAAAAAAAAAAAAAAAA
; CHECK-NEXT:    movq %rcx, {{[0-9]+}}(%rsp)
; CHECK-NEXT:    movq %rcx, {{[0-9]+}}(%rsp)
; CHECK-NEXT:    movb $-86, {{[0-9]+}}(%rsp)
; CHECK-NEXT:    movzwl 2(%rax), %ecx
; CHECK-NEXT:    andl $8191, %ecx # imm = 0x1FFF
; CHECK-NEXT:    movl %ecx, {{[0-9]+}}(%rsp)
; CHECK-NEXT:    movzbl (%rax), %eax
; CHECK-NEXT:    andl $15, %eax
; CHECK-NEXT:    movl %eax, {{[0-9]+}}(%rsp)
; CHECK-NEXT:    movb $0, {{[0-9]+}}(%rsp)
; CHECK-NEXT:    movq %rsp, %rdi
; CHECK-NEXT:    callq use_it
; CHECK-NEXT:    addq $40, %rsp
; CHECK-NEXT:    .cfi_def_cfa_offset 8
; CHECK-NEXT:    retq
  %2 = alloca %struct.xt_action_param, align 16
  %3 = load ptr, ptr %0, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #3
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %2, i8 0, i64 40, i1 false)
  store <2 x ptr> <ptr inttoptr (i64 -6148914691236517206 to ptr), ptr inttoptr (i64 -6148914691236517206 to ptr)>, ptr %2, align 16
  %4 = getelementptr inbounds %struct.xt_action_param, ptr %2, i64 0, i32 2
  store ptr inttoptr (i64 -6148914691236517206 to ptr), ptr %4, align 16
  %5 = getelementptr inbounds %struct.xt_action_param, ptr %2, i64 0, i32 3
  %6 = getelementptr inbounds %struct.xt_action_param, ptr %2, i64 0, i32 4
  %7 = getelementptr inbounds %struct.xt_action_param, ptr %2, i64 0, i32 5
  %8 = getelementptr inbounds i8, ptr %3, i64 2
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %5, i8 -86, i64 9, i1 false)
  %9 = load i16, ptr %8, align 2
  %10 = and i16 %9, 8191
  %11 = zext i16 %10 to i32
  store i32 %11, ptr %5, align 8
  %12 = load i8, ptr %3, align 2
  %13 = and i8 %12, 15
  %14 = zext i8 %13 to i32
  store i32 %14, ptr %6, align 4
  store i8 0, ptr %7, align 16
  %15 = call i32 @use_it(ptr nonnull %2)
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2)
  ret i32 %15
}

declare void @llvm.lifetime.start.p0(i64, ptr nocapture)

declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1)

declare dso_local i32 @use_it(ptr) local_unnamed_addr

declare void @llvm.lifetime.end.p0(i64, ptr nocapture)