blob: 835d87a9d9c198ef9e2bd2b35ecfbda5325f8c91 [file] [log] [blame]
James Molloyb6be1eb2015-09-24 16:06:32 +00001; RUN: opt -instsimplify -S < %s | FileCheck %s
2
3; CHECK-LABEL: @test
4define i1 @test(i8 %p, i8* %pq) {
5 %q = load i8, i8* %pq, !range !0 ; %q is known nonzero; no known bits
6 %1 = or i8 %p, 2 ; %1[1] = 1
7 %2 = and i8 %1, 254 ; %2[0] = 0, %2[1] = 1
8 %A = lshr i8 %2, 1 ; We should know that %A is nonzero.
9 %x = icmp eq i8 %A, 0
10 ; CHECK: ret i1 false
11 ret i1 %x
12}
13
14!0 = !{ i8 1, i8 5 }