1; RUN: llc < %s -verify-coalescing 2target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" 3target triple = "x86_64-apple-macosx10.7.0" 4 5define void @Quicksort(i32* %a, i32 %l, i32 %r) nounwind ssp { 6entry: 7 br label %tailrecurse 8 9tailrecurse: ; preds = %do.cond, %entry 10 %l.tr = phi i32 [ %l, %entry ], [ %i.1, %do.cond ] 11 %r.tr = phi i32 [ %r, %entry ], [ %l.tr, %do.cond ] 12 %idxprom12 = sext i32 %r.tr to i64 13 %arrayidx14 = getelementptr inbounds i32, i32* %a, i64 %idxprom12 14 br label %do.body 15 16do.body: ; preds = %do.cond, %tailrecurse 17 %i.0 = phi i32 [ %l.tr, %tailrecurse ], [ %i.1, %do.cond ] 18 %add7 = add nsw i32 %i.0, 1 19 %cmp = icmp sgt i32 %add7, %r.tr 20 br i1 %cmp, label %do.cond, label %if.then 21 22if.then: ; preds = %do.body 23 store i32 %add7, i32* %arrayidx14, align 4 24 %add16 = add i32 %i.0, 2 25 br label %do.cond 26 27do.cond: ; preds = %do.body, %if.then 28 %i.1 = phi i32 [ %add16, %if.then ], [ %add7, %do.body ] 29 %cmp19 = icmp sgt i32 %i.1, %r.tr 30 br i1 %cmp19, label %tailrecurse, label %do.body 31} 32