brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 09d3c62 Raw
40 lines · plain
1; RUN: opt -S -passes=loop-unroll -unroll-runtime -unroll-count=2 -verify-loop-info -pass-remarks=loop-unroll < %s 2>&1 | FileCheck %s2 3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"4target triple = "x86_64-unknown-linux-gnu"5 6; Verify that runtime-unrolling a top-level loop that has nested loops does not7; make the unroller produce invalid loop-info.8; CHECK: remark: {{.*}}: unrolled loop by a factor of 2 with run-time trip count9; CHECK: @widget10; CHECK: ret void11define void @widget(ptr %arg, ptr %arg1, ptr %p, ptr %q1, ptr %q2, i1 %c) local_unnamed_addr {12entry:13  br label %header.outer14 15header.outer:                                     ; preds = %latch.outer, %entry16  %tmp = phi ptr [ %tmp8, %latch.outer ], [ %arg, %entry ]17  br label %header.inner18 19header.inner:                                     ; preds = %latch.inner, %header.outer20  %tmp5 = load i64, ptr %q1, align 821  %tmp6 = icmp eq ptr %p, %arg22  br i1 %c, label %exiting.inner, label %latch.outer23 24exiting.inner:                                     ; preds = %latch.inner, %header.outer25  br i1 %c, label %latch.inner, label %latch.outer26 27latch.inner:                                      ; preds = %header.inner28  store i64 %tmp5, ptr %q2, align 829  br label %header.inner30 31latch.outer:                                      ; preds = %header.inner32  store double 0.0, ptr %p, align 833  %tmp8 = getelementptr inbounds double, ptr %tmp, i64 134  %tmp9 = icmp eq ptr %tmp8, %arg135  br i1 %tmp9, label %exit, label %header.outer36 37exit:                                             ; preds = %latch.outer38  ret void39}40