1; RUN: opt -passes=constraint-elimination -S -debug %s 2>&1 | FileCheck %s 2 3; REQUIRES: asserts 4 5declare void @use(i1) 6 7define i1 @test_and_ule(i4 %x, i4 %y, i4 %z) { 8; CHECK: Processing fact to add to the system: %c.1 = icmp ule i4 %x, %y 9; CHECK-NEXT: Adding 'ule %x, %y' 10; CHECK-NEXT: constraint: %x + -1 * %y <= 0 11 12; CHECK: Processing fact to add to the system: %c.2 = icmp ule i4 %y, %z 13; CHECK-NEXT: Adding 'ule %y, %z' 14; CHECK-NEXT: constraint: %y + -1 * %z <= 0 15 16; CHECK: Checking %t.1 = icmp ule i4 %x, %z 17; CHECK: Condition %t.1 = icmp ule i4 %x, %z implied by dominating constraints 18 19; CHECK: Removing %x + -1 * %y <= 0 20; CHECK: Removing %x + -1 * %y <= 0 21 22entry: 23 %c.1 = icmp ule i4 %x, %y 24 %c.2 = icmp ule i4 %y, %z 25 %and = and i1 %c.1, %c.2 26 br i1 %and, label %bb1, label %exit 27 28bb1: 29 %t.1 = icmp ule i4 %x, %z 30 ret i1 %t.1 31 32exit: 33 %c.3 = icmp ule i4 %x, %z 34 ret i1 %c.3 35} 36