1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/Analysis/ValueTracking/non-negative-phi-bits.ll
Roman Lebedev 0d9d84eb1e Autogenerate test/Analysis/ValueTracking/non-negative-phi-bits.ll test
Forgot to stage this change into 0f22e783a038b6983f0fe161eef6cf2add3a4156 commit.
2019-12-02 18:28:41 +03:00

28 lines
1.0 KiB
LLVM
Executable File

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -instcombine < %s -S | FileCheck %s
define void @test() #0 {
; CHECK-LABEL: @test(
; CHECK-NEXT: entry:
; CHECK-NEXT: br label [[FOR_BODY:%.*]]
; CHECK: for.body:
; CHECK-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY]] ]
; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ult i64 [[INDVARS_IV]], 39
; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR_END:%.*]], label [[FOR_BODY]]
; CHECK: for.end:
; CHECK-NEXT: ret void
;
entry:
br label %for.body
for.body: ; preds = %for.body, %entry
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%exitcond = icmp slt i64 %indvars.iv.next, 40
br i1 %exitcond, label %for.end, label %for.body
for.end: ; preds = %for.body
ret void
}