brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 5ed671b Raw
52 lines · plain
1; RUN: opt -passes="loop-mssa(simple-loop-unswitch)" -verify-memoryssa -S < %s | FileCheck %s2 3define void @f(i32 %n, ptr %ptr) {4; CHECK-LABEL: @f(5entry:6  br label %loop7 8loop:9  %iv = phi i32 [ 0, %entry ], [ %iv.inc, %be ]10  %iv.inc = add i32 %iv, 111  %unswitch_cond_root = icmp ne i32 %iv.inc, 4212  %us.0 = and i1 %unswitch_cond_root, %unswitch_cond_root13  %us.1 = and i1 %us.0, %us.014  %us.2 = and i1 %us.1, %us.115  %us.3 = and i1 %us.2, %us.216  %us.4 = and i1 %us.3, %us.317  %us.5 = and i1 %us.4, %us.418  %us.6 = and i1 %us.5, %us.519  %us.7 = and i1 %us.6, %us.620  %us.8 = and i1 %us.7, %us.721  %us.9 = and i1 %us.8, %us.822  %us.10 = and i1 %us.9, %us.923  %us.11 = and i1 %us.10, %us.1024  %us.12 = and i1 %us.11, %us.1125  %us.13 = and i1 %us.12, %us.1226  %us.14 = and i1 %us.13, %us.1327  %us.15 = and i1 %us.14, %us.1428  %us.16 = and i1 %us.15, %us.1529  %us.17 = and i1 %us.16, %us.1630  %us.18 = and i1 %us.17, %us.1731  %us.19 = and i1 %us.18, %us.1832  %us.20 = and i1 %us.19, %us.1933  %us.21 = and i1 %us.20, %us.2034  %us.22 = and i1 %us.21, %us.2135  %us.23 = and i1 %us.22, %us.2236  %us.24 = and i1 %us.23, %us.2337  %us.25 = and i1 %us.24, %us.2438  %us.26 = and i1 %us.25, %us.2539  %us.27 = and i1 %us.26, %us.2640  %us.28 = and i1 %us.27, %us.2741  %us.29 = and i1 %us.28, %us.2842  br i1 %us.29, label %leave, label %be43 44be:45  store volatile i32 0, ptr %ptr46  %becond = icmp ult i32 %iv.inc, %n47  br i1 %becond, label %leave, label %loop48 49leave:50  ret void51}52