Xamarin Public Jenkins (auto-signing) e19d552987 Imported Upstream version 5.18.0.161
Former-commit-id: 4db48158d3a35497b8f118ab21b5f08ac3d86d98
2018-10-19 08:34:24 +00:00

14 lines
365 B
LLVM

; RUN: opt -instsimplify -S < %s | FileCheck %s
; CHECK-LABEL: @test
define i1 @test(i8 %p, i8* %pq) {
%q = load i8, i8* %pq, !range !0 ; %q is known nonzero; no known bits
%1 = shl i8 %p, %q ; because %q is nonzero, %1[0] is known to be zero.
%2 = and i8 %1, 1
%x = icmp eq i8 %2, 0
; CHECK: ret i1 true
ret i1 %x
}
!0 = !{ i8 1, i8 5 }