brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · f82244a Raw
52 lines · plain
1; RUN: opt -disable-output "-passes=print<scalar-evolution>" < %s 2>&1 | FileCheck %s2 3define i32 @branch_true(i32 %x, i32 %y) {4; CHECK-LABEL: Classifying expressions for: @branch_true5 entry:6  br i1 true, label %add, label %merge7 8 add:9  %sum = add i32 %x, %y10  br label %merge11 12 merge:13  %v = phi i32 [ %sum, %add ], [ %x, %entry ]14; CHECK:  %v = phi i32 [ %sum, %add ], [ %x, %entry ]15; CHECK-NEXT:  -->  (%x + %y) U: full-set S: full-set16  ret i32 %v17}18 19define i32 @branch_false(i32 %x, i32 %y) {20; CHECK-LABEL: Classifying expressions for: @branch_false21 entry:22  br i1 false, label %add, label %merge23 24 add:25  %sum = add i32 %x, %y26  br label %merge27 28 merge:29  %v = phi i32 [ %sum, %add ], [ %x, %entry ]30; CHECK:  %v = phi i32 [ %sum, %add ], [ %x, %entry ]31; CHECK-NEXT:  -->  %x U: full-set S: full-set32  ret i32 %v33}34 35define i32 @select_true(i32 %x, i32 %y) {36; CHECK-LABEL: Classifying expressions for: @select_true37 entry:38 %v = select i1 true, i32 %x, i32 %y39; CHECK:  %v = select i1 true, i32 %x, i32 %y40; CHECK-NEXT:  -->  %x U: full-set S: full-set41  ret i32 %v42}43 44define i32 @select_false(i32 %x, i32 %y) {45; CHECK-LABEL: Classifying expressions for: @select_false46 entry:47 %v = select i1 false, i32 %x, i32 %y48; CHECK:  %v = select i1 false, i32 %x, i32 %y49; CHECK-NEXT:  -->  %y U: full-set S: full-set50  ret i32 %v51}52