<commit_before>; RUN: opt < %s -indvars -S -enable-iv-rewrite | FileCheck %s

; Indvars should be able to insert a canonical induction variable
; for the bb6 loop without using a maximum calculation (icmp, select)
; because it should be able to prove that the comparison is guarded
; by an appropriate conditional branch. Unfortunately, indvars is
; not yet able to find the comparison for the other two loops in
; this testcase.
; CHECK: entry:
; CHECK-NOT: select
; CHECK: bb6:

target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin9"
<commit_msg>Test scalar evolution directly instead of testing the result of canonical indvars.<commit_after>; RUN: opt < %s -analyze -scalar-evolution -S | FileCheck %s

; Indvars should be able to find the trip count for the bb6 loop
; without using a maximum calculation (icmp, select) because it should
; be able to prove that the comparison is guarded by an appropriate
; conditional branch. Unfortunately, indvars is not yet able to find
; the comparison for the other two loops in this testcase.
;
; CHECK: Loop %bb6: backedge-taken count is (-1 + %w)

target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin9"

{'fraction_non_alphanumeric': 0.11516452074391989, 'fraction_numerical': 0.10801144492131616, 'mean_word_length': 4.804979253112033, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '519826', 'n_tokens_mistral': 575, 'n_tokens_neox': 491, 'n_words': 166}