• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
2; PR1614
3
4; CHECK: -->  (%a smax %b)
5; CHECK: -->  (%a smax %b smax %c)
6; CHECK-NOT: smax
7
8define i32 @x(i32 %a, i32 %b, i32 %c) {
9  %A = icmp sgt i32 %a, %b
10  %B = select i1 %A, i32 %a, i32 %b
11  %C = icmp sle i32 %c, %B
12  %D = select i1 %C, i32 %B, i32 %c
13  ret i32 %D
14}
15