brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 5ceca9f Raw
47 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s -check-prefix=X643; RUN: llc < %s -mtriple=i686-unknown   | FileCheck %s -check-prefix=X864 5%struct.SA = type { i32 , i32  , i32 , i32 ,i32 }6 7define void @test_func(ptr nocapture %ctx, i32 %n) local_unnamed_addr {8; X64-LABEL: test_func:9; X64:       # %bb.0: # %entry10; X64-NEXT:    movl (%rdi), %eax11; X64-NEXT:    movl 16(%rdi), %ecx12; X64-NEXT:    leal (%rax,%rcx), %edx13; X64-NEXT:    leal 1(%rax,%rcx), %eax14; X64-NEXT:    movl %eax, 12(%rdi)15; X64-NEXT:    leal 1(%rcx,%rdx), %eax16; X64-NEXT:    movl %eax, 16(%rdi)17; X64-NEXT:    retq18;19; X86-LABEL: test_func:20; X86:       # %bb.0: # %entry21; X86-NEXT:    pushl %esi22; X86-NEXT:    .cfi_def_cfa_offset 823; X86-NEXT:    .cfi_offset %esi, -824; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax25; X86-NEXT:    movl (%eax), %ecx26; X86-NEXT:    movl 16(%eax), %edx27; X86-NEXT:    leal 1(%ecx,%edx), %esi28; X86-NEXT:    addl %edx, %ecx29; X86-NEXT:    movl %esi, 12(%eax)30; X86-NEXT:    leal 1(%edx,%ecx), %ecx31; X86-NEXT:    movl %ecx, 16(%eax)32; X86-NEXT:    popl %esi33; X86-NEXT:    .cfi_def_cfa_offset 434; X86-NEXT:    retl35 entry:36   %0 = load i32, ptr %ctx, align 837   %h3 = getelementptr inbounds %struct.SA, ptr %ctx, i64 0, i32 338   %h4 = getelementptr inbounds %struct.SA, ptr %ctx, i64 0, i32 439   %1 = load i32, ptr %h4, align 840   %add = add i32 %0, 141   %add4 = add i32 %add, %142   store i32 %add4, ptr %h3, align 443   %add29 = add i32 %add4 , %144   store i32 %add29, ptr %h4, align 845   ret void46}47