1 ; RUN: opt -mtriple=s390x-unknown-linux -mcpu=z13 -passes=loop-vectorize \
2 ; RUN: -force-vector-width=2 -debug-only=loop-vectorize \
3 ; RUN: -disable-output < %s 2>&1 | FileCheck %s
6 ; Check that a scalarized load does not get operands scalarization costs added.
8 define void @fun(ptr %data, i64 %n, i64 %s, ptr %Src) {
13 %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
14 %mul = mul nsw i64 %iv, %s
15 %gep = getelementptr inbounds double, ptr %Src, i64 %mul
16 %bct = bitcast ptr %gep to ptr
17 %ld = load i64, ptr %bct
18 %iv.next = add nuw nsw i64 %iv, 1
19 %cmp110.us = icmp slt i64 %iv.next, %n
20 br i1 %cmp110.us, label %for.body, label %for.end
25 ; CHECK: LV: Found an estimated cost of 2 for VF 2 For instruction: %mul = mul nsw i64 %iv, %s
26 ; CHECK: LV: Found an estimated cost of 2 for VF 2 For instruction: %ld = load i64, ptr %bct