| From 2e7c35ea12c88d0876e453a936ecce0456353621 Mon Sep 17 00:00:00 2001 |
| From: David Green <david.green@arm.com> |
| Date: Sat, 26 Feb 2022 17:59:02 +0000 |
| Subject: [PATCH] [AArch64] Cleanup and extend cast costs. NFC |
| |
| --- |
| llvm/test/Analysis/CostModel/AArch64/cast.ll | 395 ++++++++++++------- |
| 1 file changed, 254 insertions(+), 141 deletions(-) |
| |
| diff --git a/llvm/test/Analysis/CostModel/AArch64/cast.ll b/llvm/test/Analysis/CostModel/AArch64/cast.ll |
| index f69c07217589..dbb0581a7d7f 100644 |
| --- a/llvm/test/Analysis/CostModel/AArch64/cast.ll |
| +++ b/llvm/test/Analysis/CostModel/AArch64/cast.ll |
| @@ -1,9 +1,8 @@ |
| ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py |
| -; RUN: opt -cost-model -analyze -mtriple=aarch64-none-linux-gnueabi %s -o - | FileCheck --check-prefixes=CHECK,NOFP16 %s |
| -; RUN: opt -cost-model -analyze -mtriple=aarch64-none-linux-gnueabi -mattr=+fullfp16 %s -o - | FileCheck --check-prefixes=CHECK,FULLFP16 %s |
| +; RUN: opt -cost-model -analyze -mtriple=aarch64-none-linux-gnueabi %s | FileCheck --check-prefixes=CHECK %s |
| |
| -define i32 @casts_no_users() { |
| -; CHECK-LABEL: 'casts_no_users' |
| +define void @ext() { |
| +; CHECK-LABEL: 'ext' |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r0 = sext i1 undef to i8 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r1 = zext i1 undef to i8 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r2 = sext i1 undef to i16 |
| @@ -12,28 +11,224 @@ define i32 @casts_no_users() { |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r5 = zext i1 undef to i32 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r6 = sext i1 undef to i64 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r7 = zext i1 undef to i64 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r8 = trunc i8 undef to i1 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r9 = sext i8 undef to i16 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r10 = zext i8 undef to i16 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r11 = sext i8 undef to i32 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r12 = zext i8 undef to i32 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r13 = sext i8 undef to i64 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r14 = zext i8 undef to i64 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r15 = trunc i16 undef to i1 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r16 = trunc i16 undef to i8 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r17 = sext i16 undef to i32 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r18 = zext i16 undef to i32 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r19 = sext i16 undef to i64 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r20 = zext i16 undef to i64 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r24 = sext i32 undef to i64 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r25 = zext i32 undef to i64 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s2i8i16 = sext <2 x i8> undef to <2 x i16> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z2i8i16 = zext <2 x i8> undef to <2 x i16> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s2i8i32 = sext <2 x i8> undef to <2 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z2i8i32 = zext <2 x i8> undef to <2 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s2i8i64 = sext <2 x i8> undef to <2 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z2i8i64 = zext <2 x i8> undef to <2 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s2i16i32 = sext <2 x i16> undef to <2 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z2i16i32 = zext <2 x i16> undef to <2 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s2i16i64 = sext <2 x i16> undef to <2 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z2i16i64 = zext <2 x i16> undef to <2 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s2i32i64 = sext <2 x i32> undef to <2 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z2i32i64 = zext <2 x i32> undef to <2 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i16 = sext <4 x i8> undef to <4 x i16> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i16 = zext <4 x i8> undef to <4 x i16> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i8i32 = sext <4 x i8> undef to <4 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i8i32 = zext <4 x i8> undef to <4 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s4i8i64 = sext <4 x i8> undef to <4 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %z4i8i64 = zext <4 x i8> undef to <4 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s4i16i32 = sext <4 x i16> undef to <4 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z4i16i32 = zext <4 x i16> undef to <4 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s4i16i64 = sext <4 x i16> undef to <4 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %z4i16i64 = zext <4 x i16> undef to <4 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s4i32i64 = sext <4 x i32> undef to <4 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %z4i32i64 = zext <4 x i32> undef to <4 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s8i8i16 = sext <8 x i8> undef to <8 x i16> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %z8i8i16 = zext <8 x i8> undef to <8 x i16> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %s8i8i32 = sext <8 x i8> undef to <8 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %z8i8i32 = zext <8 x i8> undef to <8 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %s8i8i64 = sext <8 x i8> undef to <8 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %z8i8i64 = zext <8 x i8> undef to <8 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s8i16i32 = sext <8 x i16> undef to <8 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %z8i16i32 = zext <8 x i16> undef to <8 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %s8i16i64 = sext <8 x i16> undef to <8 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %z8i16i64 = zext <8 x i16> undef to <8 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %s8i32i64 = sext <8 x i32> undef to <8 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %z8i32i64 = zext <8 x i32> undef to <8 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %s16i8i16 = sext <16 x i8> undef to <16 x i16> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %z16i8i16 = zext <16 x i8> undef to <16 x i16> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %s16i8i32 = sext <16 x i8> undef to <16 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %z16i8i32 = zext <16 x i8> undef to <16 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %s16i8i64 = sext <16 x i8> undef to <16 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %z16i8i64 = zext <16 x i8> undef to <16 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %s16i16i32 = sext <16 x i16> undef to <16 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %z16i16i32 = zext <16 x i16> undef to <16 x i32> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %s16i16i64 = sext <16 x i16> undef to <16 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %z16i16i64 = zext <16 x i16> undef to <16 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %s16i32i64 = sext <16 x i32> undef to <16 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %z16i32i64 = zext <16 x i32> undef to <16 x i64> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void |
| +; |
| + %r0 = sext i1 undef to i8 |
| + %r1 = zext i1 undef to i8 |
| + %r2 = sext i1 undef to i16 |
| + %r3 = zext i1 undef to i16 |
| + %r4 = sext i1 undef to i32 |
| + %r5 = zext i1 undef to i32 |
| + %r6 = sext i1 undef to i64 |
| + %r7 = zext i1 undef to i64 |
| + %r9 = sext i8 undef to i16 |
| + %r10 = zext i8 undef to i16 |
| + %r11 = sext i8 undef to i32 |
| + %r12 = zext i8 undef to i32 |
| + %r13 = sext i8 undef to i64 |
| + %r14 = zext i8 undef to i64 |
| + %r17 = sext i16 undef to i32 |
| + %r18 = zext i16 undef to i32 |
| + %r19 = sext i16 undef to i64 |
| + %r20 = zext i16 undef to i64 |
| + %r24 = sext i32 undef to i64 |
| + %r25 = zext i32 undef to i64 |
| + |
| + %s2i8i16 = sext <2 x i8> undef to <2 x i16> |
| + %z2i8i16 = zext <2 x i8> undef to <2 x i16> |
| + %s2i8i32 = sext <2 x i8> undef to <2 x i32> |
| + %z2i8i32 = zext <2 x i8> undef to <2 x i32> |
| + %s2i8i64 = sext <2 x i8> undef to <2 x i64> |
| + %z2i8i64 = zext <2 x i8> undef to <2 x i64> |
| + %s2i16i32 = sext <2 x i16> undef to <2 x i32> |
| + %z2i16i32 = zext <2 x i16> undef to <2 x i32> |
| + %s2i16i64 = sext <2 x i16> undef to <2 x i64> |
| + %z2i16i64 = zext <2 x i16> undef to <2 x i64> |
| + %s2i32i64 = sext <2 x i32> undef to <2 x i64> |
| + %z2i32i64 = zext <2 x i32> undef to <2 x i64> |
| + |
| + %s4i8i16 = sext <4 x i8> undef to <4 x i16> |
| + %z4i8i16 = zext <4 x i8> undef to <4 x i16> |
| + %s4i8i32 = sext <4 x i8> undef to <4 x i32> |
| + %z4i8i32 = zext <4 x i8> undef to <4 x i32> |
| + %s4i8i64 = sext <4 x i8> undef to <4 x i64> |
| + %z4i8i64 = zext <4 x i8> undef to <4 x i64> |
| + %s4i16i32 = sext <4 x i16> undef to <4 x i32> |
| + %z4i16i32 = zext <4 x i16> undef to <4 x i32> |
| + %s4i16i64 = sext <4 x i16> undef to <4 x i64> |
| + %z4i16i64 = zext <4 x i16> undef to <4 x i64> |
| + %s4i32i64 = sext <4 x i32> undef to <4 x i64> |
| + %z4i32i64 = zext <4 x i32> undef to <4 x i64> |
| + |
| + %s8i8i16 = sext <8 x i8> undef to <8 x i16> |
| + %z8i8i16 = zext <8 x i8> undef to <8 x i16> |
| + %s8i8i32 = sext <8 x i8> undef to <8 x i32> |
| + %z8i8i32 = zext <8 x i8> undef to <8 x i32> |
| + %s8i8i64 = sext <8 x i8> undef to <8 x i64> |
| + %z8i8i64 = zext <8 x i8> undef to <8 x i64> |
| + %s8i16i32 = sext <8 x i16> undef to <8 x i32> |
| + %z8i16i32 = zext <8 x i16> undef to <8 x i32> |
| + %s8i16i64 = sext <8 x i16> undef to <8 x i64> |
| + %z8i16i64 = zext <8 x i16> undef to <8 x i64> |
| + %s8i32i64 = sext <8 x i32> undef to <8 x i64> |
| + %z8i32i64 = zext <8 x i32> undef to <8 x i64> |
| + |
| + %s16i8i16 = sext <16 x i8> undef to <16 x i16> |
| + %z16i8i16 = zext <16 x i8> undef to <16 x i16> |
| + %s16i8i32 = sext <16 x i8> undef to <16 x i32> |
| + %z16i8i32 = zext <16 x i8> undef to <16 x i32> |
| + %s16i8i64 = sext <16 x i8> undef to <16 x i64> |
| + %z16i8i64 = zext <16 x i8> undef to <16 x i64> |
| + %s16i16i32 = sext <16 x i16> undef to <16 x i32> |
| + %z16i16i32 = zext <16 x i16> undef to <16 x i32> |
| + %s16i16i64 = sext <16 x i16> undef to <16 x i64> |
| + %z16i16i64 = zext <16 x i16> undef to <16 x i64> |
| + %s16i32i64 = sext <16 x i32> undef to <16 x i64> |
| + %z16i32i64 = zext <16 x i32> undef to <16 x i64> |
| + ret void |
| +} |
| + |
| +define void @trunc() { |
| +; CHECK-LABEL: 'trunc' |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r8 = trunc i8 undef to i1 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r15 = trunc i16 undef to i1 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r16 = trunc i16 undef to i8 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r21 = trunc i32 undef to i1 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r22 = trunc i32 undef to i8 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r23 = trunc i32 undef to i16 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r24 = sext i32 undef to i64 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r25 = zext i32 undef to i64 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r26 = trunc i64 undef to i1 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r27 = trunc i64 undef to i8 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r28 = trunc i64 undef to i16 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r29 = trunc i64 undef to i32 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %s2i8i16 = trunc <2 x i16> undef to <2 x i8> |
| +; 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: %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 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: %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 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 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 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 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 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 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 |
| +; |
| + %r8 = trunc i8 undef to i1 |
| + %r15 = trunc i16 undef to i1 |
| + %r16 = trunc i16 undef to i8 |
| + %r21 = trunc i32 undef to i1 |
| + %r22 = trunc i32 undef to i8 |
| + %r23 = trunc i32 undef to i16 |
| + %r26 = trunc i64 undef to i1 |
| + %r27 = trunc i64 undef to i8 |
| + %r28 = trunc i64 undef to i16 |
| + %r29 = trunc i64 undef to i32 |
| + |
| + %s2i8i16 = trunc <2 x i16> undef to <2 x i8> |
| + %s2i8i32 = trunc <2 x i32> undef to <2 x i8> |
| + %s2i8i64 = trunc <2 x i64> undef to <2 x i8> |
| + %s2i16i32 = trunc <2 x i32> undef to <2 x i16> |
| + %s2i16i64 = trunc <2 x i64> undef to <2 x i16> |
| + %s2i32i64 = trunc <2 x i64> undef to <2 x i32> |
| + |
| + %s4i8i16 = trunc <4 x i16> undef to <4 x i8> |
| + %s4i8i32 = trunc <4 x i32> undef to <4 x i8> |
| + %s4i8i64 = trunc <4 x i64> undef to <4 x i8> |
| + %s4i16i32 = trunc <4 x i32> undef to <4 x i16> |
| + %s4i16i64 = trunc <4 x i64> undef to <4 x i16> |
| + %s4i32i64 = trunc <4 x i64> undef to <4 x i32> |
| + |
| + %s8i8i16 = trunc <8 x i16> undef to <8 x i8> |
| + %s8i8i32 = trunc <8 x i32> undef to <8 x i8> |
| + %s8i8i64 = trunc <8 x i64> undef to <8 x i8> |
| + %s8i16i32 = trunc <8 x i32> undef to <8 x i16> |
| + %s8i16i64 = trunc <8 x i64> undef to <8 x i16> |
| + %s8i32i64 = trunc <8 x i64> undef to <8 x i32> |
| + |
| + %s16i8i16 = trunc <16 x i16> undef to <16 x i8> |
| + %s16i8i32 = trunc <16 x i32> undef to <16 x i8> |
| + %s16i8i64 = trunc <16 x i64> undef to <16 x i8> |
| + %s16i16i32 = trunc <16 x i32> undef to <16 x i16> |
| + %s16i16i64 = trunc <16 x i64> undef to <16 x i16> |
| + %s16i32i64 = trunc <16 x i64> undef to <16 x i32> |
| + ret void |
| +} |
| + |
| +define i32 @casts_no_users() { |
| +; CHECK-LABEL: 'casts_no_users' |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r30 = fptoui float undef to i1 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r31 = fptosi float undef to i1 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r32 = fptoui float undef to i8 |
| @@ -74,30 +269,6 @@ define i32 @casts_no_users() { |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r67 = uitofp i64 undef to float |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r68 = sitofp i64 undef to double |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r69 = uitofp i64 undef to double |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %q70 = sext <4 x i8> undef to <4 x i32> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %q71 = sext <8 x i8> undef to <8 x i16> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s70 = sext <4 x i8> undef to <4 x i32> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r70 = sext <8 x i8> undef to <8 x i32> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %r71 = sext <16 x i8> undef to <16 x i32> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %q72 = zext <4 x i8> undef to <4 x i32> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %q73 = zext <8 x i8> undef to <8 x i16> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %s72 = zext <4 x i8> undef to <4 x i32> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r72 = zext <8 x i8> undef to <8 x i32> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %r73 = zext <16 x i8> undef to <16 x i32> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %rext_0 = sext <8 x i8> undef to <8 x i64> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %rext_1 = zext <8 x i8> undef to <8 x i64> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %rext_2 = sext <8 x i16> undef to <8 x i64> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %rext_3 = zext <8 x i16> undef to <8 x i64> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %rext_4 = sext <4 x i16> undef to <4 x i64> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %rext_5 = zext <4 x i16> undef to <4 x i64> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %rext_6 = sext <2 x i8> undef to <2 x i64> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %rext_7 = zext <2 x i8> undef to <2 x i64> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %rext_8 = sext <2 x i16> undef to <2 x i64> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %rext_9 = zext <2 x i16> undef to <2 x i64> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %rext_a = sext <2 x i32> undef to <2 x i64> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %rext_b = zext <2 x i32> undef to <2 x i64> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r74 = trunc <8 x i32> undef to <8 x i8> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %r75 = trunc <16 x i32> undef to <16 x i8> |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r80 = fptrunc double undef to float |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r81 = fptrunc <2 x double> undef to <2 x float> |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r82 = fptrunc <4 x double> undef to <4 x float> |
| @@ -270,60 +441,26 @@ define i32 @casts_no_users() { |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %r249 = sitofp <16 x i64> undef to <16 x double> |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r250 = uitofp <8 x i1> undef to <8 x half> |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r251 = sitofp <8 x i1> undef to <8 x half> |
| -; NOFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r252 = uitofp <8 x i8> undef to <8 x half> |
| -; NOFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r253 = sitofp <8 x i8> undef to <8 x half> |
| -; FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r252 = uitofp <8 x i8> undef to <8 x half> |
| -; FULLFP16-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r253 = sitofp <8 x i8> undef to <8 x half> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r252 = uitofp <8 x i8> undef to <8 x half> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r253 = sitofp <8 x i8> undef to <8 x half> |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r254 = uitofp <8 x i16> undef to <8 x half> |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r255 = sitofp <8 x i16> undef to <8 x half> |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r256 = uitofp <8 x i32> undef to <8 x half> |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r257 = sitofp <8 x i32> undef to <8 x half> |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r258 = uitofp <8 x i64> undef to <8 x half> |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r259 = sitofp <8 x i64> undef to <8 x half> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r260 = uitofp <16 x i1> undef to <16 x half> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r261 = sitofp <16 x i1> undef to <16 x half> |
| -; NOFP16-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r262 = uitofp <16 x i8> undef to <16 x half> |
| -; NOFP16-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r263 = sitofp <16 x i8> undef to <16 x half> |
| -; FULLFP16-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r262 = uitofp <16 x i8> undef to <16 x half> |
| -; FULLFP16-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r263 = sitofp <16 x i8> undef to <16 x half> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r264 = uitofp <16 x i16> undef to <16 x half> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r265 = sitofp <16 x i16> undef to <16 x half> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %r266 = uitofp <16 x i32> undef to <16 x half> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %r267 = sitofp <16 x i32> undef to <16 x half> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r268 = uitofp <16 x i64> undef to <16 x half> |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r269 = sitofp <16 x i64> undef to <16 x half> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r260 = uitofp <16 x i1> undef to <16 x half> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r261 = sitofp <16 x i1> undef to <16 x half> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r262 = uitofp <16 x i8> undef to <16 x half> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r263 = sitofp <16 x i8> undef to <16 x half> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r264 = uitofp <16 x i16> undef to <16 x half> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r265 = sitofp <16 x i16> undef to <16 x half> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %r266 = uitofp <16 x i32> undef to <16 x half> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %r267 = sitofp <16 x i32> undef to <16 x half> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r268 = uitofp <16 x i64> undef to <16 x half> |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r269 = sitofp <16 x i64> undef to <16 x half> |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| ; |
| - %r0 = sext i1 undef to i8 |
| - %r1 = zext i1 undef to i8 |
| - %r2 = sext i1 undef to i16 |
| - %r3 = zext i1 undef to i16 |
| - %r4 = sext i1 undef to i32 |
| - %r5 = zext i1 undef to i32 |
| - %r6 = sext i1 undef to i64 |
| - %r7 = zext i1 undef to i64 |
| - %r8 = trunc i8 undef to i1 |
| - %r9 = sext i8 undef to i16 |
| - %r10 = zext i8 undef to i16 |
| - %r11 = sext i8 undef to i32 |
| - %r12 = zext i8 undef to i32 |
| - %r13 = sext i8 undef to i64 |
| - %r14 = zext i8 undef to i64 |
| - %r15 = trunc i16 undef to i1 |
| - %r16 = trunc i16 undef to i8 |
| - %r17 = sext i16 undef to i32 |
| - %r18 = zext i16 undef to i32 |
| - %r19 = sext i16 undef to i64 |
| - %r20 = zext i16 undef to i64 |
| - %r21 = trunc i32 undef to i1 |
| - %r22 = trunc i32 undef to i8 |
| - %r23 = trunc i32 undef to i16 |
| - %r24 = sext i32 undef to i64 |
| - %r25 = zext i32 undef to i64 |
| - %r26 = trunc i64 undef to i1 |
| - %r27 = trunc i64 undef to i8 |
| - %r28 = trunc i64 undef to i16 |
| - %r29 = trunc i64 undef to i32 |
| %r30 = fptoui float undef to i1 |
| %r31 = fptosi float undef to i1 |
| %r32 = fptoui float undef to i8 |
| @@ -364,30 +501,6 @@ define i32 @casts_no_users() { |
| %r67 = uitofp i64 undef to float |
| %r68 = sitofp i64 undef to double |
| %r69 = uitofp i64 undef to double |
| - %q70 = sext <4 x i8> undef to <4 x i32> |
| - %q71 = sext <8 x i8> undef to <8 x i16> |
| - %s70 = sext <4 x i8> undef to <4 x i32> |
| - %r70 = sext <8 x i8> undef to <8 x i32> |
| - %r71 = sext <16 x i8> undef to <16 x i32> |
| - %q72 = zext <4 x i8> undef to <4 x i32> |
| - %q73 = zext <8 x i8> undef to <8 x i16> |
| - %s72 = zext <4 x i8> undef to <4 x i32> |
| - %r72 = zext <8 x i8> undef to <8 x i32> |
| - %r73 = zext <16 x i8> undef to <16 x i32> |
| - %rext_0 = sext <8 x i8> undef to <8 x i64> |
| - %rext_1 = zext <8 x i8> undef to <8 x i64> |
| - %rext_2 = sext <8 x i16> undef to <8 x i64> |
| - %rext_3 = zext <8 x i16> undef to <8 x i64> |
| - %rext_4 = sext <4 x i16> undef to <4 x i64> |
| - %rext_5 = zext <4 x i16> undef to <4 x i64> |
| - %rext_6 = sext <2 x i8> undef to <2 x i64> |
| - %rext_7 = zext <2 x i8> undef to <2 x i64> |
| - %rext_8 = sext <2 x i16> undef to <2 x i64> |
| - %rext_9 = zext <2 x i16> undef to <2 x i64> |
| - %rext_a = sext <2 x i32> undef to <2 x i64> |
| - %rext_b = zext <2 x i32> undef to <2 x i64> |
| - %r74 = trunc <8 x i32> undef to <8 x i8> |
| - %r75 = trunc <16 x i32> undef to <16 x i8> |
| %r80 = fptrunc double undef to float |
| %r81 = fptrunc <2 x double> undef to <2 x float> |
| %r82 = fptrunc <4 x double> undef to <4 x float> |
| @@ -607,24 +720,24 @@ define i32 @casts_with_users(i8 %a, i16 %b, i32 %c, i64 %d, i1 %e) { |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r3 = sext i16 %b to i32 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r4 = sext i16 %b to i64 |
| ; 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 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r1, i32* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r2, i64* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r3, i32* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r4, i64* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r5, i64* undef |
| +; 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 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: %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 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r9 = zext i16 %b to i32 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r10 = zext i16 %b to i64 |
| ; 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 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r7, i32* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r8, i64* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r9, i32* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r10, i64* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r11, i64* undef |
| +; 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 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 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 |
| @@ -648,14 +761,14 @@ define i32 @casts_with_users(i8 %a, i16 %b, i32 %c, i64 %d, i1 %e) { |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r23 = zext i1 %e to i16 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r24 = zext i1 %e to i32 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r25 = zext i1 %e to i64 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 %r18, i8* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %r19, i16* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r20, i32* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r21, i64* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 %r22, i8* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %r23, i16* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r24, i32* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r25, i64* undef |
| +; 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 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 0 for instruction: ret i32 %r12 |
| ; |
| %r0 = sext i8 %a to i16 |
| @@ -745,18 +858,18 @@ define i32 @bitcasts() { |
| |
| define i32 @load_extends() #0 { |
| ; CHECK-LABEL: 'load_extends' |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi8 = load i8, i8* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi16 = load i16, i16* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi32 = load i32, i32* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %loadv2i8 = load <2 x i8>, <2 x i8>* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %loadv4i8 = load <4 x i8>, <4 x i8>* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv8i8 = load <8 x i8>, <8 x i8>* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %loadv2i16 = load <2 x i16>, <2 x i16>* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv4i16 = load <4 x i16>, <4 x i16>* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv2i32 = load <2 x i32>, <2 x i32>* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv4i32 = load <4 x i32>, <4 x i32>* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadnxv2i32 = load <vscale x 2 x i32>, <vscale x 2 x i32>* undef |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadnxv4i32 = load <vscale x 4 x i32>, <vscale x 4 x i32>* undef |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi8 = load i8, i8* undef, align 1 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi16 = load i16, i16* undef, align 2 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi32 = load i32, i32* undef, align 4 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %loadv2i8 = load <2 x i8>, <2 x i8>* undef, align 2 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %loadv4i8 = load <4 x i8>, <4 x i8>* undef, align 4 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv8i8 = load <8 x i8>, <8 x i8>* undef, align 8 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %loadv2i16 = load <2 x i16>, <2 x i16>* undef, align 4 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv4i16 = load <4 x i16>, <4 x i16>* undef, align 8 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv2i32 = load <2 x i32>, <2 x i32>* undef, align 8 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv4i32 = load <4 x i32>, <4 x i32>* undef, align 16 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadnxv2i32 = load <vscale x 2 x i32>, <vscale x 2 x i32>* undef, align 8 |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadnxv4i32 = load <vscale x 4 x i32>, <vscale x 4 x i32>* undef, align 16 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r0 = sext i8 %loadi8 to i16 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r1 = zext i8 %loadi8 to i16 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r2 = sext i8 %loadi8 to i32 |
| @@ -840,17 +953,17 @@ define i32 @load_extends() #0 { |
| define i32 @store_truncs() { |
| ; CHECK-LABEL: 'store_truncs' |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r0 = trunc i64 undef to i8 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 %r0, i8* undef |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 %r0, i8* undef, align 1 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r1 = trunc i64 undef to i16 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %r1, i16* undef |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %r1, i16* undef, align 2 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r2 = trunc i64 undef to i32 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r2, i32* undef |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r2, i32* undef, align 4 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r3 = trunc i32 undef to i8 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 %r3, i8* undef |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 %r3, i8* undef, align 1 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r4 = trunc i32 undef to i16 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %r4, i16* undef |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %r4, i16* undef, align 2 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r5 = trunc i16 undef to i8 |
| -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 %r5, i8* undef |
| +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 %r5, i8* undef, align 1 |
| ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef |
| ; |
| %r0 = trunc i64 undef to i8 |
| -- |
| 2.36.0.rc0.470.gd361397f0d-goog |
| |