summaryrefslogtreecommitdiffstats
path: root/test/Analysis/ScalarEvolution/smax.ll
blob: 366dfdee7146067c4f6c3f2db910428c011f211e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
; RUN: llvm-as < %s | opt -analyze -scalar-evolution -disable-output | grep smax | count 2
; RUN: llvm-as < %s | opt -analyze -scalar-evolution -disable-output | grep \
; RUN:     {%. smax %. smax %.}
; PR1614

define i32 @x(i32 %a, i32 %b, i32 %c) {
  %A = icmp sgt i32 %a, %b
  %B = select i1 %A, i32 %a, i32 %b
  %C = icmp sle i32 %c, %B
  %D = select i1 %C, i32 %B, i32 %c
  ret i32 %D
}
OpenPOWER on IntegriCloud