1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 2
2 ; RUN: opt < %s -disable-output "-passes=print<scalar-evolution>" 2>&1 | FileCheck %s
4 define i64 @test(i64 %a) {
6 ; CHECK-NEXT: Classifying expressions for: @test
7 ; CHECK-NEXT: %add = shl i64 %a, 8
8 ; CHECK-NEXT: --> (256 * %a) U: [0,-255) S: [-9223372036854775808,9223372036854775553)
9 ; CHECK-NEXT: %shl = add i64 %add, 256
10 ; CHECK-NEXT: --> (256 + (256 * %a)) U: [0,-255) S: [-9223372036854775808,9223372036854775553)
11 ; CHECK-NEXT: %ashr = ashr exact i64 %shl, 8
12 ; CHECK-NEXT: --> (sext i56 (1 + (trunc i64 %a to i56)) to i64) U: [-36028797018963968,36028797018963968) S: [-36028797018963968,36028797018963968)
13 ; CHECK-NEXT: Determining loop execution counts for: @test
16 %shl = add i64 %add, 256
17 %ashr = ashr exact i64 %shl, 8