reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -o - %s -mtriple=x86_64--unknown-linux-gnu | FileCheck %s

define void @foo(i32* %a, i32* %b, i32* noalias %c, i64 %s) {
; CHECK-LABEL: foo:
; CHECK:       # %bb.0:
; CHECK-NEXT:    movq $0, -{{[0-9]+}}(%rsp)
; CHECK-NEXT:    .p2align 4, 0x90
; CHECK-NEXT:  .LBB0_1: # %loop
; CHECK-NEXT:    # =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    movq -{{[0-9]+}}(%rsp), %r9
; CHECK-NEXT:    cmpq %rcx, %r9
; CHECK-NEXT:    je .LBB0_3
; CHECK-NEXT:  # %bb.2: # %body
; CHECK-NEXT:    # in Loop: Header=BB0_1 Depth=1
; CHECK-NEXT:    movl $1, (%rdx,%r9,4)
; CHECK-NEXT:    movzbl (%rdi,%r9,4), %r8d
; CHECK-NEXT:    movzbl (%rsi,%r9,4), %eax
; CHECK-NEXT:    andl %r8d, %eax
; CHECK-NEXT:    andl $1, %eax
; CHECK-NEXT:    movl %eax, (%rdi,%r9,4)
; CHECK-NEXT:    incq %r9
; CHECK-NEXT:    movq %r9, -{{[0-9]+}}(%rsp)
; CHECK-NEXT:    jmp .LBB0_1
; CHECK-NEXT:  .LBB0_3: # %endloop
; CHECK-NEXT:    retq
%i = alloca i64
store i64 0, i64* %i
br label %loop

loop:
%ct = load i64, i64* %i
%comp = icmp eq i64 %ct, %s
br i1 %comp, label %endloop, label %body

body:
%var0 = getelementptr i32, i32* %c, i64 %ct
store i32 1, i32* %var0
%var1 = getelementptr i32, i32* %c, i64 %ct
%var2 = load i32, i32* %var1
%var3 = add i32 %var2, 1
%var4 = getelementptr i32, i32* %a, i64 %ct
%var5 = load i32, i32* %var4
%var6 = and i32 %var3, %var5
%var7 = add i32 %var6, 1
%var8 = getelementptr i32, i32* %a, i64 %ct
%var9 = load i32, i32* %var8
%var10 = and i32 %var7, %var9
%var11 = getelementptr i32, i32* %c, i64 %ct
%var12 = load i32, i32* %var11
%var13 = and i32 %var10, %var12
%var14 = getelementptr i32, i32* %b, i64 %ct
%var15 = load i32, i32* %var14
%var16 = and i32 %var15, 63
%var17 = and i32 %var13, %var16
%var18 = getelementptr i32, i32* %a, i64 %ct
store i32 %var17, i32* %var18
%z = add i64 1, %ct
store i64 %z, i64* %i
br label %loop

endloop:
ret void
}