37 lines · plain
1; REQUIRES: asserts2; RUN: opt -mtriple=systemz-unknown -mcpu=z13 -passes=slp-vectorizer -debug-only=SLP \3; RUN: -S -disable-output < %s 2>&1 | FileCheck %s4;5; Check that SLP vectorizer gets the right cost difference for a compare6; node.7 8; Function Attrs: norecurse nounwind readonly9define void @fun(ptr nocapture, i32 zeroext) local_unnamed_addr #0 {10.lr.ph.preheader:11 br label %.lr.ph12 13.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph14 %2 = phi i32 [ %., %.lr.ph ], [ undef, %.lr.ph.preheader ]15 %3 = phi i32 [ %.9, %.lr.ph ], [ undef, %.lr.ph.preheader ]16 %4 = icmp ult i32 %2, %117 %5 = select i1 %4, i32 0, i32 %118 %. = sub i32 %2, %519 %6 = icmp ult i32 %3, %120 %7 = select i1 %6, i32 0, i32 %121 %.9 = sub i32 %3, %722 %8 = zext i32 %. to i6423 %9 = getelementptr inbounds i8, ptr %0, i64 %824 %10 = load i8, ptr %9, align 125 %11 = zext i32 %.9 to i6426 %12 = getelementptr inbounds i8, ptr %0, i64 %1127 %13 = load i8, ptr %12, align 128 %14 = icmp eq i8 %10, %1329 br i1 %14, label %.lr.ph, label %._crit_edge30 31._crit_edge: ; preds = %.lr.ph32 ret void33 34; CHECK: SLP: Adding cost -1 for bundle Idx: 4, n=2 [ %4 = icmp ult i32 %2, %1, ..]35}36 37