You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.179
Former-commit-id: 67aa10e65b237e1c4537630979ee99ebe1374215
This commit is contained in:
parent
d6bde52373
commit
8625704ad8
30
external/llvm/test/Analysis/ScalarEvolution/infer-via-ranges.ll
vendored
Normal file
30
external/llvm/test/Analysis/ScalarEvolution/infer-via-ranges.ll
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
; RUN: opt -indvars -S < %s | FileCheck %s
|
||||
|
||||
define void @infer_via_ranges(i32 *%arr, i32 %n) {
|
||||
; CHECK-LABEL: @infer_via_ranges
|
||||
entry:
|
||||
%first.itr.check = icmp sgt i32 %n, 0
|
||||
%start = sub i32 %n, 1
|
||||
br i1 %first.itr.check, label %loop, label %exit
|
||||
|
||||
loop:
|
||||
; CHECK-LABEL: loop:
|
||||
%idx = phi i32 [ %start, %entry ] , [ %idx.dec, %in.bounds ]
|
||||
%idx.dec = sub i32 %idx, 1
|
||||
%abc = icmp sge i32 %idx, 0
|
||||
; CHECK: br i1 true, label %in.bounds, label %out.of.bounds
|
||||
br i1 %abc, label %in.bounds, label %out.of.bounds
|
||||
|
||||
in.bounds:
|
||||
; CHECK-LABEL: in.bounds:
|
||||
%addr = getelementptr i32, i32* %arr, i32 %idx
|
||||
store i32 0, i32* %addr
|
||||
%next = icmp sgt i32 %idx.dec, -1
|
||||
br i1 %next, label %loop, label %exit
|
||||
|
||||
out.of.bounds:
|
||||
ret void
|
||||
|
||||
exit:
|
||||
ret void
|
||||
}
|
Reference in New Issue
Block a user