aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-01-27 21:08:51 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-01-27 21:08:51 +0000
commitaff3ef6f6ccad9bd4e082546f8161727c2019117 (patch)
tree830a00991f5796e53057448d5fa417ccc9c29b11 /test/Analysis
parentdadbdfff07596fc3b48cc1e735181b9b8c893f67 (diff)
Vendor import of llvm release_38 branch r258968:vendor/llvm/llvm-release_38-r258968
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/DemandedBits/basic.ll13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/Analysis/DemandedBits/basic.ll b/test/Analysis/DemandedBits/basic.ll
index 487e522e9dbc..9973edf79c17 100644
--- a/test/Analysis/DemandedBits/basic.ll
+++ b/test/Analysis/DemandedBits/basic.ll
@@ -24,11 +24,20 @@ define i1 @test_icmp1(i32 %a, i32 %b) {
; CHECK-LABEL: 'test_icmp2'
; CHECK-DAG: DemandedBits: 0x1 for %3 = icmp eq i32 %1, %2
-; CHECK-DAG: DemandedBits: 0xFF for %1 = and i32 %a, 255
-; CHECK-DAG: DemandedBits: 0xF for %2 = ashr i32 %1, 4
+; CHECK-DAG: DemandedBits: 0xFFF for %1 = and i32 %a, 255
+; CHECK-DAG: DemandedBits: 0xFF for %2 = ashr i32 %1, 4
define i1 @test_icmp2(i32 %a, i32 %b) {
%1 = and i32 %a, 255
%2 = ashr i32 %1, 4
%3 = icmp eq i32 %1, %2
ret i1 %3
}
+
+; CHECK-LABEL: 'test_icmp3'
+; CHECK-DAG: DemandedBits: 0xFFFFFFFF for %1 = and i32 %a, 255
+; CHECK-DAG: DemandedBits: 0x1 for %2 = icmp eq i32 -1, %1
+define i1 @test_icmp3(i32 %a) {
+ %1 = and i32 %a, 255
+ %2 = icmp eq i32 -1, %1
+ ret i1 %2
+}