use getPredicateOnEdge to fold comparisons through PHI nodes,
[oota-llvm.git] / test / Transforms / InstCombine / intrinsics.ll
1 ; RUN: opt %s -instcombine -S | FileCheck %s
2
3 declare {i8, i1} @llvm.uadd.with.overflow.i8(i8, i8)
4
5 define i8 @test1(i8 %A, i8 %B) {
6   %x = call {i8, i1} @llvm.uadd.with.overflow.i8(i8 %A, i8 %B)
7   %y = extractvalue  {i8, i1} %x, 0
8   ret i8 %y
9 ; CHECK: @test1
10 ; CHECK-NEXT: %y = add i8 %A, %B
11 ; CHECK-NEXT: ret i8 %y
12 }