1 ; RUN: opt < %s -S -loop-unroll | FileCheck %s 2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 3 target triple = "x86_64-unknown-linux-gnu" 4 5 define x86_mmx @f() #0 { 6 entry: 7 br label %for.body 8 9 for.body: ; preds = %for.body, %entry 10 %phi = phi i32 [ 1, %entry ], [ %add, %for.body ] 11 %add = add i32 %phi, 1 12 %cmp = icmp eq i32 %phi, 0 13 br i1 %cmp, label %exit, label %for.body 14 15 exit: ; preds = %for.body 16 %ret = phi x86_mmx [ undef, %for.body ] 17 ; CHECK: %[[ret_unr:.*]] = phi x86_mmx [ undef, 18 ; CHECK: %[[ret_ph:.*]] = phi x86_mmx [ undef, 19 ; CHECK: %[[ret:.*]] = phi x86_mmx [ %[[ret_unr]], {{.*}} ], [ %[[ret_ph]] 20 ; CHECK: ret x86_mmx %[[ret]] 21 ret x86_mmx %ret 22 } 23 24 attributes #0 = { "target-cpu"="x86-64" } 25