[InstCombine] Signed saturation patterns
[llvm-core.git] / test / Transforms / InstCombine / pr12251.ll
blob7197bda2e542db44fc39ade112e5c6e7e732e6a1
1 ; RUN: opt < %s -instcombine -S | FileCheck %s
3 define zeroext i1 @_Z3fooPb(i8* nocapture %x) {
4 entry:
5   %a = load i8, i8* %x, align 1, !range !0
6   %b = and i8 %a, 1
7   %tobool = icmp ne i8 %b, 0
8   ret i1 %tobool
11 ; CHECK: %a = load i8, i8* %x, align 1, !range !0
12 ; CHECK-NEXT: %tobool = icmp ne i8 %a, 0
13 ; CHECK-NEXT: ret i1 %tobool
15 !0 = !{i8 0, i8 2}