diff --git a/llvm/test/Analysis/CostModel/AArch64/cast.ll b/llvm/test/Analysis/CostModel/AArch64/cast.ll --- a/llvm/test/Analysis/CostModel/AArch64/cast.ll +++ b/llvm/test/Analysis/CostModel/AArch64/cast.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py -; 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 +; RUN: opt -passes="print" 2>&1 -data-layout="e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" -disable-output -mtriple=aarch64-none-linux-gnueabi %s | FileCheck --check-prefixes=CHECK,CHECK-NOFP16 %s +; RUN: opt -passes="print" 2>&1 -data-layout="e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" -disable-output -mtriple=aarch64-none-linux-gnueabi -mattr=+fullfp16 %s | FileCheck --check-prefixes=CHECK,CHECK-FP16 %s define void @ext() { ; CHECK-LABEL: 'ext' @@ -165,25 +165,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 +680,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 +692,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 +722,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