source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/ValueTracking/knownnonzero-shift.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 365 bytes
Line 
1; 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 = shl i8 %p, %q              ; because %q is nonzero, %1[0] is known to be zero.
7  %2 = and i8 %1, 1
8  %x = icmp eq i8 %2, 0
9  ; CHECK: ret i1 true
10  ret i1 %x
11}
12
13!0 = !{ i8 1, i8 5 }
Note: See TracBrowser for help on using the repository browser.