brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · e39d01f Raw
74 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 @foo(ptr nocapture %ctx, i32 %n) local_unnamed_addr #0 {8; X64-LABEL: foo:9; X64:       # %bb.0: # %entry10; X64-NEXT:    .p2align 411; X64-NEXT:  .LBB0_1: # %loop12; X64-NEXT:    # =>This Inner Loop Header: Depth=113; X64-NEXT:    movl (%rdi), %eax14; X64-NEXT:    movl 16(%rdi), %ecx15; X64-NEXT:    leal 1(%rax,%rcx), %edx16; X64-NEXT:    movl %edx, 12(%rdi)17; X64-NEXT:    decl %esi18; X64-NEXT:    jne .LBB0_119; X64-NEXT:  # %bb.2: # %exit20; X64-NEXT:    addl %ecx, %eax21; X64-NEXT:    leal 1(%rcx,%rax), %eax22; X64-NEXT:    movl %eax, 16(%rdi)23; X64-NEXT:    retq24;25; X86-LABEL: foo:26; X86:       # %bb.0: # %entry27; X86-NEXT:    pushl %edi28; X86-NEXT:    .cfi_def_cfa_offset 829; X86-NEXT:    pushl %esi30; X86-NEXT:    .cfi_def_cfa_offset 1231; X86-NEXT:    .cfi_offset %esi, -1232; X86-NEXT:    .cfi_offset %edi, -833; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx34; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax35; X86-NEXT:    .p2align 436; X86-NEXT:  .LBB0_1: # %loop37; X86-NEXT:    # =>This Inner Loop Header: Depth=138; X86-NEXT:    movl (%eax), %edx39; X86-NEXT:    movl 16(%eax), %esi40; X86-NEXT:    leal 1(%edx,%esi), %edi41; X86-NEXT:    movl %edi, 12(%eax)42; X86-NEXT:    decl %ecx43; X86-NEXT:    jne .LBB0_144; X86-NEXT:  # %bb.2: # %exit45; X86-NEXT:    addl %esi, %edx46; X86-NEXT:    leal 1(%esi,%edx), %ecx47; X86-NEXT:    movl %ecx, 16(%eax)48; X86-NEXT:    popl %esi49; X86-NEXT:    .cfi_def_cfa_offset 850; X86-NEXT:    popl %edi51; X86-NEXT:    .cfi_def_cfa_offset 452; X86-NEXT:    retl53 entry:54   br label %loop55 56 loop:57   %iter = phi i32 [%n ,%entry ] ,[ %iter.ctr ,%loop]58   %0 = load i32, ptr %ctx, align 859   %h3 = getelementptr inbounds %struct.SA, ptr %ctx, i64 0, i32 360   %h4 = getelementptr inbounds %struct.SA, ptr %ctx, i64 0, i32 461   %1 = load i32, ptr %h4, align 862   %add = add i32 %0, 163   %add4 = add i32 %add, %164   store i32 %add4, ptr %h3, align 465   %add29 = add i32 %add4, %166   %iter.ctr = sub i32 %iter , 167   %res = icmp ne i32 %iter.ctr , 068   br i1 %res , label %loop , label %exit69 70 exit:71   store i32 %add29, ptr %h4, align 872   ret void73}74