Home | History | Annotate | Download | only in AArch64
      1 ; RUN: llc -march=aarch64 -mtriple=aarch64-none-linux-gnu -stop-after branch-folder -o - < %s | FileCheck %s
      2 target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
      3 
      4 ; Function Attrs: norecurse nounwind
      5 define void @foo(i32 %a, i32 %b, float* nocapture %foo_arr) #0 {
      6 ; CHECK: (load 4 from %ir.arrayidx1.{{i[1-2]}}), (load 4 from %ir.arrayidx1.{{i[1-2]}})
      7 entry:
      8   %cmp = icmp sgt i32 %a, 0
      9   br i1 %cmp, label %if.then, label %if.end
     10 
     11 if.then:                                          ; preds = %entry
     12   %0 = load float, float* %foo_arr, align 4
     13   %arrayidx1.i1 = getelementptr inbounds float, float* %foo_arr, i64 1
     14   %1 = load float, float* %arrayidx1.i1, align 4
     15   %sub.i = fsub float %0, %1
     16   store float %sub.i, float* %foo_arr, align 4
     17   br label %if.end3
     18 
     19 if.end:                                           ; preds = %entry
     20   %cmp1 = icmp sgt i32 %b, 0
     21   br i1 %cmp1, label %if.then2, label %if.end3
     22 
     23 if.then2:                                         ; preds = %if.end
     24   %2 = load float, float* %foo_arr, align 4
     25   %arrayidx1.i2 = getelementptr inbounds float, float* %foo_arr, i64 1
     26   %3 = load float, float* %arrayidx1.i2, align 4
     27   %sub.i3 = fsub float %2, %3
     28   store float %sub.i3, float* %foo_arr, align 4
     29   br label %if.end3
     30 
     31 if.end3:                                          ; preds = %if.then2, %if.end, %if.then
     32   ret void
     33 }
     34