1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt -disable-output "-passes=print<scalar-evolution>" < %s 2>&1 | FileCheck %s
4 declare i32 @llvm.umax.i32(i32, i32)
5 declare i32 @llvm.umin.i32(i32, i32)
6 declare i32 @llvm.smax.i32(i32, i32)
7 declare i32 @llvm.smin.i32(i32, i32)
9 define i32 @umax(i32 %x, i32 %y) {
11 ; CHECK-NEXT: Classifying expressions for: @umax
12 ; CHECK-NEXT: %z = call i32 @llvm.umax.i32(i32 %x, i32 %y)
13 ; CHECK-NEXT: --> (%x umax %y) U: full-set S: full-set
14 ; CHECK-NEXT: Determining loop execution counts for: @umax
16 %z = call i32 @llvm.umax.i32(i32 %x, i32 %y)
20 define i32 @umin(i32 %x, i32 %y) {
22 ; CHECK-NEXT: Classifying expressions for: @umin
23 ; CHECK-NEXT: %z = call i32 @llvm.umin.i32(i32 %x, i32 %y)
24 ; CHECK-NEXT: --> (%x umin %y) U: full-set S: full-set
25 ; CHECK-NEXT: Determining loop execution counts for: @umin
27 %z = call i32 @llvm.umin.i32(i32 %x, i32 %y)
31 define i32 @smax(i32 %x, i32 %y) {
33 ; CHECK-NEXT: Classifying expressions for: @smax
34 ; CHECK-NEXT: %z = call i32 @llvm.smax.i32(i32 %x, i32 %y)
35 ; CHECK-NEXT: --> (%x smax %y) U: full-set S: full-set
36 ; CHECK-NEXT: Determining loop execution counts for: @smax
38 %z = call i32 @llvm.smax.i32(i32 %x, i32 %y)
42 define i32 @smin(i32 %x, i32 %y) {
44 ; CHECK-NEXT: Classifying expressions for: @smin
45 ; CHECK-NEXT: %z = call i32 @llvm.smin.i32(i32 %x, i32 %y)
46 ; CHECK-NEXT: --> (%x smin %y) U: full-set S: full-set
47 ; CHECK-NEXT: Determining loop execution counts for: @smin
49 %z = call i32 @llvm.smin.i32(i32 %x, i32 %y)
53 define i32 @clamp(i32 %x) {
54 ; CHECK-LABEL: 'clamp'
55 ; CHECK-NEXT: Classifying expressions for: @clamp
56 ; CHECK-NEXT: %y = call i32 @llvm.umax.i32(i32 %x, i32 10)
57 ; CHECK-NEXT: --> (10 umax %x) U: [10,0) S: [10,0)
58 ; CHECK-NEXT: %z = call i32 @llvm.umin.i32(i32 %y, i32 20)
59 ; CHECK-NEXT: --> (20 umin (10 umax %x)) U: [10,21) S: [10,21)
60 ; CHECK-NEXT: Determining loop execution counts for: @clamp
62 %y = call i32 @llvm.umax.i32(i32 %x, i32 10)
63 %z = call i32 @llvm.umin.i32(i32 %y, i32 20)