Index: llvm/test/Analysis/CostModel/AArch64/abs.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/abs.ll +++ llvm/test/Analysis/CostModel/AArch64/abs.ll @@ -2,6 +2,8 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=aarch64-none-eabi < %s | FileCheck %s --check-prefix=RECIP ; RUN: opt -passes="print" 2>&1 -disable-output -cost-kind=code-size -mtriple=aarch64-none-eabi < %s | FileCheck %s --check-prefix=SIZE +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + declare <2 x i64> @llvm.abs.v2i64(<2 x i64>, i1) declare <4 x i64> @llvm.abs.v4i64(<4 x i64>, i1) declare <8 x i64> @llvm.abs.v8i64(<8 x i64>, i1) Index: llvm/test/Analysis/CostModel/AArch64/aggregates.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/aggregates.ll +++ llvm/test/Analysis/CostModel/AArch64/aggregates.ll @@ -3,6 +3,8 @@ ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -passes="print" -cost-kind=latency 2>&1 -disable-output | FileCheck %s --check-prefix=LATENCY ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -passes="print" -cost-kind=code-size 2>&1 -disable-output | FileCheck %s --check-prefix=CODESIZE +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define i32 @extract_first_i32({i32, i32} %agg) { ; THROUGHPUT-LABEL: 'extract_first_i32' ; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0 Index: llvm/test/Analysis/CostModel/AArch64/arith-fp-sve.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/arith-fp-sve.ll +++ llvm/test/Analysis/CostModel/AArch64/arith-fp-sve.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -enable-no-nans-fp-math -passes="print" 2>&1 -disable-output -mtriple=aarch64 -mattr=+fullfp16 -mattr=+sve | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @fadd() { ; CHECK-LABEL: 'fadd' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4F16 = fadd undef, undef Index: llvm/test/Analysis/CostModel/AArch64/arith-fp.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/arith-fp.ll +++ llvm/test/Analysis/CostModel/AArch64/arith-fp.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -enable-no-nans-fp-math -passes="print" 2>&1 -disable-output -mtriple=aarch64 -mattr=+fullfp16 | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define i32 @fadd(i32 %arg) { ; CHECK-LABEL: 'fadd' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %F16 = fadd half undef, undef Index: llvm/test/Analysis/CostModel/AArch64/arith-overflow.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/arith-overflow.ll +++ llvm/test/Analysis/CostModel/AArch64/arith-overflow.ll @@ -2,6 +2,8 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=aarch64 < %s | FileCheck %s --check-prefix=RECIP ; RUN: opt -passes="print" 2>&1 -disable-output -cost-kind=code-size -mtriple=aarch64 < %s | FileCheck %s --check-prefix=SIZE +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + declare {i64, i1} @llvm.sadd.with.overflow.i64(i64, i64) declare {<2 x i64>, <2 x i1>} @llvm.sadd.with.overflow.v2i64(<2 x i64>, <2 x i64>) declare {<4 x i64>, <4 x i1>} @llvm.sadd.with.overflow.v4i64(<4 x i64>, <4 x i64>) @@ -353,9 +355,9 @@ define i32 @smul(i32 %arg) { ; RECIP-LABEL: 'smul' ; RECIP-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %I64 = call { i64, i1 } @llvm.smul.with.overflow.i64(i64 undef, i64 undef) -; RECIP-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %V2I64 = call { <2 x i64>, <2 x i1> } @llvm.smul.with.overflow.v2i64(<2 x i64> undef, <2 x i64> undef) -; RECIP-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %V4I64 = call { <4 x i64>, <4 x i1> } @llvm.smul.with.overflow.v4i64(<4 x i64> undef, <4 x i64> undef) -; RECIP-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %V8I64 = call { <8 x i64>, <8 x i1> } @llvm.smul.with.overflow.v8i64(<8 x i64> undef, <8 x i64> undef) +; RECIP-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %V2I64 = call { <2 x i64>, <2 x i1> } @llvm.smul.with.overflow.v2i64(<2 x i64> undef, <2 x i64> undef) +; RECIP-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %V4I64 = call { <4 x i64>, <4 x i1> } @llvm.smul.with.overflow.v4i64(<4 x i64> undef, <4 x i64> undef) +; RECIP-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %V8I64 = call { <8 x i64>, <8 x i1> } @llvm.smul.with.overflow.v8i64(<8 x i64> undef, <8 x i64> undef) ; RECIP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %I32 = call { i32, i1 } @llvm.smul.with.overflow.i32(i32 undef, i32 undef) ; RECIP-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %V4I32 = call { <4 x i32>, <4 x i1> } @llvm.smul.with.overflow.v4i32(<4 x i32> undef, <4 x i32> undef) ; RECIP-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %V8I32 = call { <8 x i32>, <8 x i1> } @llvm.smul.with.overflow.v8i32(<8 x i32> undef, <8 x i32> undef) @@ -365,9 +367,9 @@ ; RECIP-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16I16 = call { <16 x i16>, <16 x i1> } @llvm.smul.with.overflow.v16i16(<16 x i16> undef, <16 x i16> undef) ; RECIP-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V32I16 = call { <32 x i16>, <32 x i1> } @llvm.smul.with.overflow.v32i16(<32 x i16> undef, <32 x i16> undef) ; RECIP-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %I8 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 undef, i8 undef) -; RECIP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V16I8 = call { <16 x i8>, <16 x i1> } @llvm.smul.with.overflow.v16i8(<16 x i8> undef, <16 x i8> undef) -; RECIP-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V32I8 = call { <32 x i8>, <32 x i1> } @llvm.smul.with.overflow.v32i8(<32 x i8> undef, <32 x i8> undef) -; RECIP-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V64I8 = call { <64 x i8>, <64 x i1> } @llvm.smul.with.overflow.v64i8(<64 x i8> undef, <64 x i8> undef) +; RECIP-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V16I8 = call { <16 x i8>, <16 x i1> } @llvm.smul.with.overflow.v16i8(<16 x i8> undef, <16 x i8> undef) +; RECIP-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V32I8 = call { <32 x i8>, <32 x i1> } @llvm.smul.with.overflow.v32i8(<32 x i8> undef, <32 x i8> undef) +; RECIP-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V64I8 = call { <64 x i8>, <64 x i1> } @llvm.smul.with.overflow.v64i8(<64 x i8> undef, <64 x i8> undef) ; RECIP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'smul' @@ -435,9 +437,9 @@ define i32 @umul(i32 %arg) { ; RECIP-LABEL: 'umul' ; RECIP-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %I64 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 undef, i64 undef) -; RECIP-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %V2I64 = call { <2 x i64>, <2 x i1> } @llvm.umul.with.overflow.v2i64(<2 x i64> undef, <2 x i64> undef) -; RECIP-NEXT: Cost Model: Found an estimated cost of 42 for instruction: %V4I64 = call { <4 x i64>, <4 x i1> } @llvm.umul.with.overflow.v4i64(<4 x i64> undef, <4 x i64> undef) -; RECIP-NEXT: Cost Model: Found an estimated cost of 84 for instruction: %V8I64 = call { <8 x i64>, <8 x i1> } @llvm.umul.with.overflow.v8i64(<8 x i64> undef, <8 x i64> undef) +; RECIP-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %V2I64 = call { <2 x i64>, <2 x i1> } @llvm.umul.with.overflow.v2i64(<2 x i64> undef, <2 x i64> undef) +; RECIP-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %V4I64 = call { <4 x i64>, <4 x i1> } @llvm.umul.with.overflow.v4i64(<4 x i64> undef, <4 x i64> undef) +; RECIP-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %V8I64 = call { <8 x i64>, <8 x i1> } @llvm.umul.with.overflow.v8i64(<8 x i64> undef, <8 x i64> undef) ; RECIP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %I32 = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 undef, i32 undef) ; RECIP-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %V4I32 = call { <4 x i32>, <4 x i1> } @llvm.umul.with.overflow.v4i32(<4 x i32> undef, <4 x i32> undef) ; RECIP-NEXT: Cost Model: Found an estimated cost of 70 for instruction: %V8I32 = call { <8 x i32>, <8 x i1> } @llvm.umul.with.overflow.v8i32(<8 x i32> undef, <8 x i32> undef) @@ -447,9 +449,9 @@ ; RECIP-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V16I16 = call { <16 x i16>, <16 x i1> } @llvm.umul.with.overflow.v16i16(<16 x i16> undef, <16 x i16> undef) ; RECIP-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %V32I16 = call { <32 x i16>, <32 x i1> } @llvm.umul.with.overflow.v32i16(<32 x i16> undef, <32 x i16> undef) ; RECIP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = call { i8, i1 } @llvm.umul.with.overflow.i8(i8 undef, i8 undef) -; RECIP-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V16I8 = call { <16 x i8>, <16 x i1> } @llvm.umul.with.overflow.v16i8(<16 x i8> undef, <16 x i8> undef) -; RECIP-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V32I8 = call { <32 x i8>, <32 x i1> } @llvm.umul.with.overflow.v32i8(<32 x i8> undef, <32 x i8> undef) -; RECIP-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %V64I8 = call { <64 x i8>, <64 x i1> } @llvm.umul.with.overflow.v64i8(<64 x i8> undef, <64 x i8> undef) +; RECIP-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %V16I8 = call { <16 x i8>, <16 x i1> } @llvm.umul.with.overflow.v16i8(<16 x i8> undef, <16 x i8> undef) +; RECIP-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %V32I8 = call { <32 x i8>, <32 x i1> } @llvm.umul.with.overflow.v32i8(<32 x i8> undef, <32 x i8> undef) +; RECIP-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %V64I8 = call { <64 x i8>, <64 x i1> } @llvm.umul.with.overflow.v64i8(<64 x i8> undef, <64 x i8> undef) ; RECIP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef ; ; SIZE-LABEL: 'umul' Index: llvm/test/Analysis/CostModel/AArch64/arith-ssat.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/arith-ssat.ll +++ llvm/test/Analysis/CostModel/AArch64/arith-ssat.ll @@ -2,6 +2,8 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=aarch64-none-eabi < %s | FileCheck %s --check-prefix=RECIP ; RUN: opt -passes="print" 2>&1 -disable-output -cost-kind=code-size -mtriple=aarch64-none-eabi < %s | FileCheck %s --check-prefix=SIZE +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + declare i64 @llvm.sadd.sat.i64(i64, i64) declare <2 x i64> @llvm.sadd.sat.v2i64(<2 x i64>, <2 x i64>) declare <4 x i64> @llvm.sadd.sat.v4i64(<4 x i64>, <4 x i64>) Index: llvm/test/Analysis/CostModel/AArch64/arith-usat.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/arith-usat.ll +++ llvm/test/Analysis/CostModel/AArch64/arith-usat.ll @@ -2,6 +2,8 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=aarch64-none-eabi < %s | FileCheck %s --check-prefix=RECIP ; RUN: opt -passes="print" 2>&1 -disable-output -cost-kind=code-size -mtriple=aarch64-none-eabi < %s | FileCheck %s --check-prefix=SIZE +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + declare i64 @llvm.uadd.sat.i64(i64, i64) declare <2 x i64> @llvm.uadd.sat.v2i64(<2 x i64>, <2 x i64>) declare <4 x i64> @llvm.uadd.sat.v4i64(<4 x i64>, <4 x i64>) Index: llvm/test/Analysis/CostModel/AArch64/arith-widening.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/arith-widening.ll +++ llvm/test/Analysis/CostModel/AArch64/arith-widening.ll @@ -1,6 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -passes="print" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" define void @extaddv1(i8 %i8, i16 %i16, i32 %i32, i64 %i64) { ; CHECK-LABEL: 'extaddv1' Index: llvm/test/Analysis/CostModel/AArch64/arith.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/arith.ll +++ llvm/test/Analysis/CostModel/AArch64/arith.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt -passes="print" -cost-kind=throughput 2>&1 -disable-output -mtriple=aarch64-linux-gnu < %s | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @i1() { ; CHECK-LABEL: 'i1' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i1 undef, undef Index: llvm/test/Analysis/CostModel/AArch64/bitreverse.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/bitreverse.ll +++ llvm/test/Analysis/CostModel/AArch64/bitreverse.ll @@ -3,6 +3,8 @@ ; Verify the cost of scalar bitreverse instructions. +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + declare i8 @llvm.bitreverse.i8(i8) declare i16 @llvm.bitreverse.i16(i16) declare i32 @llvm.bitreverse.i32(i32) Index: llvm/test/Analysis/CostModel/AArch64/bswap.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/bswap.ll +++ llvm/test/Analysis/CostModel/AArch64/bswap.ll @@ -2,6 +2,8 @@ ; Verify the cost of bswap instructions. +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + declare i16 @llvm.bswap.i16(i16) declare i32 @llvm.bswap.i32(i32) declare i64 @llvm.bswap.i64(i64) Index: llvm/test/Analysis/CostModel/AArch64/cast.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/cast.ll +++ llvm/test/Analysis/CostModel/AArch64/cast.ll @@ -2,6 +2,8 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=aarch64-none-linux-gnueabi %s | FileCheck --check-prefixes=CHECK,CHECK-NOFP16 %s ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=aarch64-none-linux-gnueabi -mattr=+fullfp16 %s | FileCheck --check-prefixes=CHECK,CHECK-FP16 %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @ext() { ; CHECK-LABEL: 'ext' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r0 = sext i1 undef to i8 @@ -165,25 +167,25 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s2i8i32 = trunc <2 x i32> undef to <2 x i8> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s2i8i64 = trunc <2 x i64> undef to <2 x i8> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s2i16i32 = trunc <2 x i32> undef to <2 x i16> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s2i16i64 = trunc <2 x i64> undef to <2 x i16> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s2i32i64 = trunc <2 x i64> undef to <2 x i32> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s2i16i64 = trunc <2 x i64> undef to <2 x i16> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s2i32i64 = trunc <2 x i64> undef to <2 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s4i8i16 = trunc <4 x i16> undef to <4 x i8> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i32 = trunc <4 x i32> undef to <4 x i8> -; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s4i8i64 = trunc <4 x i64> undef to <4 x i8> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s4i8i32 = trunc <4 x i32> undef to <4 x i8> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s4i8i64 = trunc <4 x i64> undef to <4 x i8> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i32 = trunc <4 x i32> undef to <4 x i16> -; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s4i16i64 = trunc <4 x i64> undef to <4 x i16> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s4i16i64 = trunc <4 x i64> undef to <4 x i16> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s4i32i64 = trunc <4 x i64> undef to <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i16 = trunc <8 x i16> undef to <8 x i8> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s8i8i16 = trunc <8 x i16> undef to <8 x i8> ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s8i8i32 = trunc <8 x i32> undef to <8 x i8> -; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %s8i8i64 = trunc <8 x i64> undef to <8 x i8> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s8i8i64 = trunc <8 x i64> undef to <8 x i8> ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s8i16i32 = trunc <8 x i32> undef to <8 x i16> -; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %s8i16i64 = trunc <8 x i64> undef to <8 x i16> +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i16i64 = trunc <8 x i64> undef to <8 x i16> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s8i32i64 = trunc <8 x i64> undef to <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s16i8i16 = trunc <16 x i16> undef to <16 x i8> +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s16i8i16 = trunc <16 x i16> undef to <16 x i8> ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %s16i8i32 = trunc <16 x i32> undef to <16 x i8> -; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %s16i8i64 = trunc <16 x i64> undef to <16 x i8> +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s16i8i64 = trunc <16 x i64> undef to <16 x i8> ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %s16i16i32 = trunc <16 x i32> undef to <16 x i16> -; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %s16i16i64 = trunc <16 x i64> undef to <16 x i16> +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s16i16i64 = trunc <16 x i64> undef to <16 x i16> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s16i32i64 = trunc <16 x i64> undef to <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; @@ -680,10 +682,10 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r5 = sext i32 %c to i64 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %r0, i16* undef, align 2 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r1, i32* undef, align 4 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r2, i64* undef, align 4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r2, i64* undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r3, i32* undef, align 4 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r4, i64* undef, align 4 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r5, i64* undef, align 4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r4, i64* undef, align 8 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r5, i64* undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r6 = zext i8 %a to i16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r7 = zext i8 %a to i32 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r8 = zext i8 %a to i64 @@ -692,10 +694,10 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r11 = zext i32 %c to i64 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %r6, i16* undef, align 2 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r7, i32* undef, align 4 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r8, i64* undef, align 4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r8, i64* undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r9, i32* undef, align 4 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r10, i64* undef, align 4 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r11, i64* undef, align 4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r10, i64* undef, align 8 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r11, i64* undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r12 = trunc i64 %d to i32 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r13 = trunc i64 %d to i16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r14 = trunc i64 %d to i8 @@ -722,11 +724,11 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 %r18, i8* undef, align 1 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %r19, i16* undef, align 2 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r20, i32* undef, align 4 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r21, i64* undef, align 4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r21, i64* undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 %r22, i8* undef, align 1 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %r23, i16* undef, align 2 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r24, i32* undef, align 4 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r25, i64* undef, align 4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r25, i64* undef, align 8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r12 ; %r0 = sext i8 %a to i16 Index: llvm/test/Analysis/CostModel/AArch64/cmp.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/cmp.ll +++ llvm/test/Analysis/CostModel/AArch64/cmp.ll @@ -2,6 +2,8 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=aarch64-- < %s | FileCheck %s --check-prefix=CHECK-THROUGHPUT ; RUN: opt -passes="print" 2>&1 -disable-output -cost-kind=code-size -mtriple=aarch64-- < %s | FileCheck %s --check-prefix=CHECK-SIZE +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define i32 @cmps() { ; CHECK-THROUGHPUT-LABEL: 'cmps' ; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a0 = icmp slt i8 undef, undef Index: llvm/test/Analysis/CostModel/AArch64/cost-scalable-vector-gep.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/cost-scalable-vector-gep.ll +++ llvm/test/Analysis/CostModel/AArch64/cost-scalable-vector-gep.ll @@ -4,6 +4,8 @@ ; scalable vector does not produce a 'assumption that TypeSize is not scalable' ; warning when performing cost analysis. +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %retval = getelementptr define * @gep_scalable_vector(* %ptr) { %retval = getelementptr , * %ptr, i32 2 Index: llvm/test/Analysis/CostModel/AArch64/ctlz.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/ctlz.ll +++ llvm/test/Analysis/CostModel/AArch64/ctlz.ll @@ -3,6 +3,8 @@ ; Verify the cost of scalar ctlz instructions. +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define i64 @test_ctlz_i64(i64 %a) { ; ; CHECK-LABEL: 'test_ctlz_i64' Index: llvm/test/Analysis/CostModel/AArch64/ctpop.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/ctpop.ll +++ llvm/test/Analysis/CostModel/AArch64/ctpop.ll @@ -3,6 +3,8 @@ ; Verify the cost of scalar ctpop instructions. +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define i64 @test_ctpop_i64(i64 %a) { ; CHECK-LABEL: 'test_ctpop_i64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %ctpop = call i64 @llvm.ctpop.i64(i64 %a) Index: llvm/test/Analysis/CostModel/AArch64/cttz.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/cttz.ll +++ llvm/test/Analysis/CostModel/AArch64/cttz.ll @@ -3,6 +3,8 @@ ; Verify the cost of scalar ctlz instructions. +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define i64 @test_cttz_i64(i64 %a) { ; ; CHECK-LABEL: 'test_cttz_i64' Index: llvm/test/Analysis/CostModel/AArch64/div.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/div.ll +++ llvm/test/Analysis/CostModel/AArch64/div.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -passes="print" 2>&1 -disable-output | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define i32 @sdiv() { ; CHECK-LABEL: 'sdiv' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = sdiv i64 undef, undef Index: llvm/test/Analysis/CostModel/AArch64/div_cte.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/div_cte.ll +++ llvm/test/Analysis/CostModel/AArch64/div_cte.ll @@ -2,6 +2,8 @@ ; Verify the cost of integer division by constant. +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define <16 x i8> @sdiv8xi16(<16 x i8> %x) { ; CHECK-LABEL: function 'sdiv8xi16' ; CHECK: Found an estimated cost of 7 for instruction: %div = sdiv <16 x i8> %x, Index: llvm/test/Analysis/CostModel/AArch64/fptoi_sat.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/fptoi_sat.ll +++ llvm/test/Analysis/CostModel/AArch64/fptoi_sat.ll @@ -2,6 +2,8 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=aarch64-none-linux-gnueabi %s | FileCheck --check-prefixes=CHECK,CHECK-NOFP16 %s ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=aarch64-none-linux-gnueabi -mattr=+fullfp16 %s | FileCheck --check-prefixes=CHECK,CHECK-FP16 %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @casts() { ; CHECK-LABEL: 'casts' ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %f32s1 = call i1 @llvm.fptosi.sat.i1.f32(float undef) Index: llvm/test/Analysis/CostModel/AArch64/free-widening-casts.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/free-widening-casts.ll +++ llvm/test/Analysis/CostModel/AArch64/free-widening-casts.ll @@ -1,6 +1,8 @@ ; RUN: opt < %s -mtriple=aarch64--linux-gnu -passes="print" 2>&1 -disable-output | FileCheck %s --check-prefix=COST ; RUN: llc < %s -mtriple=aarch64--linux-gnu | FileCheck %s --check-prefix=CODE +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + ; COST-LABEL: uaddl_8h ; COST-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %tmp0 = zext <8 x i8> %a to <8 x i16> ; COST-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %tmp1 = zext <8 x i8> %b to <8 x i16> Index: llvm/test/Analysis/CostModel/AArch64/getIntrinsicInstrCost-vector-reverse.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/getIntrinsicInstrCost-vector-reverse.ll +++ llvm/test/Analysis/CostModel/AArch64/getIntrinsicInstrCost-vector-reverse.ll @@ -3,6 +3,8 @@ ; 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 @vector_reverse() #0{ ; CHECK-LABEL: 'vector_reverse' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = call <16 x i8> @llvm.experimental.vector.reverse.v16i8(<16 x i8> undef) Index: llvm/test/Analysis/CostModel/AArch64/load-to-trunc.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/load-to-trunc.ll +++ llvm/test/Analysis/CostModel/AArch64/load-to-trunc.ll @@ -5,10 +5,12 @@ ; RUN: opt -passes="print" -cost-kind=code-size 2>&1 -disable-output -mtriple=aarch64--linux-gnu < %s | FileCheck %s --check-prefix=CHECK +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + ; Check that cost is 1 for unusual load to register sized load. define i32 @loadUnusualIntegerWithTrunc(i128* %ptr) { ; CHECK-LABEL: 'loadUnusualIntegerWithTrunc' -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %out = load i128, i128* %ptr, align 4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %out = load i128, i128* %ptr, align 16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %trunc = trunc i128 %out to i32 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %trunc ; @@ -19,7 +21,7 @@ define i128 @loadUnusualInteger(i128* %ptr) { ; CHECK-LABEL: 'loadUnusualInteger' -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %out = load i128, i128* %ptr, align 4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %out = load i128, i128* %ptr, align 16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i128 %out ; %out = load i128, i128* %ptr Index: llvm/test/Analysis/CostModel/AArch64/logicalop.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/logicalop.ll +++ llvm/test/Analysis/CostModel/AArch64/logicalop.ll @@ -3,6 +3,8 @@ ; RUN: opt < %s -passes="print" 2>&1 -disable-output -cost-kind=code-size -mtriple=aarch64-- | FileCheck %s --check-prefix=CHECK-SIZE target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32" +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @op() { ; Logical and/or - select's cost must be equivalent to that of binop ; CHECK-THROUGHPUT-LABEL: 'op' Index: llvm/test/Analysis/CostModel/AArch64/masked_ldst.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/masked_ldst.ll +++ llvm/test/Analysis/CostModel/AArch64/masked_ldst.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -passes="print" 2>&1 -disable-output -mtriple=aarch64-linux-gnu -mattr=+sve | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @fixed() { ; CHECK-LABEL: 'fixed' ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %v2i8 = call <2 x i8> @llvm.masked.load.v2i8.p0v2i8(<2 x i8>* undef, i32 8, <2 x i1> undef, <2 x i8> undef) Index: llvm/test/Analysis/CostModel/AArch64/mem-op-cost-model.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/mem-op-cost-model.ll +++ llvm/test/Analysis/CostModel/AArch64/mem-op-cost-model.ll @@ -7,6 +7,8 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=aarch64--linux-gnu -mattr=+sve -aarch64-sve-vector-bits-min=256 < %s | FileCheck %s --check-prefix=CHECK-SVE-256 ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=aarch64--linux-gnu -mattr=+sve -aarch64-sve-vector-bits-min=512 < %s | FileCheck %s --check-prefix=CHECK-SVE-512 +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define <16 x i8> @load16(<16 x i8>* %ptr) { ; CHECK: function 'load16' ; CHECK-NEON: Cost Model: Found an estimated cost of 1 for instruction: Index: llvm/test/Analysis/CostModel/AArch64/min-max.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/min-max.ll +++ llvm/test/Analysis/CostModel/AArch64/min-max.ll @@ -2,6 +2,8 @@ ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=throughput | FileCheck %s --check-prefixes=CHECK,CHECK-NOF16 ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -mattr=+fullfp16 -passes="print" 2>&1 -disable-output -cost-kind=throughput | FileCheck %s --check-prefixes=CHECK,CHECK-F16 +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @umin() { ; CHECK-LABEL: 'umin' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i8 = call i8 @llvm.umin.i8(i8 undef, i8 undef) Index: llvm/test/Analysis/CostModel/AArch64/mul.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/mul.ll +++ llvm/test/Analysis/CostModel/AArch64/mul.ll @@ -3,6 +3,8 @@ ; Verify the cost of (vector) multiply instructions. +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define <2 x i8> @t1(<2 x i8> %a, <2 x i8> %b) { ; THROUGHPUT-LABEL: 't1' ; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = mul <2 x i8> %a, %b Index: llvm/test/Analysis/CostModel/AArch64/neon-stepvector.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/neon-stepvector.ll +++ llvm/test/Analysis/CostModel/AArch64/neon-stepvector.ll @@ -1,5 +1,7 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple=aarch64--linux-gnu -mattr=+neon < %s | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + ; Check icmp for legal integer vectors. define void @stepvector_legal_int() { ; CHECK-LABEL: 'stepvector_legal_int' Index: llvm/test/Analysis/CostModel/AArch64/reduce-add.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/reduce-add.ll +++ llvm/test/Analysis/CostModel/AArch64/reduce-add.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -passes="print" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @reduce() { ; CHECK-LABEL: 'reduce' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1i8 = call i8 @llvm.vector.reduce.add.v1i8(<1 x i8> undef) Index: llvm/test/Analysis/CostModel/AArch64/reduce-and.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/reduce-and.ll +++ llvm/test/Analysis/CostModel/AArch64/reduce-and.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -passes="print" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @reduce() { ; CHECK-LABEL: 'reduce' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %V1 = call i1 @llvm.vector.reduce.and.v1i1(<1 x i1> undef) Index: llvm/test/Analysis/CostModel/AArch64/reduce-fadd.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/reduce-fadd.ll +++ llvm/test/Analysis/CostModel/AArch64/reduce-fadd.ll @@ -2,6 +2,8 @@ ; RUN: opt -passes='print' 2>&1 -disable-output -mtriple=aarch64--linux-gnu < %s | FileCheck %s ; RUN: opt -passes='print' 2>&1 -disable-output -mtriple=aarch64--linux-gnu -mattr=+fullfp16 < %s | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @strict_fp_reductions() { ; CHECK-LABEL: 'strict_fp_reductions' ; CHECK-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %fadd_v4f16 = call half @llvm.vector.reduce.fadd.v4f16(half 0xH0000, <4 x half> undef) Index: llvm/test/Analysis/CostModel/AArch64/reduce-minmax.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/reduce-minmax.ll +++ llvm/test/Analysis/CostModel/AArch64/reduce-minmax.ll @@ -2,6 +2,8 @@ ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -passes="print" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s --check-prefixes=CHECK,CHECK-NOF16 ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -mattr=+fullfp16 -passes="print" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s --check-prefixes=CHECK,CHECK-F16 +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @reduce_umin() { ; CHECK-LABEL: 'reduce_umin' ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1i8 = call i8 @llvm.vector.reduce.umin.v1i8(<1 x i8> undef) Index: llvm/test/Analysis/CostModel/AArch64/reduce-or.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/reduce-or.ll +++ llvm/test/Analysis/CostModel/AArch64/reduce-or.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -passes="print" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @reduce() { ; CHECK-LABEL: 'reduce' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %V1 = call i1 @llvm.vector.reduce.or.v1i1(<1 x i1> undef) Index: llvm/test/Analysis/CostModel/AArch64/reduce-xor.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/reduce-xor.ll +++ llvm/test/Analysis/CostModel/AArch64/reduce-xor.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -passes="print" -cost-kind=throughput 2>&1 -disable-output | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @reduce() { ; CHECK-LABEL: 'reduce' ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %V1 = call i1 @llvm.vector.reduce.xor.v1i1(<1 x i1> undef) Index: llvm/test/Analysis/CostModel/AArch64/rem.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/rem.ll +++ llvm/test/Analysis/CostModel/AArch64/rem.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -passes="print" 2>&1 -disable-output | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define i32 @srem() { ; CHECK-LABEL: 'srem' ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %I64 = srem i64 undef, undef Index: llvm/test/Analysis/CostModel/AArch64/shuffle-broadcast.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/shuffle-broadcast.ll +++ llvm/test/Analysis/CostModel/AArch64/shuffle-broadcast.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=aarch64--linux-gnu -passes="print" 2>&1 -disable-output | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @broadcast() { ; CHECK-LABEL: 'broadcast' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> zeroinitializer Index: llvm/test/Analysis/CostModel/AArch64/shuffle-load.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/shuffle-load.ll +++ llvm/test/Analysis/CostModel/AArch64/shuffle-load.ll @@ -6,6 +6,8 @@ ; as opposed to scalar loads, inserts and splats as that is how ; getShuffleCost currently recognizes them. +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @shuffle() { ; CHECK-LABEL: 'shuffle' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %lv2i8 = load <2 x i8>, ptr undef, align 2 Index: llvm/test/Analysis/CostModel/AArch64/shuffle-other.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/shuffle-other.ll +++ llvm/test/Analysis/CostModel/AArch64/shuffle-other.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=aarch64--linux-gnu -passes="print" 2>&1 -disable-output | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @shuffle() { ; CHECK-LABEL: 'shuffle' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> Index: llvm/test/Analysis/CostModel/AArch64/shuffle-reverse.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/shuffle-reverse.ll +++ llvm/test/Analysis/CostModel/AArch64/shuffle-reverse.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=aarch64--linux-gnu -passes="print" 2>&1 -disable-output | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + ; ; Verify the cost model for reverse shuffles. ; Index: llvm/test/Analysis/CostModel/AArch64/shuffle-select.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/shuffle-select.ll +++ llvm/test/Analysis/CostModel/AArch64/shuffle-select.ll @@ -1,6 +1,8 @@ ; RUN: opt < %s -mtriple=aarch64--linux-gnu -passes="print" 2>&1 -disable-output | FileCheck %s --check-prefix=COST ; RUN: llc < %s -mtriple=aarch64--linux-gnu | FileCheck %s --check-prefix=CODE +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + ; COST-LABEL: sel.v8i8 ; COST: Found an estimated cost of 42 for instruction: %tmp0 = shufflevector <8 x i8> %v0, <8 x i8> %v1, <8 x i32> ; CODE-LABEL: sel.v8i8 Index: llvm/test/Analysis/CostModel/AArch64/shuffle-transpose.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/shuffle-transpose.ll +++ llvm/test/Analysis/CostModel/AArch64/shuffle-transpose.ll @@ -1,6 +1,8 @@ ; RUN: opt < %s -mtriple=aarch64--linux-gnu -passes="print" 2>&1 -disable-output | FileCheck %s --check-prefix=COST ; RUN: llc < %s -mtriple=aarch64--linux-gnu | FileCheck %s --check-prefix=CODE +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + ; COST-LABEL: trn1.v8i8 ; COST: Found an estimated cost of 1 for instruction: %tmp0 = shufflevector <8 x i8> %v0, <8 x i8> %v1, <8 x i32> ; CODE-LABEL: trn1.v8i8 Index: llvm/test/Analysis/CostModel/AArch64/splice.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/splice.ll +++ llvm/test/Analysis/CostModel/AArch64/splice.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -passes="print" 2>&1 -disable-output -S -mtriple=aarch64--linux-gnu | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @vector_splice() #0 { ; CHECK-LABEL: 'vector_splice' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splice.v16i8 = call <16 x i8> @llvm.experimental.vector.splice.v16i8(<16 x i8> zeroinitializer, <16 x i8> zeroinitializer, i32 1) Index: llvm/test/Analysis/CostModel/AArch64/store.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/store.ll +++ llvm/test/Analysis/CostModel/AArch64/store.ll @@ -3,6 +3,8 @@ ; RUN: opt < %s -passes="print" -cost-kind=code-size 2>&1 -disable-output -mtriple=aarch64-unknown | FileCheck %s --check-prefix=SIZE ; RUN: opt < %s -passes="print" 2>&1 -disable-output -mtriple=aarch64-unknown -mattr=slow-misaligned-128store | FileCheck %s --check-prefix=SLOW_MISALIGNED_128_STORE +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-v256:32:256-a0:0:32-n32-S32" define void @getMemoryOpCost() { ; If FeatureSlowMisaligned128Store is set, we penalize 128-bit stores. Index: llvm/test/Analysis/CostModel/AArch64/sve-bitcast.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-bitcast.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-bitcast.ll @@ -2,6 +2,8 @@ ; Integer to float bitcasts +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define @test_nxv2f64( %a) { ; CHECK-LABEL: test_nxv2f64 ; CHECK: Found an estimated cost of 0 for instruction: %b = bitcast %a to Index: llvm/test/Analysis/CostModel/AArch64/sve-cmpsel.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-cmpsel.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-cmpsel.ll @@ -1,5 +1,7 @@ ; 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" + ; Check icmp for legal integer vectors. define void @cmp_legal_int() { ; CHECK-LABEL: 'cmp_legal_int' Index: llvm/test/Analysis/CostModel/AArch64/sve-fixed-length.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-fixed-length.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-fixed-length.ll @@ -22,6 +22,7 @@ ; user specified vector length. target triple = "aarch64-unknown-linux-gnu" +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" ; Ensure the cost of legalisation is removed as the vector length grows. ; NOTE: Assumes BaseCost_add=1, BaseCost_fadd=2. Index: llvm/test/Analysis/CostModel/AArch64/sve-fpext.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-fpext.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-fpext.ll @@ -1,7 +1,6 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple aarch64-linux-gnu -mattr=+sve -S -o - < %s | FileCheck %s target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" -target triple = "aarch64-unknown-linux-gnu" define void @sve_fpext() { ;CHECK-LABEL: 'sve_fpext' Index: llvm/test/Analysis/CostModel/AArch64/sve-fptoi.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-fptoi.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-fptoi.ll @@ -1,7 +1,6 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple aarch64-linux-gnu -mattr=+sve -o - -S < %s | FileCheck %s target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" -target triple = "aarch64-unknown-linux-gnu" define void @sve-fptoi() { ; CHECK-LABEL: 'sve-fptoi' Index: llvm/test/Analysis/CostModel/AArch64/sve-fptrunc.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-fptrunc.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-fptrunc.ll @@ -1,7 +1,6 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mtriple aarch64-linux-gnu -mattr=+sve -S -o - < %s | FileCheck %s target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" -target triple = "aarch64-unknown-linux-gnu" define void @sve_fptruncs() { ;CHECK-LABEL: 'sve_fptruncs' Index: llvm/test/Analysis/CostModel/AArch64/sve-gather.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-gather.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-gather.ll @@ -5,6 +5,7 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mcpu=cortex-a510 < %s | FileCheck %s --check-prefix=CHECK-VSCALE-1 target triple="aarch64--linux-gnu" +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" define void @masked_gathers( %nxv4i1mask, %nxv8i1mask, <4 x i1> %v4i1mask, <1 x i1> %v1i1mask, %nxv1i1mask) #0 { ; CHECK-LABEL: 'masked_gathers' Index: llvm/test/Analysis/CostModel/AArch64/sve-illegal-types.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-illegal-types.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-illegal-types.ll @@ -1,5 +1,7 @@ ; 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 @load_store(* %ptrs) { ; CHECK-LABEL: 'load_store' ; CHECK-NEXT: Invalid cost for instruction: %load1 = load , * undef Index: llvm/test/Analysis/CostModel/AArch64/sve-insert-extract.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-insert-extract.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-insert-extract.ll @@ -5,6 +5,7 @@ ; RUN: opt -aarch64-insert-extract-base-cost=100000 -passes="print" 2>&1 -disable-output -S < %s | FileCheck --check-prefix=CHECK-HIGH %s target triple = "aarch64-unknown-linux-gnu" +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" define void @ins_el0() #0 { Index: llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll @@ -2,6 +2,8 @@ ; RUN: opt < %s -passes="print" 2>&1 -disable-output -S -mtriple=aarch64--linux-gnu -mattr=+sve | FileCheck %s ; RUN: opt < %s -passes="print" 2>&1 -type-based-intrinsic-cost -disable-output -S -mtriple=aarch64--linux-gnu -mattr=+sve | FileCheck %s --check-prefix=TYPE_BASED_ONLY +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @vector_insert_extract( %v0, %v1, <16 x i32> %v2) { ; CHECK-LABEL: 'vector_insert_extract' ; CHECK-NEXT: Cost Model: Found an estimated cost of 81 for instruction: %extract_fixed_from_scalable = call <16 x i32> @llvm.vector.extract.v16i32.nxv4i32( %v0, i64 0) Index: llvm/test/Analysis/CostModel/AArch64/sve-ldst.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-ldst.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-ldst.ll @@ -1,5 +1,7 @@ ; 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 Index: llvm/test/Analysis/CostModel/AArch64/sve-math.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-math.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-math.ll @@ -4,6 +4,8 @@ ; RUN: opt -mtriple=aarch64-- -mattr=+sve -passes="print" 2>&1 -disable-output -cost-kind=code-size < %s | FileCheck %s --check-prefix=SIZE ; RUN: opt -mtriple=aarch64-- -mattr=+sve -passes="print" 2>&1 -disable-output -cost-kind=size-latency < %s | FileCheck %s --check-prefix=SIZE_LATE +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + declare @llvm.sqrt.v2f64() define @fadd_v2f64( %a, %b) { Index: llvm/test/Analysis/CostModel/AArch64/sve-remainder.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-remainder.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-remainder.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; 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 @test_urem_srem_expand() { ; CHECK-LABEL: 'test_urem_srem_expand' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %legal_type_urem_0 = urem undef, undef Index: llvm/test/Analysis/CostModel/AArch64/sve-scatter.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-scatter.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-scatter.ll @@ -5,6 +5,7 @@ ; RUN: opt -passes="print" 2>&1 -disable-output -mcpu=cortex-a510 < %s | FileCheck %s --check-prefix=CHECK-VSCALE-1 target triple="aarch64--linux-gnu" +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" define void @masked_scatters( %nxv4i1mask, %nxv8i1mask, <4 x i1> %v4i1mask, <1 x i1> %v1i1mask, %nxv1i1mask) #0 { ; CHECK-LABEL: 'masked_scatters' Index: llvm/test/Analysis/CostModel/AArch64/sve-shuffle-broadcast.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-shuffle-broadcast.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-shuffle-broadcast.ll @@ -2,6 +2,8 @@ ; 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 @broadcast() #0{ ; CHECK-LABEL: 'broadcast' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = shufflevector undef, undef, zeroinitializer Index: llvm/test/Analysis/CostModel/AArch64/sve-stepvector.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-stepvector.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-stepvector.ll @@ -1,5 +1,7 @@ ; 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" + ; Check icmp for legal integer vectors. define void @stepvector_legal_int() { ; CHECK-LABEL: 'stepvector_legal_int' Index: llvm/test/Analysis/CostModel/AArch64/sve-trunc.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-trunc.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-trunc.ll @@ -1,5 +1,7 @@ ; RUN: opt -mtriple=aarch64-linux-gnu -mattr=+sve -passes="print" 2>&1 -disable-output < %s | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define void @sve_truncs() { ;CHECK-LABEL: 'sve_truncs' ;CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %trunc_v2i16_to_i1 = trunc undef to Index: llvm/test/Analysis/CostModel/AArch64/sve-vscale.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-vscale.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-vscale.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt -mtriple=aarch64-linux-gnu -mattr=+sve -passes="print" 2>&1 -disable-output < %s | FileCheck %s +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define i32 @vscale32() { ; CHECK-LABEL: 'vscale32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = call i32 @llvm.vscale.i32() Index: llvm/test/Analysis/CostModel/AArch64/sve-widening-instruction.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/sve-widening-instruction.ll +++ llvm/test/Analysis/CostModel/AArch64/sve-widening-instruction.ll @@ -2,6 +2,8 @@ ; 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 @widening( %in, %in2) { ; CHECK-LABEL: 'widening' Index: llvm/test/Analysis/CostModel/AArch64/vector-reduce.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/vector-reduce.ll +++ llvm/test/Analysis/CostModel/AArch64/vector-reduce.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=aarch64--linux-gnu -passes="print" 2>&1 -disable-output | FileCheck %s --check-prefix=COST +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + define i8 @add.i8.v8i8(<8 x i8> %v) { ; COST-LABEL: 'add.i8.v8i8' ; COST-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r = call i8 @llvm.vector.reduce.add.v8i8(<8 x i8> %v) Index: llvm/test/Analysis/CostModel/AArch64/vector-select.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/vector-select.ll +++ llvm/test/Analysis/CostModel/AArch64/vector-select.ll @@ -2,6 +2,8 @@ ; RUN: opt < %s -mtriple=aarch64--linux-gnu -passes="print" 2>&1 -disable-output -mattr=+fullfp16 | FileCheck %s --check-prefixes=COST,COST-FULLFP16 ; RUN: llc < %s -mtriple=aarch64--linux-gnu -mattr=+fullfp16 | FileCheck %s --check-prefix=CODE +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" + ; COST-LABEL: v8i8_select_eq ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp.1 = icmp eq <8 x i8> %a, %b ; COST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s.1 = select <8 x i1> %cmp.1, <8 x i8> %a, <8 x i8> %c