; Checks if the memory cost model does not break when using scalable vectors ; RUN: opt -cost-model -analyze -mtriple=aarch64--linux-gnu -mattr=+sve < %s | FileCheck %s define @load-sve-8(* %ptr) { ; CHECK-LABEL: 'load-sve-8': ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %retval = load , * %ptr ret %retval } define void @store-sve-8(* %ptr, %val) { ; CHECK-LABEL: 'store-sve-8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: store %val, * %ptr ret void } define @load-sve-16(* %ptr) { ; CHECK-LABEL: 'load-sve-16': ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %retval = load , * %ptr ret %retval } define void @store-sve-16(* %ptr, %val) { ; CHECK-LABEL: 'store-sve-16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: store %val, * %ptr ret void } define @load-sve-32(* %ptr) { ; CHECK-LABEL: 'load-sve-32': ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %retval = load , * %ptr ret %retval } define void @store-sve-32(* %ptr, %val) { ; CHECK-LABEL: 'store-sve-32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: store %val, * %ptr ret void }