1*cee313d2SEric Christopher; RUN: opt -S < %s -loop-rotate -licm -verify-dom-info -verify-loop-info | FileCheck %s 2*cee313d2SEric Christophertarget datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" 3*cee313d2SEric Christophertarget triple = "arm64-apple-ios8.0.0" 4*cee313d2SEric Christopher 5*cee313d2SEric Christopher;CHECK: for.inc: 6*cee313d2SEric Christopher;CHECK-NEXT: %incdec.ptr.i = getelementptr 7*cee313d2SEric Christopher 8*cee313d2SEric Christopher; Function Attrs: alwaysinline inlinehint nounwind readonly ssp 9*cee313d2SEric Christopherdefine linkonce_odr hidden i64 @_ZNSt3__14findINS_11__wrap_iterIPiEEiEET_S4_S4_RKT0_(i64 %__first.coerce, i64 %__last.coerce, i32* nocapture readonly dereferenceable(4) %__value_) { 10*cee313d2SEric Christopherentry: 11*cee313d2SEric Christopher %coerce.val.ip = inttoptr i64 %__first.coerce to i32* 12*cee313d2SEric Christopher %coerce.val.ip2 = inttoptr i64 %__last.coerce to i32* 13*cee313d2SEric Christopher br label %for.cond 14*cee313d2SEric Christopher 15*cee313d2SEric Christopherfor.cond: ; preds = %for.inc, %entry 16*cee313d2SEric Christopher %coerce.val.ip9 = phi i32* [ %incdec.ptr.i, %for.inc ], [ %coerce.val.ip, %entry ] 17*cee313d2SEric Christopher %lnot.i = icmp eq i32* %coerce.val.ip9, %coerce.val.ip2 18*cee313d2SEric Christopher br i1 %lnot.i, label %for.end, label %for.body 19*cee313d2SEric Christopher 20*cee313d2SEric Christopherfor.body: ; preds = %for.cond 21*cee313d2SEric Christopher %0 = load i32, i32* %coerce.val.ip9, align 4 22*cee313d2SEric Christopher %1 = load i32, i32* %__value_, align 4 23*cee313d2SEric Christopher %cmp = icmp eq i32 %0, %1 24*cee313d2SEric Christopher br i1 %cmp, label %for.end, label %for.inc 25*cee313d2SEric Christopher 26*cee313d2SEric Christopherfor.inc: ; preds = %for.body 27*cee313d2SEric Christopher %incdec.ptr.i = getelementptr inbounds i32, i32* %coerce.val.ip9, i64 1 28*cee313d2SEric Christopher br label %for.cond 29*cee313d2SEric Christopher 30*cee313d2SEric Christopherfor.end: ; preds = %for.cond, %for.body 31*cee313d2SEric Christopher %coerce.val.ip9.lcssa = phi i32* [ %coerce.val.ip9, %for.cond ], [ %coerce.val.ip9, %for.body ] 32*cee313d2SEric Christopher %coerce.val.pi = ptrtoint i32* %coerce.val.ip9.lcssa to i64 33*cee313d2SEric Christopher ret i64 %coerce.val.pi 34*cee313d2SEric Christopher} 35