; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 3 ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=aarch64--linux-gnu -mattr=+sve < %s | FileCheck %s target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" define void @scalable_loads() { ; CHECK-LABEL: 'scalable_loads' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res.nxv8i8 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res.nxv16i8 = load , ptr undef, align 16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %res.nxv32i8 = load , ptr undef, align 32 ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %res.nxv1i64 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %res.nxv8i8 = load , ptr undef %res.nxv16i8 = load , ptr undef %res.nxv32i8 = load , ptr undef %res.nxv1i64 = load , ptr undef ret void } define void @scalable_stores() { ; CHECK-LABEL: 'scalable_stores' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store undef, ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store undef, ptr undef, align 16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store undef, ptr undef, align 32 ; CHECK-NEXT: Cost Model: Invalid cost for instruction: store undef, ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; store undef, ptr undef store undef, ptr undef store undef, ptr undef store undef, ptr undef ret void } define void @scalable_ext_loads() { ; CHECK-LABEL: 'scalable_ext_loads' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load.nxv16i8 = load , ptr undef, align 16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %zext.nxv16i8to16 = zext %load.nxv16i8 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load.nxv8i8 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %zext.nxv8i8to16 = zext %load.nxv8i8 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load.nxv4i8 = load , ptr undef, align 4 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %zext.nxv4i8to32 = zext %load.nxv4i8 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load.nxv2i8 = load , ptr undef, align 2 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %zext.nxv2i8to64 = zext %load.nxv2i8 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load.nxv8i16 = load , ptr undef, align 16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %zext.nxv8i16to32 = zext %load.nxv8i16 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load.nxv4i16 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %zext.nxv4i16to32 = zext %load.nxv4i16 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load.nxv2i16 = load , ptr undef, align 4 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %zext.nxv2i16to64 = zext %load.nxv2i16 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load.nxv4i32 = load , ptr undef, align 16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %zext.nxv4i32to64 = zext %load.nxv4i32 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load.nxv2i32 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %zext.nxv2i32to64 = zext %load.nxv2i32 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load.nxv4i8.2 = load , ptr undef, align 4 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zext.nxv4i8to64 = zext %load.nxv4i8.2 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load.nxv4i16.2 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zext.nxv4i16to64 = zext %load.nxv4i16.2 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load.nxv8i8.2 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zext.nxv8i8to32 = zext %load.nxv8i8.2 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load.nxv8i8.3 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %zext.nxv8i8to64 = zext %load.nxv8i8.3 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load2.nxv16i8 = load , ptr undef, align 16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sext.nxv16i8to16 = sext %load2.nxv16i8 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load2.nxv8i8 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext.nxv8i8to16 = sext %load2.nxv8i8 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load2.nxv4i8 = load , ptr undef, align 4 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext.nxv4i8to32 = sext %load2.nxv4i8 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load2.nxv2i8 = load , ptr undef, align 2 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext.nxv2i8to64 = sext %load2.nxv2i8 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load2.nxv8i16 = load , ptr undef, align 16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sext.nxv8i16to32 = sext %load2.nxv8i16 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load2.nxv4i16 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext.nxv4i16to32 = sext %load2.nxv4i16 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load2.nxv2i16 = load , ptr undef, align 4 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext.nxv2i16to64 = sext %load2.nxv2i16 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load2.nxv4i32 = load , ptr undef, align 16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sext.nxv4i32to64 = sext %load2.nxv4i32 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load2.nxv2i32 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext.nxv2i32to64 = sext %load2.nxv2i32 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load2.nxv4i8.2 = load , ptr undef, align 4 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sext.nxv4i8to64 = sext %load2.nxv4i8.2 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load2.nxv4i16.2 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sext.nxv4i16to64 = sext %load2.nxv4i16.2 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load2.nxv8i8.2 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sext.nxv8i8to32 = sext %load2.nxv8i8.2 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load2.nxv8i8.3 = load , ptr undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %sext.nxv8i8to64 = sext %load2.nxv8i8.3 to ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %load.nxv16i8 = load , ptr undef %zext.nxv16i8to16 = zext %load.nxv16i8 to %load.nxv8i8 = load , ptr undef %zext.nxv8i8to16 = zext %load.nxv8i8 to %load.nxv4i8 = load , ptr undef %zext.nxv4i8to32 = zext %load.nxv4i8 to %load.nxv2i8 = load , ptr undef %zext.nxv2i8to64 = zext %load.nxv2i8 to %load.nxv8i16 = load , ptr undef %zext.nxv8i16to32 = zext %load.nxv8i16 to %load.nxv4i16 = load , ptr undef %zext.nxv4i16to32 = zext %load.nxv4i16 to %load.nxv2i16 = load , ptr undef %zext.nxv2i16to64 = zext %load.nxv2i16 to %load.nxv4i32 = load , ptr undef %zext.nxv4i32to64 = zext %load.nxv4i32 to %load.nxv2i32 = load , ptr undef %zext.nxv2i32to64 = zext %load.nxv2i32 to %load.nxv4i8.2 = load , ptr undef %zext.nxv4i8to64 = zext %load.nxv4i8.2 to %load.nxv4i16.2 = load , ptr undef %zext.nxv4i16to64 = zext %load.nxv4i16.2 to %load.nxv8i8.2 = load , ptr undef %zext.nxv8i8to32 = zext %load.nxv8i8.2 to %load.nxv8i8.3 = load , ptr undef %zext.nxv8i8to64 = zext %load.nxv8i8.3 to %load2.nxv16i8 = load , ptr undef %sext.nxv16i8to16 = sext %load2.nxv16i8 to %load2.nxv8i8 = load , ptr undef %sext.nxv8i8to16 = sext %load2.nxv8i8 to %load2.nxv4i8 = load , ptr undef %sext.nxv4i8to32 = sext %load2.nxv4i8 to %load2.nxv2i8 = load , ptr undef %sext.nxv2i8to64 = sext %load2.nxv2i8 to %load2.nxv8i16 = load , ptr undef %sext.nxv8i16to32 = sext %load2.nxv8i16 to %load2.nxv4i16 = load , ptr undef %sext.nxv4i16to32 = sext %load2.nxv4i16 to %load2.nxv2i16 = load , ptr undef %sext.nxv2i16to64 = sext %load2.nxv2i16 to %load2.nxv4i32 = load , ptr undef %sext.nxv4i32to64 = sext %load2.nxv4i32 to %load2.nxv2i32 = load , ptr undef %sext.nxv2i32to64 = sext %load2.nxv2i32 to %load2.nxv4i8.2 = load , ptr undef %sext.nxv4i8to64 = sext %load2.nxv4i8.2 to %load2.nxv4i16.2 = load , ptr undef %sext.nxv4i16to64 = sext %load2.nxv4i16.2 to %load2.nxv8i8.2 = load , ptr undef %sext.nxv8i8to32 = sext %load2.nxv8i8.2 to %load2.nxv8i8.3 = load , ptr undef %sext.nxv8i8to64 = sext %load2.nxv8i8.3 to ret void }