brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 548aa0a Raw
30 lines · plain
1; RUN: opt -passes=loop-distribute -enable-loop-distribute \2; RUN:   -debug-only=loop-distribute -disable-output 2>&1 %s | FileCheck %s3 4define void @ldist(i1 %cond, ptr %A, ptr %B, ptr %C) {5entry:6  br label %for.body7 8for.body:                                         ; preds = %if.end, %entry9  %iv = phi i16 [ 0, %entry ], [ %iv.next, %if.end ]10  %lv = load i16, ptr %A, align 111  store i16 %lv, ptr %A, align 112  br i1 %cond, label %if.then, label %if.end13 14if.then:                                          ; preds = %for.body15  %lv2 = load i16, ptr %A, align 116  br label %if.end17 18if.end:                                           ; preds = %if.then, %for.body19  %c.sink = phi ptr [ %B, %if.then ], [ %C, %for.body ]20  %lv3 = load i16, ptr %c.sink21  %add = add i16 %lv3, 1022  store i16 %add, ptr %c.sink, align 123  %iv.next = add nuw nsw i16 %iv, 124  %tobool.not = icmp eq i16 %iv.next, 100025  br i1 %tobool.not, label %for.end.loopexit, label %for.body26 27for.end.loopexit:                                 ; preds = %if.end28  ret void29}30