41 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=loop-vectorize -force-vector-width=4 -S | FileCheck %s3 4target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"5 6; Reductions of pointer types are not supported.7 8define void @PR49215(ptr %p, ptr %q) {9; CHECK-LABEL: @PR49215(10; CHECK-NEXT: entry:11; CHECK-NEXT: br label [[FOR_BODY:%.*]]12; CHECK: for.body:13; CHECK-NEXT: [[IV:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[FOR_BODY]] ]14; CHECK-NEXT: [[G:%.*]] = phi ptr [ [[P:%.*]], [[ENTRY]] ], [ [[UMIN:%.*]], [[FOR_BODY]] ]15; CHECK-NEXT: [[CMP2:%.*]] = icmp ult ptr [[Q:%.*]], [[G]]16; CHECK-NEXT: [[UMIN]] = select i1 [[CMP2]], ptr [[Q]], ptr [[G]]17; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i64 [[IV]], 118; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i64 [[IV_NEXT]], 12319; CHECK-NEXT: br i1 [[EXITCOND]], label [[LOOPEXIT:%.*]], label [[FOR_BODY]]20; CHECK: loopexit:21; CHECK-NEXT: [[UMIN_LCSSA:%.*]] = phi ptr [ [[UMIN]], [[FOR_BODY]] ]22; CHECK-NEXT: [[PHI_CAST:%.*]] = ptrtoint ptr [[UMIN_LCSSA]] to i6423; CHECK-NEXT: ret void24;25entry:26 br label %for.body27 28for.body:29 %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]30 %g = phi ptr [ %p, %entry ], [ %umin, %for.body ]31 %cmp2 = icmp ult ptr %q, %g32 %umin = select i1 %cmp2, ptr %q, ptr %g33 %iv.next = add nuw nsw i64 %iv, 134 %exitcond = icmp eq i64 %iv.next, 12335 br i1 %exitcond, label %loopexit, label %for.body36 37loopexit:38 %phi.cast = ptrtoint ptr %umin to i6439 ret void40}41