brintos

brintos / llvm-project-archived public Read only

0
0
Text · 783 B · 2c9ffb7 Raw
35 lines · plain
1; RUN: opt -S -passes=instsimplify,instcombine < %s | FileCheck %s2 3define i1 @test0(ptr %ptr) {4; CHECK-LABEL: @test0(5 entry:6  %val = load i8, ptr %ptr, !range !{i8 -50, i8 0}7  %and = and i8 %val, 1288  %is.eq = icmp eq i8 %and, 1289  ret i1 %is.eq10; CHECK: ret i1 true11}12 13define i1 @test1(ptr %ptr) {14; CHECK-LABEL: @test1(15 entry:16  %val = load i8, ptr %ptr, !range !{i8 64, i8 128}17  %and = and i8 %val, 6418  %is.eq = icmp eq i8 %and, 6419  ret i1 %is.eq20; CHECK: ret i1 true21}22 23define i1 @test2(ptr %ptr) {24; CHECK-LABEL: @test2(25 entry:26; CHECK: %val = load i827; CHECK: %and = and i8 %val28; CHECK: %is.eq = icmp ne i8 %and, 029; CHECK: ret i1 %is.eq30  %val = load i8, ptr %ptr, !range !{i8 64, i8 129}31  %and = and i8 %val, 6432  %is.eq = icmp eq i8 %and, 6433  ret i1 %is.eq34}35