From: David Green Date: Mon, 12 Aug 2019 15:40:27 +0000 (+0000) Subject: [ARM] Add or update a number of costmodel tests. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d4c8890067d40d9b835a988ae7243735360f398b;p=llvm [ARM] Add or update a number of costmodel tests. NFC This adds a number of cost model tests for ARM, useful for MVE. It also re-jigs some of the existing tests to make them easier to update and read. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368586 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Analysis/CostModel/ARM/arith.ll b/test/Analysis/CostModel/ARM/arith.ll new file mode 100644 index 00000000000..a101b8faa3a --- /dev/null +++ b/test/Analysis/CostModel/ARM/arith.ll @@ -0,0 +1,419 @@ +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py +; RUN: opt -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve < %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-MVE2 + +define void @i8() { +; CHECK-LABEL: 'i8' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i8 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d = sub i8 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = mul i8 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = ashr i8 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g = lshr i8 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h = shl i8 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i8 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i8 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i8 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c = add i8 undef, undef + %d = sub i8 undef, undef + %e = mul i8 undef, undef + %f = ashr i8 undef, undef + %g = lshr i8 undef, undef + %h = shl i8 undef, undef + %i = and i8 undef, undef + %j = or i8 undef, undef + %k = xor i8 undef, undef + ret void +} + +define void @i16() { +; CHECK-LABEL: 'i16' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i16 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d = sub i16 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = mul i16 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = ashr i16 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g = lshr i16 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h = shl i16 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i16 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i16 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i16 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c = add i16 undef, undef + %d = sub i16 undef, undef + %e = mul i16 undef, undef + %f = ashr i16 undef, undef + %g = lshr i16 undef, undef + %h = shl i16 undef, undef + %i = and i16 undef, undef + %j = or i16 undef, undef + %k = xor i16 undef, undef + ret void +} + +define void @i32() { +; CHECK-LABEL: 'i32' +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i32 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d = sub i32 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = mul i32 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = ashr i32 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g = lshr i32 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h = shl i32 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i32 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i32 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i32 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c = add i32 undef, undef + %d = sub i32 undef, undef + %e = mul i32 undef, undef + %f = ashr i32 undef, undef + %g = lshr i32 undef, undef + %h = shl i32 undef, undef + %i = and i32 undef, undef + %j = or i32 undef, undef + %k = xor i32 undef, undef + ret void +} + +define void @i64() { +; CHECK-LABEL: 'i64' +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = add i64 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = sub i64 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = mul i64 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f = ashr i64 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g = lshr i64 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h = shl i64 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i = and i64 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j = or i64 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k = xor i64 undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c = add i64 undef, undef + %d = sub i64 undef, undef + %e = mul i64 undef, undef + %f = ashr i64 undef, undef + %g = lshr i64 undef, undef + %h = shl i64 undef, undef + %i = and i64 undef, undef + %j = or i64 undef, undef + %k = xor i64 undef, undef + ret void +} + + +define void @vi8() { +; CHECK-LABEL: 'vi8' +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %c2 = add <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %d2 = sub <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %e2 = mul <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %f2 = ashr <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %g2 = lshr <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %h2 = shl <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c4 = add <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d4 = sub <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e4 = mul <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f4 = ashr <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g4 = lshr <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h4 = shl <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = and <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j4 = or <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k4 = xor <4 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = add <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d8 = sub <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e8 = mul <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f8 = ashr <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g8 = lshr <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h8 = shl <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = and <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j8 = or <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k8 = xor <8 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c16 = add <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d16 = sub <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e16 = mul <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f16 = ashr <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g16 = lshr <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h16 = shl <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = and <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j16 = or <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k16 = xor <16 x i8> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c2 = add <2 x i8> undef, undef + %d2 = sub <2 x i8> undef, undef + %e2 = mul <2 x i8> undef, undef + %f2 = ashr <2 x i8> undef, undef + %g2 = lshr <2 x i8> undef, undef + %h2 = shl <2 x i8> undef, undef + %i2 = and <2 x i8> undef, undef + %j2 = or <2 x i8> undef, undef + %k2 = xor <2 x i8> undef, undef + %c4 = add <4 x i8> undef, undef + %d4 = sub <4 x i8> undef, undef + %e4 = mul <4 x i8> undef, undef + %f4 = ashr <4 x i8> undef, undef + %g4 = lshr <4 x i8> undef, undef + %h4 = shl <4 x i8> undef, undef + %i4 = and <4 x i8> undef, undef + %j4 = or <4 x i8> undef, undef + %k4 = xor <4 x i8> undef, undef + %c8 = add <8 x i8> undef, undef + %d8 = sub <8 x i8> undef, undef + %e8 = mul <8 x i8> undef, undef + %f8 = ashr <8 x i8> undef, undef + %g8 = lshr <8 x i8> undef, undef + %h8 = shl <8 x i8> undef, undef + %i8 = and <8 x i8> undef, undef + %j8 = or <8 x i8> undef, undef + %k8 = xor <8 x i8> undef, undef + %c16 = add <16 x i8> undef, undef + %d16 = sub <16 x i8> undef, undef + %e16 = mul <16 x i8> undef, undef + %f16 = ashr <16 x i8> undef, undef + %g16 = lshr <16 x i8> undef, undef + %h16 = shl <16 x i8> undef, undef + %i16 = and <16 x i8> undef, undef + %j16 = or <16 x i8> undef, undef + %k16 = xor <16 x i8> undef, undef + ret void +} + +define void @vi16() { +; CHECK-LABEL: 'vi16' +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %c2 = add <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %d2 = sub <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %e2 = mul <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %f2 = ashr <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %g2 = lshr <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %h2 = shl <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c4 = add <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d4 = sub <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e4 = mul <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f4 = ashr <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g4 = lshr <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h4 = shl <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = and <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j4 = or <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k4 = xor <4 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = add <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d8 = sub <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e8 = mul <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f8 = ashr <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g8 = lshr <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h8 = shl <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = and <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j8 = or <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k8 = xor <8 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c16 = add <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d16 = sub <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e16 = mul <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f16 = ashr <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g16 = lshr <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h16 = shl <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i16 = and <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j16 = or <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k16 = xor <16 x i16> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c2 = add <2 x i16> undef, undef + %d2 = sub <2 x i16> undef, undef + %e2 = mul <2 x i16> undef, undef + %f2 = ashr <2 x i16> undef, undef + %g2 = lshr <2 x i16> undef, undef + %h2 = shl <2 x i16> undef, undef + %i2 = and <2 x i16> undef, undef + %j2 = or <2 x i16> undef, undef + %k2 = xor <2 x i16> undef, undef + %c4 = add <4 x i16> undef, undef + %d4 = sub <4 x i16> undef, undef + %e4 = mul <4 x i16> undef, undef + %f4 = ashr <4 x i16> undef, undef + %g4 = lshr <4 x i16> undef, undef + %h4 = shl <4 x i16> undef, undef + %i4 = and <4 x i16> undef, undef + %j4 = or <4 x i16> undef, undef + %k4 = xor <4 x i16> undef, undef + %c8 = add <8 x i16> undef, undef + %d8 = sub <8 x i16> undef, undef + %e8 = mul <8 x i16> undef, undef + %f8 = ashr <8 x i16> undef, undef + %g8 = lshr <8 x i16> undef, undef + %h8 = shl <8 x i16> undef, undef + %i8 = and <8 x i16> undef, undef + %j8 = or <8 x i16> undef, undef + %k8 = xor <8 x i16> undef, undef + %c16 = add <16 x i16> undef, undef + %d16 = sub <16 x i16> undef, undef + %e16 = mul <16 x i16> undef, undef + %f16 = ashr <16 x i16> undef, undef + %g16 = lshr <16 x i16> undef, undef + %h16 = shl <16 x i16> undef, undef + %i16 = and <16 x i16> undef, undef + %j16 = or <16 x i16> undef, undef + %k16 = xor <16 x i16> undef, undef + ret void +} + +define void @vi32() { +; CHECK-LABEL: 'vi32' +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %c2 = add <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %d2 = sub <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %e2 = mul <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %f2 = ashr <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %g2 = lshr <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %h2 = shl <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c4 = add <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d4 = sub <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e4 = mul <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f4 = ashr <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g4 = lshr <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h4 = shl <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = and <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j4 = or <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k4 = xor <4 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c8 = add <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d8 = sub <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e8 = mul <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f8 = ashr <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g8 = lshr <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h8 = shl <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i8 = and <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j8 = or <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k8 = xor <8 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c16 = add <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d16 = sub <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e16 = mul <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %f16 = ashr <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %g16 = lshr <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %h16 = shl <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i16 = and <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j16 = or <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k16 = xor <16 x i32> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c2 = add <2 x i32> undef, undef + %d2 = sub <2 x i32> undef, undef + %e2 = mul <2 x i32> undef, undef + %f2 = ashr <2 x i32> undef, undef + %g2 = lshr <2 x i32> undef, undef + %h2 = shl <2 x i32> undef, undef + %i2 = and <2 x i32> undef, undef + %j2 = or <2 x i32> undef, undef + %k2 = xor <2 x i32> undef, undef + %c4 = add <4 x i32> undef, undef + %d4 = sub <4 x i32> undef, undef + %e4 = mul <4 x i32> undef, undef + %f4 = ashr <4 x i32> undef, undef + %g4 = lshr <4 x i32> undef, undef + %h4 = shl <4 x i32> undef, undef + %i4 = and <4 x i32> undef, undef + %j4 = or <4 x i32> undef, undef + %k4 = xor <4 x i32> undef, undef + %c8 = add <8 x i32> undef, undef + %d8 = sub <8 x i32> undef, undef + %e8 = mul <8 x i32> undef, undef + %f8 = ashr <8 x i32> undef, undef + %g8 = lshr <8 x i32> undef, undef + %h8 = shl <8 x i32> undef, undef + %i8 = and <8 x i32> undef, undef + %j8 = or <8 x i32> undef, undef + %k8 = xor <8 x i32> undef, undef + %c16 = add <16 x i32> undef, undef + %d16 = sub <16 x i32> undef, undef + %e16 = mul <16 x i32> undef, undef + %f16 = ashr <16 x i32> undef, undef + %g16 = lshr <16 x i32> undef, undef + %h16 = shl <16 x i32> undef, undef + %i16 = and <16 x i32> undef, undef + %j16 = or <16 x i32> undef, undef + %k16 = xor <16 x i32> undef, undef + ret void +} + +define void @vi64() { +; CHECK-LABEL: 'vi64' +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %c2 = add <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %d2 = sub <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %e2 = mul <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %f2 = ashr <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %g2 = lshr <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %h2 = shl <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %c4 = add <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %d4 = sub <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %e4 = mul <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f4 = ashr <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %g4 = lshr <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %h4 = shl <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i4 = and <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j4 = or <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k4 = xor <4 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %c8 = add <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %d8 = sub <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e8 = mul <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %f8 = ashr <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %g8 = lshr <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %h8 = shl <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i8 = and <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j8 = or <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k8 = xor <8 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %c16 = add <16 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %d16 = sub <16 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %e16 = mul <16 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %f16 = ashr <16 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %g16 = lshr <16 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %h16 = shl <16 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %i16 = and <16 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %j16 = or <16 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %k16 = xor <16 x i64> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c2 = add <2 x i64> undef, undef + %d2 = sub <2 x i64> undef, undef + %e2 = mul <2 x i64> undef, undef + %f2 = ashr <2 x i64> undef, undef + %g2 = lshr <2 x i64> undef, undef + %h2 = shl <2 x i64> undef, undef + %i2 = and <2 x i64> undef, undef + %j2 = or <2 x i64> undef, undef + %k2 = xor <2 x i64> undef, undef + %c4 = add <4 x i64> undef, undef + %d4 = sub <4 x i64> undef, undef + %e4 = mul <4 x i64> undef, undef + %f4 = ashr <4 x i64> undef, undef + %g4 = lshr <4 x i64> undef, undef + %h4 = shl <4 x i64> undef, undef + %i4 = and <4 x i64> undef, undef + %j4 = or <4 x i64> undef, undef + %k4 = xor <4 x i64> undef, undef + %c8 = add <8 x i64> undef, undef + %d8 = sub <8 x i64> undef, undef + %e8 = mul <8 x i64> undef, undef + %f8 = ashr <8 x i64> undef, undef + %g8 = lshr <8 x i64> undef, undef + %h8 = shl <8 x i64> undef, undef + %i8 = and <8 x i64> undef, undef + %j8 = or <8 x i64> undef, undef + %k8 = xor <8 x i64> undef, undef + %c16 = add <16 x i64> undef, undef + %d16 = sub <16 x i64> undef, undef + %e16 = mul <16 x i64> undef, undef + %f16 = ashr <16 x i64> undef, undef + %g16 = lshr <16 x i64> undef, undef + %h16 = shl <16 x i64> undef, undef + %i16 = and <16 x i64> undef, undef + %j16 = or <16 x i64> undef, undef + %k16 = xor <16 x i64> undef, undef + ret void +} diff --git a/test/Analysis/CostModel/ARM/cast.ll b/test/Analysis/CostModel/ARM/cast.ll index 72308834c53..66d35c26ffd 100644 --- a/test/Analysis/CostModel/ARM/cast.ll +++ b/test/Analysis/CostModel/ARM/cast.ll @@ -1,548 +1,918 @@ -; RUN: opt < %s -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=cortex-a8 | FileCheck %s -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 triple = "thumbv7-apple-ios6.0.0" +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py +; RUN: opt < %s -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=cortex-a9 | FileCheck %s --check-prefix=CHECK-NEON +; RUN: opt -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve.fp < %s | FileCheck %s --check-prefix=CHECK-MVE define i32 @casts() { - - ; -- scalars -- - ; CHECK: Found an estimated cost of 1 for instruction: %r0 = sext i1 undef to i8 +; CHECK-NEON-LABEL: 'casts' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r0 = sext i1 undef to i8 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r1 = zext i1 undef to i8 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r2 = sext i1 undef to i16 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r3 = zext i1 undef to i16 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r4 = sext i1 undef to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r5 = zext i1 undef to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r6 = sext i1 undef to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r7 = zext i1 undef to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r8 = trunc i8 undef to i1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r9 = sext i8 undef to i16 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r10 = zext i8 undef to i16 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r11 = sext i8 undef to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r12 = zext i8 undef to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r13 = sext i8 undef to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r14 = zext i8 undef to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r15 = trunc i16 undef to i1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r16 = trunc i16 undef to i8 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r17 = sext i16 undef to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r18 = zext i16 undef to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r19 = sext i16 undef to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r20 = zext i16 undef to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r21 = trunc i32 undef to i1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r22 = trunc i32 undef to i8 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r23 = trunc i32 undef to i16 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r24 = sext i32 undef to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r25 = zext i32 undef to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r26 = trunc i64 undef to i1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r27 = trunc i64 undef to i8 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r28 = trunc i64 undef to i16 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r29 = trunc i64 undef to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r30 = fptoui float undef to i1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r31 = fptosi float undef to i1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r32 = fptoui float undef to i8 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r33 = fptosi float undef to i8 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r34 = fptoui float undef to i16 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r35 = fptosi float undef to i16 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r36 = fptoui float undef to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r37 = fptosi float undef to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %r38 = fptoui float undef to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %r39 = fptosi float undef to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r40 = fptoui double undef to i1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r41 = fptosi double undef to i1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r42 = fptoui double undef to i8 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r43 = fptosi double undef to i8 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r44 = fptoui double undef to i16 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r45 = fptosi double undef to i16 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r46 = fptoui double undef to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r47 = fptosi double undef to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %r48 = fptoui double undef to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %r49 = fptosi double undef to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r50 = sitofp i1 undef to float +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r51 = uitofp i1 undef to float +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r52 = sitofp i1 undef to double +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r53 = uitofp i1 undef to double +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r54 = sitofp i8 undef to float +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r55 = uitofp i8 undef to float +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r56 = sitofp i8 undef to double +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r57 = uitofp i8 undef to double +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r58 = sitofp i16 undef to float +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r59 = uitofp i16 undef to float +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r60 = sitofp i16 undef to double +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r61 = uitofp i16 undef to double +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r62 = sitofp i32 undef to float +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r63 = uitofp i32 undef to float +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r64 = sitofp i32 undef to double +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r65 = uitofp i32 undef to double +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %r66 = sitofp i64 undef to float +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %r67 = uitofp i64 undef to float +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %r68 = sitofp i64 undef to double +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %r69 = uitofp i64 undef to double +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r70 = sext <8 x i8> undef to <8 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %r71 = sext <16 x i8> undef to <16 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r72 = zext <8 x i8> undef to <8 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %r73 = zext <16 x i8> undef to <16 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %rext_0 = sext <8 x i8> undef to <8 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %rext_1 = zext <8 x i8> undef to <8 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %rext_2 = sext <8 x i16> undef to <8 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %rext_3 = zext <8 x i16> undef to <8 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %rext_4 = sext <4 x i16> undef to <4 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %rext_5 = zext <4 x i16> undef to <4 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r74 = trunc <8 x i32> undef to <8 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %r75 = trunc <16 x i32> undef to <16 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r80 = fptrunc double undef to float +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r81 = fptrunc <2 x double> undef to <2 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r82 = fptrunc <4 x double> undef to <4 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %r83 = fptrunc <8 x double> undef to <8 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %r84 = fptrunc <16 x double> undef to <16 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r85 = fpext float undef to double +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r86 = fpext <2 x float> undef to <2 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r87 = fpext <4 x float> undef to <4 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %r88 = fpext <8 x float> undef to <8 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %r89 = fpext <16 x float> undef to <16 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r90 = fptoui <2 x float> undef to <2 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r91 = fptosi <2 x float> undef to <2 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r92 = fptoui <2 x float> undef to <2 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r93 = fptosi <2 x float> undef to <2 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r94 = fptoui <2 x float> undef to <2 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r95 = fptosi <2 x float> undef to <2 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r96 = fptoui <2 x float> undef to <2 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r97 = fptosi <2 x float> undef to <2 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %r98 = fptoui <2 x float> undef to <2 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %r99 = fptosi <2 x float> undef to <2 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %r100 = fptoui <2 x double> undef to <2 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %r101 = fptosi <2 x double> undef to <2 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %r102 = fptoui <2 x double> undef to <2 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %r103 = fptosi <2 x double> undef to <2 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %r104 = fptoui <2 x double> undef to <2 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %r105 = fptosi <2 x double> undef to <2 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r106 = fptoui <2 x double> undef to <2 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r107 = fptosi <2 x double> undef to <2 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %r108 = fptoui <2 x double> undef to <2 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %r109 = fptosi <2 x double> undef to <2 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %r110 = fptoui <4 x float> undef to <4 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %r111 = fptosi <4 x float> undef to <4 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r112 = fptoui <4 x float> undef to <4 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r113 = fptosi <4 x float> undef to <4 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r114 = fptoui <4 x float> undef to <4 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r115 = fptosi <4 x float> undef to <4 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r116 = fptoui <4 x float> undef to <4 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r117 = fptosi <4 x float> undef to <4 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %r118 = fptoui <4 x float> undef to <4 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %r119 = fptosi <4 x float> undef to <4 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %r120 = fptoui <4 x double> undef to <4 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %r121 = fptosi <4 x double> undef to <4 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %r122 = fptoui <4 x double> undef to <4 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %r123 = fptosi <4 x double> undef to <4 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %r124 = fptoui <4 x double> undef to <4 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %r125 = fptosi <4 x double> undef to <4 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %r126 = fptoui <4 x double> undef to <4 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %r127 = fptosi <4 x double> undef to <4 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %r128 = fptoui <4 x double> undef to <4 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %r129 = fptosi <4 x double> undef to <4 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %r130 = fptoui <8 x float> undef to <8 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %r131 = fptosi <8 x float> undef to <8 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r132 = fptoui <8 x float> undef to <8 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r133 = fptosi <8 x float> undef to <8 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r134 = fptoui <8 x float> undef to <8 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r135 = fptosi <8 x float> undef to <8 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r136 = fptoui <8 x float> undef to <8 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r137 = fptosi <8 x float> undef to <8 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 131 for instruction: %r138 = fptoui <8 x float> undef to <8 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 131 for instruction: %r139 = fptosi <8 x float> undef to <8 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %r140 = fptoui <8 x double> undef to <8 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %r141 = fptosi <8 x double> undef to <8 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %r142 = fptoui <8 x double> undef to <8 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %r143 = fptosi <8 x double> undef to <8 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %r144 = fptoui <8 x double> undef to <8 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %r145 = fptosi <8 x double> undef to <8 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %r146 = fptoui <8 x double> undef to <8 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %r147 = fptosi <8 x double> undef to <8 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 131 for instruction: %r148 = fptoui <8 x double> undef to <8 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 131 for instruction: %r149 = fptosi <8 x double> undef to <8 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 131 for instruction: %r150 = fptoui <16 x float> undef to <16 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 131 for instruction: %r151 = fptosi <16 x float> undef to <16 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %r152 = fptoui <16 x float> undef to <16 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %r153 = fptosi <16 x float> undef to <16 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %r154 = fptoui <16 x float> undef to <16 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %r155 = fptosi <16 x float> undef to <16 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r156 = fptoui <16 x float> undef to <16 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r157 = fptosi <16 x float> undef to <16 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 263 for instruction: %r158 = fptoui <16 x float> undef to <16 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 263 for instruction: %r159 = fptosi <16 x float> undef to <16 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 135 for instruction: %r160 = fptoui <16 x double> undef to <16 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 135 for instruction: %r161 = fptosi <16 x double> undef to <16 x i1> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 135 for instruction: %r162 = fptoui <16 x double> undef to <16 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 135 for instruction: %r163 = fptosi <16 x double> undef to <16 x i8> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 135 for instruction: %r164 = fptoui <16 x double> undef to <16 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 135 for instruction: %r165 = fptosi <16 x double> undef to <16 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %r166 = fptoui <16 x double> undef to <16 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %r167 = fptosi <16 x double> undef to <16 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 263 for instruction: %r168 = fptoui <16 x double> undef to <16 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 263 for instruction: %r169 = fptosi <16 x double> undef to <16 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %r170 = uitofp <2 x i1> undef to <2 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %r171 = sitofp <2 x i1> undef to <2 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r172 = uitofp <2 x i8> undef to <2 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r173 = sitofp <2 x i8> undef to <2 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r174 = uitofp <2 x i16> undef to <2 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r175 = sitofp <2 x i16> undef to <2 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r176 = uitofp <2 x i32> undef to <2 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r177 = sitofp <2 x i32> undef to <2 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %r178 = uitofp <2 x i64> undef to <2 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %r179 = sitofp <2 x i64> undef to <2 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %r180 = uitofp <2 x i1> undef to <2 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %r181 = sitofp <2 x i1> undef to <2 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r182 = uitofp <2 x i8> undef to <2 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r183 = sitofp <2 x i8> undef to <2 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r184 = uitofp <2 x i16> undef to <2 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r185 = sitofp <2 x i16> undef to <2 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r186 = uitofp <2 x i32> undef to <2 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r187 = sitofp <2 x i32> undef to <2 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %r188 = uitofp <2 x i64> undef to <2 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %r189 = sitofp <2 x i64> undef to <2 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r190 = uitofp <4 x i1> undef to <4 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r191 = sitofp <4 x i1> undef to <4 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r192 = uitofp <4 x i8> undef to <4 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r193 = sitofp <4 x i8> undef to <4 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r194 = uitofp <4 x i16> undef to <4 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r195 = sitofp <4 x i16> undef to <4 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r196 = uitofp <4 x i32> undef to <4 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r197 = sitofp <4 x i32> undef to <4 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 57 for instruction: %r198 = uitofp <4 x i64> undef to <4 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 57 for instruction: %r199 = sitofp <4 x i64> undef to <4 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %r200 = uitofp <4 x i1> undef to <4 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %r201 = sitofp <4 x i1> undef to <4 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %r202 = uitofp <4 x i8> undef to <4 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %r203 = sitofp <4 x i8> undef to <4 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r204 = uitofp <4 x i16> undef to <4 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r205 = sitofp <4 x i16> undef to <4 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %r206 = uitofp <4 x i32> undef to <4 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %r207 = sitofp <4 x i32> undef to <4 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 49 for instruction: %r208 = uitofp <4 x i64> undef to <4 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 49 for instruction: %r209 = sitofp <4 x i64> undef to <4 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r210 = uitofp <8 x i1> undef to <8 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r211 = sitofp <8 x i1> undef to <8 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r212 = uitofp <8 x i8> undef to <8 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r213 = sitofp <8 x i8> undef to <8 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r214 = uitofp <8 x i16> undef to <8 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r215 = sitofp <8 x i16> undef to <8 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r216 = uitofp <8 x i32> undef to <8 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r217 = sitofp <8 x i32> undef to <8 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 115 for instruction: %r218 = uitofp <8 x i64> undef to <8 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 115 for instruction: %r219 = sitofp <8 x i64> undef to <8 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %r220 = uitofp <8 x i1> undef to <8 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %r221 = sitofp <8 x i1> undef to <8 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %r222 = uitofp <8 x i8> undef to <8 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %r223 = sitofp <8 x i8> undef to <8 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %r224 = uitofp <8 x i16> undef to <8 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %r225 = sitofp <8 x i16> undef to <8 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %r226 = uitofp <8 x i16> undef to <8 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %r227 = sitofp <8 x i16> undef to <8 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 99 for instruction: %r228 = uitofp <8 x i64> undef to <8 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 99 for instruction: %r229 = sitofp <8 x i64> undef to <8 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %r230 = uitofp <16 x i1> undef to <16 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %r231 = sitofp <16 x i1> undef to <16 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %r232 = uitofp <16 x i8> undef to <16 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %r233 = sitofp <16 x i8> undef to <16 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %r234 = uitofp <16 x i16> undef to <16 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %r235 = sitofp <16 x i16> undef to <16 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r236 = uitofp <16 x i32> undef to <16 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r237 = sitofp <16 x i32> undef to <16 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 231 for instruction: %r238 = uitofp <16 x i64> undef to <16 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 231 for instruction: %r239 = sitofp <16 x i64> undef to <16 x float> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 71 for instruction: %r240 = uitofp <16 x i1> undef to <16 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 71 for instruction: %r241 = sitofp <16 x i1> undef to <16 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 39 for instruction: %r242 = uitofp <16 x i8> undef to <16 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 39 for instruction: %r243 = sitofp <16 x i8> undef to <16 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %r244 = uitofp <16 x i16> undef to <16 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %r245 = sitofp <16 x i16> undef to <16 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %r246 = uitofp <16 x i16> undef to <16 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %r247 = sitofp <16 x i16> undef to <16 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 199 for instruction: %r248 = uitofp <16 x i64> undef to <16 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 199 for instruction: %r249 = sitofp <16 x i64> undef to <16 x double> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; CHECK-MVE-LABEL: 'casts' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r0 = sext i1 undef to i8 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r1 = zext i1 undef to i8 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r2 = sext i1 undef to i16 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r3 = zext i1 undef to i16 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r4 = sext i1 undef to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r5 = zext i1 undef to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r6 = sext i1 undef to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r7 = zext i1 undef to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r8 = trunc i8 undef to i1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r9 = sext i8 undef to i16 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r10 = zext i8 undef to i16 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r11 = sext i8 undef to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r12 = zext i8 undef to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r13 = sext i8 undef to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r14 = zext i8 undef to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r15 = trunc i16 undef to i1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r16 = trunc i16 undef to i8 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r17 = sext i16 undef to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r18 = zext i16 undef to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r19 = sext i16 undef to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r20 = zext i16 undef to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r21 = trunc i32 undef to i1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r22 = trunc i32 undef to i8 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r23 = trunc i32 undef to i16 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r24 = sext i32 undef to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r25 = zext i32 undef to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r26 = trunc i64 undef to i1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r27 = trunc i64 undef to i8 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r28 = trunc i64 undef to i16 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r29 = trunc i64 undef to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r30 = fptoui float undef to i1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r31 = fptosi float undef to i1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r32 = fptoui float undef to i8 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r33 = fptosi float undef to i8 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r34 = fptoui float undef to i16 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r35 = fptosi float undef to i16 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r36 = fptoui float undef to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r37 = fptosi float undef to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r38 = fptoui float undef to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r39 = fptosi float undef to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r40 = fptoui double undef to i1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r41 = fptosi double undef to i1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r42 = fptoui double undef to i8 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r43 = fptosi double undef to i8 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r44 = fptoui double undef to i16 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r45 = fptosi double undef to i16 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r46 = fptoui double undef to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r47 = fptosi double undef to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r48 = fptoui double undef to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r49 = fptosi double undef to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r50 = sitofp i1 undef to float +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r51 = uitofp i1 undef to float +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r52 = sitofp i1 undef to double +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r53 = uitofp i1 undef to double +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r54 = sitofp i8 undef to float +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r55 = uitofp i8 undef to float +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r56 = sitofp i8 undef to double +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r57 = uitofp i8 undef to double +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r58 = sitofp i16 undef to float +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r59 = uitofp i16 undef to float +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r60 = sitofp i16 undef to double +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r61 = uitofp i16 undef to double +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r62 = sitofp i32 undef to float +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r63 = uitofp i32 undef to float +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r64 = sitofp i32 undef to double +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r65 = uitofp i32 undef to double +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r66 = sitofp i64 undef to float +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r67 = uitofp i64 undef to float +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r68 = sitofp i64 undef to double +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r69 = uitofp i64 undef to double +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r70 = sext <8 x i8> undef to <8 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r71 = sext <16 x i8> undef to <16 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r72 = zext <8 x i8> undef to <8 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r73 = zext <16 x i8> undef to <16 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %rext_0 = sext <8 x i8> undef to <8 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %rext_1 = zext <8 x i8> undef to <8 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %rext_2 = sext <8 x i16> undef to <8 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %rext_3 = zext <8 x i16> undef to <8 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %rext_4 = sext <4 x i16> undef to <4 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %rext_5 = zext <4 x i16> undef to <4 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r74 = trunc <8 x i32> undef to <8 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r75 = trunc <16 x i32> undef to <16 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r80 = fptrunc double undef to float +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r81 = fptrunc <2 x double> undef to <2 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r82 = fptrunc <4 x double> undef to <4 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r83 = fptrunc <8 x double> undef to <8 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %r84 = fptrunc <16 x double> undef to <16 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r85 = fpext float undef to double +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %r86 = fpext <2 x float> undef to <2 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %r87 = fpext <4 x float> undef to <4 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %r88 = fpext <8 x float> undef to <8 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 55 for instruction: %r89 = fpext <16 x float> undef to <16 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r90 = fptoui <2 x float> undef to <2 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r91 = fptosi <2 x float> undef to <2 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r92 = fptoui <2 x float> undef to <2 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r93 = fptosi <2 x float> undef to <2 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r94 = fptoui <2 x float> undef to <2 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r95 = fptosi <2 x float> undef to <2 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r96 = fptoui <2 x float> undef to <2 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r97 = fptosi <2 x float> undef to <2 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r98 = fptoui <2 x float> undef to <2 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r99 = fptosi <2 x float> undef to <2 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r100 = fptoui <2 x double> undef to <2 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r101 = fptosi <2 x double> undef to <2 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r102 = fptoui <2 x double> undef to <2 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r103 = fptosi <2 x double> undef to <2 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r104 = fptoui <2 x double> undef to <2 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r105 = fptosi <2 x double> undef to <2 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r106 = fptoui <2 x double> undef to <2 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r107 = fptosi <2 x double> undef to <2 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r108 = fptoui <2 x double> undef to <2 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %r109 = fptosi <2 x double> undef to <2 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r110 = fptoui <4 x float> undef to <4 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r111 = fptosi <4 x float> undef to <4 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r112 = fptoui <4 x float> undef to <4 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r113 = fptosi <4 x float> undef to <4 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r114 = fptoui <4 x float> undef to <4 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r115 = fptosi <4 x float> undef to <4 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r116 = fptoui <4 x float> undef to <4 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r117 = fptosi <4 x float> undef to <4 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %r118 = fptoui <4 x float> undef to <4 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %r119 = fptosi <4 x float> undef to <4 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %r120 = fptoui <4 x double> undef to <4 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %r121 = fptosi <4 x double> undef to <4 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %r122 = fptoui <4 x double> undef to <4 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %r123 = fptosi <4 x double> undef to <4 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %r124 = fptoui <4 x double> undef to <4 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %r125 = fptosi <4 x double> undef to <4 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %r126 = fptoui <4 x double> undef to <4 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %r127 = fptosi <4 x double> undef to <4 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %r128 = fptoui <4 x double> undef to <4 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %r129 = fptosi <4 x double> undef to <4 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r130 = fptoui <8 x float> undef to <8 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r131 = fptosi <8 x float> undef to <8 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r132 = fptoui <8 x float> undef to <8 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r133 = fptosi <8 x float> undef to <8 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r134 = fptoui <8 x float> undef to <8 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r135 = fptosi <8 x float> undef to <8 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r136 = fptoui <8 x float> undef to <8 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r137 = fptosi <8 x float> undef to <8 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %r138 = fptoui <8 x float> undef to <8 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %r139 = fptosi <8 x float> undef to <8 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %r140 = fptoui <8 x double> undef to <8 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %r141 = fptosi <8 x double> undef to <8 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %r142 = fptoui <8 x double> undef to <8 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %r143 = fptosi <8 x double> undef to <8 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %r144 = fptoui <8 x double> undef to <8 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %r145 = fptosi <8 x double> undef to <8 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %r146 = fptoui <8 x double> undef to <8 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %r147 = fptosi <8 x double> undef to <8 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %r148 = fptoui <8 x double> undef to <8 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %r149 = fptosi <8 x double> undef to <8 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r150 = fptoui <16 x float> undef to <16 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r151 = fptosi <16 x float> undef to <16 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r152 = fptoui <16 x float> undef to <16 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r153 = fptosi <16 x float> undef to <16 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r154 = fptoui <16 x float> undef to <16 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r155 = fptosi <16 x float> undef to <16 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r156 = fptoui <16 x float> undef to <16 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r157 = fptosi <16 x float> undef to <16 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 119 for instruction: %r158 = fptoui <16 x float> undef to <16 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 119 for instruction: %r159 = fptosi <16 x float> undef to <16 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 119 for instruction: %r160 = fptoui <16 x double> undef to <16 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 119 for instruction: %r161 = fptosi <16 x double> undef to <16 x i1> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 119 for instruction: %r162 = fptoui <16 x double> undef to <16 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 119 for instruction: %r163 = fptosi <16 x double> undef to <16 x i8> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 119 for instruction: %r164 = fptoui <16 x double> undef to <16 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 119 for instruction: %r165 = fptosi <16 x double> undef to <16 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 119 for instruction: %r166 = fptoui <16 x double> undef to <16 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 119 for instruction: %r167 = fptosi <16 x double> undef to <16 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 119 for instruction: %r168 = fptoui <16 x double> undef to <16 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 119 for instruction: %r169 = fptosi <16 x double> undef to <16 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r170 = uitofp <2 x i1> undef to <2 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r171 = sitofp <2 x i1> undef to <2 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r172 = uitofp <2 x i8> undef to <2 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r173 = sitofp <2 x i8> undef to <2 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r174 = uitofp <2 x i16> undef to <2 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r175 = sitofp <2 x i16> undef to <2 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r176 = uitofp <2 x i32> undef to <2 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r177 = sitofp <2 x i32> undef to <2 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r178 = uitofp <2 x i64> undef to <2 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r179 = sitofp <2 x i64> undef to <2 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %r180 = uitofp <2 x i1> undef to <2 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %r181 = sitofp <2 x i1> undef to <2 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %r182 = uitofp <2 x i8> undef to <2 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %r183 = sitofp <2 x i8> undef to <2 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %r184 = uitofp <2 x i16> undef to <2 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %r185 = sitofp <2 x i16> undef to <2 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %r186 = uitofp <2 x i32> undef to <2 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %r187 = sitofp <2 x i32> undef to <2 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %r188 = uitofp <2 x i64> undef to <2 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %r189 = sitofp <2 x i64> undef to <2 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r190 = uitofp <4 x i1> undef to <4 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r191 = sitofp <4 x i1> undef to <4 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r192 = uitofp <4 x i8> undef to <4 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r193 = sitofp <4 x i8> undef to <4 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r194 = uitofp <4 x i16> undef to <4 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r195 = sitofp <4 x i16> undef to <4 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r196 = uitofp <4 x i32> undef to <4 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r197 = sitofp <4 x i32> undef to <4 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r198 = uitofp <4 x i64> undef to <4 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r199 = sitofp <4 x i64> undef to <4 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %r200 = uitofp <4 x i1> undef to <4 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %r201 = sitofp <4 x i1> undef to <4 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %r202 = uitofp <4 x i8> undef to <4 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %r203 = sitofp <4 x i8> undef to <4 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %r204 = uitofp <4 x i16> undef to <4 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %r205 = sitofp <4 x i16> undef to <4 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %r206 = uitofp <4 x i32> undef to <4 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %r207 = sitofp <4 x i32> undef to <4 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %r208 = uitofp <4 x i64> undef to <4 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %r209 = sitofp <4 x i64> undef to <4 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r210 = uitofp <8 x i1> undef to <8 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r211 = sitofp <8 x i1> undef to <8 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r212 = uitofp <8 x i8> undef to <8 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r213 = sitofp <8 x i8> undef to <8 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r214 = uitofp <8 x i16> undef to <8 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r215 = sitofp <8 x i16> undef to <8 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r216 = uitofp <8 x i32> undef to <8 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r217 = sitofp <8 x i32> undef to <8 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r218 = uitofp <8 x i64> undef to <8 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r219 = sitofp <8 x i64> undef to <8 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %r220 = uitofp <8 x i1> undef to <8 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %r221 = sitofp <8 x i1> undef to <8 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %r222 = uitofp <8 x i8> undef to <8 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %r223 = sitofp <8 x i8> undef to <8 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %r224 = uitofp <8 x i16> undef to <8 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %r225 = sitofp <8 x i16> undef to <8 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %r226 = uitofp <8 x i16> undef to <8 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %r227 = sitofp <8 x i16> undef to <8 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %r228 = uitofp <8 x i64> undef to <8 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %r229 = sitofp <8 x i64> undef to <8 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r230 = uitofp <16 x i1> undef to <16 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r231 = sitofp <16 x i1> undef to <16 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r232 = uitofp <16 x i8> undef to <16 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r233 = sitofp <16 x i8> undef to <16 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r234 = uitofp <16 x i16> undef to <16 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %r235 = sitofp <16 x i16> undef to <16 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r236 = uitofp <16 x i32> undef to <16 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r237 = sitofp <16 x i32> undef to <16 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %r238 = uitofp <16 x i64> undef to <16 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %r239 = sitofp <16 x i64> undef to <16 x float> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %r240 = uitofp <16 x i1> undef to <16 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %r241 = sitofp <16 x i1> undef to <16 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %r242 = uitofp <16 x i8> undef to <16 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %r243 = sitofp <16 x i8> undef to <16 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %r244 = uitofp <16 x i16> undef to <16 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %r245 = sitofp <16 x i16> undef to <16 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %r246 = uitofp <16 x i16> undef to <16 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %r247 = sitofp <16 x i16> undef to <16 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %r248 = uitofp <16 x i64> undef to <16 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %r249 = sitofp <16 x i64> undef to <16 x double> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; + ; -- scalars -- %r0 = sext i1 undef to i8 - ; CHECK: Found an estimated cost of 1 for instruction: %r1 = zext i1 undef to i8 %r1 = zext i1 undef to i8 - ; CHECK: Found an estimated cost of 1 for instruction: %r2 = sext i1 undef to i16 %r2 = sext i1 undef to i16 - ; CHECK: Found an estimated cost of 1 for instruction: %r3 = zext i1 undef to i16 %r3 = zext i1 undef to i16 - ; CHECK: Found an estimated cost of 1 for instruction: %r4 = sext i1 undef to i32 %r4 = sext i1 undef to i32 - ; CHECK: Found an estimated cost of 1 for instruction: %r5 = zext i1 undef to i32 %r5 = zext i1 undef to i32 - ; CHECK: Found an estimated cost of 1 for instruction: %r6 = sext i1 undef to i64 %r6 = sext i1 undef to i64 - ; CHECK: Found an estimated cost of 1 for instruction: %r7 = zext i1 undef to i64 %r7 = zext i1 undef to i64 - ; CHECK: Found an estimated cost of 0 for instruction: %r8 = trunc i8 undef to i1 %r8 = trunc i8 undef to i1 - ; CHECK: Found an estimated cost of 1 for instruction: %r9 = sext i8 undef to i16 %r9 = sext i8 undef to i16 - ; CHECK: Found an estimated cost of 1 for instruction: %r10 = zext i8 undef to i16 %r10 = zext i8 undef to i16 - ; CHECK: Found an estimated cost of 1 for instruction: %r11 = sext i8 undef to i32 %r11 = sext i8 undef to i32 - ; CHECK: Found an estimated cost of 1 for instruction: %r12 = zext i8 undef to i32 %r12 = zext i8 undef to i32 - ; CHECK: Found an estimated cost of 1 for instruction: %r13 = sext i8 undef to i64 %r13 = sext i8 undef to i64 - ; CHECK: Found an estimated cost of 1 for instruction: %r14 = zext i8 undef to i64 %r14 = zext i8 undef to i64 - ; CHECK: Found an estimated cost of 0 for instruction: %r15 = trunc i16 undef to i1 %r15 = trunc i16 undef to i1 - ; CHECK: Found an estimated cost of 0 for instruction: %r16 = trunc i16 undef to i8 %r16 = trunc i16 undef to i8 - ; CHECK: Found an estimated cost of 1 for instruction: %r17 = sext i16 undef to i32 %r17 = sext i16 undef to i32 - ; CHECK: Found an estimated cost of 1 for instruction: %r18 = zext i16 undef to i32 %r18 = zext i16 undef to i32 - ; CHECK: Found an estimated cost of 2 for instruction: %r19 = sext i16 undef to i64 %r19 = sext i16 undef to i64 - ; CHECK: Found an estimated cost of 1 for instruction: %r20 = zext i16 undef to i64 %r20 = zext i16 undef to i64 - ; CHECK: Found an estimated cost of 0 for instruction: %r21 = trunc i32 undef to i1 %r21 = trunc i32 undef to i1 - ; CHECK: Found an estimated cost of 0 for instruction: %r22 = trunc i32 undef to i8 %r22 = trunc i32 undef to i8 - ; CHECK: Found an estimated cost of 0 for instruction: %r23 = trunc i32 undef to i16 %r23 = trunc i32 undef to i16 - ; CHECK: Found an estimated cost of 1 for instruction: %r24 = sext i32 undef to i64 %r24 = sext i32 undef to i64 - ; CHECK: Found an estimated cost of 1 for instruction: %r25 = zext i32 undef to i64 %r25 = zext i32 undef to i64 - ; CHECK: Found an estimated cost of 0 for instruction: %r26 = trunc i64 undef to i1 %r26 = trunc i64 undef to i1 - ; CHECK: Found an estimated cost of 0 for instruction: %r27 = trunc i64 undef to i8 %r27 = trunc i64 undef to i8 - ; CHECK: Found an estimated cost of 0 for instruction: %r28 = trunc i64 undef to i16 %r28 = trunc i64 undef to i16 - ; CHECK: Found an estimated cost of 0 for instruction: %r29 = trunc i64 undef to i32 %r29 = trunc i64 undef to i32 - ; -- floating point conversions -- + ; -- floating point conversions -- ; Moves between scalar and NEON registers. - ; CHECK: Found an estimated cost of 2 for instruction: %r30 = fptoui float undef to i1 %r30 = fptoui float undef to i1 - ; CHECK: Found an estimated cost of 2 for instruction: %r31 = fptosi float undef to i1 %r31 = fptosi float undef to i1 - ; CHECK: Found an estimated cost of 2 for instruction: %r32 = fptoui float undef to i8 %r32 = fptoui float undef to i8 - ; CHECK: Found an estimated cost of 2 for instruction: %r33 = fptosi float undef to i8 %r33 = fptosi float undef to i8 - ; CHECK: Found an estimated cost of 2 for instruction: %r34 = fptoui float undef to i16 %r34 = fptoui float undef to i16 - ; CHECK: Found an estimated cost of 2 for instruction: %r35 = fptosi float undef to i16 %r35 = fptosi float undef to i16 - ; CHECK: Found an estimated cost of 2 for instruction: %r36 = fptoui float undef to i32 %r36 = fptoui float undef to i32 - ; CHECK: Found an estimated cost of 2 for instruction: %r37 = fptosi float undef to i32 %r37 = fptosi float undef to i32 - ; CHECK: Found an estimated cost of 10 for instruction: %r38 = fptoui float undef to i64 %r38 = fptoui float undef to i64 - ; CHECK: Found an estimated cost of 10 for instruction: %r39 = fptosi float undef to i64 %r39 = fptosi float undef to i64 - ; CHECK: Found an estimated cost of 2 for instruction: %r40 = fptoui double undef to i1 %r40 = fptoui double undef to i1 - ; CHECK: Found an estimated cost of 2 for instruction: %r41 = fptosi double undef to i1 %r41 = fptosi double undef to i1 - ; CHECK: Found an estimated cost of 2 for instruction: %r42 = fptoui double undef to i8 %r42 = fptoui double undef to i8 - ; CHECK: Found an estimated cost of 2 for instruction: %r43 = fptosi double undef to i8 %r43 = fptosi double undef to i8 - ; CHECK: Found an estimated cost of 2 for instruction: %r44 = fptoui double undef to i16 %r44 = fptoui double undef to i16 - ; CHECK: Found an estimated cost of 2 for instruction: %r45 = fptosi double undef to i16 %r45 = fptosi double undef to i16 - ; CHECK: Found an estimated cost of 2 for instruction: %r46 = fptoui double undef to i32 %r46 = fptoui double undef to i32 - ; CHECK: Found an estimated cost of 2 for instruction: %r47 = fptosi double undef to i32 %r47 = fptosi double undef to i32 ; Function call - ; CHECK: Found an estimated cost of 10 for instruction: %r48 = fptoui double undef to i64 %r48 = fptoui double undef to i64 - ; CHECK: Found an estimated cost of 10 for instruction: %r49 = fptosi double undef to i64 %r49 = fptosi double undef to i64 - ; CHECK: Found an estimated cost of 2 for instruction: %r50 = sitofp i1 undef to float %r50 = sitofp i1 undef to float - ; CHECK: Found an estimated cost of 2 for instruction: %r51 = uitofp i1 undef to float %r51 = uitofp i1 undef to float - ; CHECK: Found an estimated cost of 2 for instruction: %r52 = sitofp i1 undef to double %r52 = sitofp i1 undef to double - ; CHECK: Found an estimated cost of 2 for instruction: %r53 = uitofp i1 undef to double %r53 = uitofp i1 undef to double - ; CHECK: Found an estimated cost of 2 for instruction: %r54 = sitofp i8 undef to float %r54 = sitofp i8 undef to float - ; CHECK: Found an estimated cost of 2 for instruction: %r55 = uitofp i8 undef to float %r55 = uitofp i8 undef to float - ; CHECK: Found an estimated cost of 2 for instruction: %r56 = sitofp i8 undef to double %r56 = sitofp i8 undef to double - ; CHECK: Found an estimated cost of 2 for instruction: %r57 = uitofp i8 undef to double %r57 = uitofp i8 undef to double - ; CHECK: Found an estimated cost of 2 for instruction: %r58 = sitofp i16 undef to float %r58 = sitofp i16 undef to float - ; CHECK: Found an estimated cost of 2 for instruction: %r59 = uitofp i16 undef to float %r59 = uitofp i16 undef to float - ; CHECK: Found an estimated cost of 2 for instruction: %r60 = sitofp i16 undef to double %r60 = sitofp i16 undef to double - ; CHECK: Found an estimated cost of 2 for instruction: %r61 = uitofp i16 undef to double %r61 = uitofp i16 undef to double - ; CHECK: Found an estimated cost of 2 for instruction: %r62 = sitofp i32 undef to float %r62 = sitofp i32 undef to float - ; CHECK: Found an estimated cost of 2 for instruction: %r63 = uitofp i32 undef to float %r63 = uitofp i32 undef to float - ; CHECK: Found an estimated cost of 2 for instruction: %r64 = sitofp i32 undef to double %r64 = sitofp i32 undef to double - ; CHECK: Found an estimated cost of 2 for instruction: %r65 = uitofp i32 undef to double %r65 = uitofp i32 undef to double ; Function call - ; CHECK: Found an estimated cost of 10 for instruction: %r66 = sitofp i64 undef to float %r66 = sitofp i64 undef to float - ; CHECK: Found an estimated cost of 10 for instruction: %r67 = uitofp i64 undef to float %r67 = uitofp i64 undef to float - ; CHECK: Found an estimated cost of 10 for instruction: %r68 = sitofp i64 undef to double %r68 = sitofp i64 undef to double - ; CHECK: Found an estimated cost of 10 for instruction: %r69 = uitofp i64 undef to double %r69 = uitofp i64 undef to double - ; CHECK: Found an estimated cost of 3 for instruction: %r70 = sext <8 x i8> undef to <8 x i32> %r70 = sext <8 x i8> undef to <8 x i32> - ; CHECK: Found an estimated cost of 6 for instruction: %r71 = sext <16 x i8> undef to <16 x i32> %r71 = sext <16 x i8> undef to <16 x i32> - ; CHECK: Found an estimated cost of 3 for instruction: %r72 = zext <8 x i8> undef to <8 x i32> %r72 = zext <8 x i8> undef to <8 x i32> - ; CHECK: Found an estimated cost of 6 for instruction: %r73 = zext <16 x i8> undef to <16 x i32> %r73 = zext <16 x i8> undef to <16 x i32> - ; CHECK: Found an estimated cost of 7 for instruction: %rext_0 = sext <8 x i8> undef to <8 x i64> %rext_0 = sext <8 x i8> undef to <8 x i64> - ; CHECK: Found an estimated cost of 7 for instruction: %rext_1 = zext <8 x i8> undef to <8 x i64> %rext_1 = zext <8 x i8> undef to <8 x i64> - ; CHECK: Found an estimated cost of 6 for instruction: %rext_2 = sext <8 x i16> undef to <8 x i64> %rext_2 = sext <8 x i16> undef to <8 x i64> - ; CHECK: Found an estimated cost of 6 for instruction: %rext_3 = zext <8 x i16> undef to <8 x i64> %rext_3 = zext <8 x i16> undef to <8 x i64> - ; CHECK: Found an estimated cost of 3 for instruction: %rext_4 = sext <4 x i16> undef to <4 x i64> %rext_4 = sext <4 x i16> undef to <4 x i64> - ; CHECK: Found an estimated cost of 3 for instruction: %rext_5 = zext <4 x i16> undef to <4 x i64> %rext_5 = zext <4 x i16> undef to <4 x i64> ; Vector cast cost of instructions lowering the cast to the stack. - ; CHECK: Found an estimated cost of 3 for instruction: %r74 = trunc <8 x i32> undef to <8 x i8> %r74 = trunc <8 x i32> undef to <8 x i8> - ; CHECK: Found an estimated cost of 6 for instruction: %r75 = trunc <16 x i32> undef to <16 x i8> %r75 = trunc <16 x i32> undef to <16 x i8> ; Floating point truncation costs. - ; CHECK: Found an estimated cost of 1 for instruction: %r80 = fptrunc double undef to float %r80 = fptrunc double undef to float - ; CHECK: Found an estimated cost of 2 for instruction: %r81 = fptrunc <2 x double> undef to <2 x float> %r81 = fptrunc <2 x double> undef to <2 x float> - ; CHECK: Found an estimated cost of 4 for instruction: %r82 = fptrunc <4 x double> undef to <4 x float> %r82 = fptrunc <4 x double> undef to <4 x float> - ; CHECK: Found an estimated cost of 8 for instruction: %r83 = fptrunc <8 x double> undef to <8 x float> %r83 = fptrunc <8 x double> undef to <8 x float> - ; CHECK: Found an estimated cost of 16 for instruction: %r84 = fptrunc <16 x double> undef to <16 x float> %r84 = fptrunc <16 x double> undef to <16 x float> ; Floating point extension costs. - ; CHECK: Found an estimated cost of 1 for instruction: %r85 = fpext float undef to double %r85 = fpext float undef to double - ; CHECK: Found an estimated cost of 2 for instruction: %r86 = fpext <2 x float> undef to <2 x double> %r86 = fpext <2 x float> undef to <2 x double> - ; CHECK: Found an estimated cost of 4 for instruction: %r87 = fpext <4 x float> undef to <4 x double> %r87 = fpext <4 x float> undef to <4 x double> - ; CHECK: Found an estimated cost of 8 for instruction: %r88 = fpext <8 x float> undef to <8 x double> %r88 = fpext <8 x float> undef to <8 x double> - ; CHECK: Found an estimated cost of 16 for instruction: %r89 = fpext <16 x float> undef to <16 x double> %r89 = fpext <16 x float> undef to <16 x double> ;; Floating point to integer vector casts. - ; CHECK: Found an estimated cost of 1 for instruction: %r90 = fptoui <2 x float> undef to <2 x i1> %r90 = fptoui <2 x float> undef to <2 x i1> - ; CHECK: Found an estimated cost of 1 for instruction: %r91 = fptosi <2 x float> undef to <2 x i1> %r91 = fptosi <2 x float> undef to <2 x i1> - ; CHECK: Found an estimated cost of 1 for instruction: %r92 = fptoui <2 x float> undef to <2 x i8> %r92 = fptoui <2 x float> undef to <2 x i8> - ; CHECK: Found an estimated cost of 1 for instruction: %r93 = fptosi <2 x float> undef to <2 x i8> %r93 = fptosi <2 x float> undef to <2 x i8> - ; CHECK: Found an estimated cost of 1 for instruction: %r94 = fptoui <2 x float> undef to <2 x i16> %r94 = fptoui <2 x float> undef to <2 x i16> - ; CHECK: Found an estimated cost of 1 for instruction: %r95 = fptosi <2 x float> undef to <2 x i16> %r95 = fptosi <2 x float> undef to <2 x i16> - ; CHECK: Found an estimated cost of 1 for instruction: %r96 = fptoui <2 x float> undef to <2 x i32> %r96 = fptoui <2 x float> undef to <2 x i32> - ; CHECK: Found an estimated cost of 1 for instruction: %r97 = fptosi <2 x float> undef to <2 x i32> %r97 = fptosi <2 x float> undef to <2 x i32> - ; CHECK: Found an estimated cost of 32 for instruction: %r98 = fptoui <2 x float> undef to <2 x i64> %r98 = fptoui <2 x float> undef to <2 x i64> - ; CHECK: Found an estimated cost of 32 for instruction: %r99 = fptosi <2 x float> undef to <2 x i64> %r99 = fptosi <2 x float> undef to <2 x i64> - ; CHECK: Found an estimated cost of 16 for instruction: %r100 = fptoui <2 x double> undef to <2 x i1> %r100 = fptoui <2 x double> undef to <2 x i1> - ; CHECK: Found an estimated cost of 16 for instruction: %r101 = fptosi <2 x double> undef to <2 x i1> %r101 = fptosi <2 x double> undef to <2 x i1> - ; CHECK: Found an estimated cost of 16 for instruction: %r102 = fptoui <2 x double> undef to <2 x i8> %r102 = fptoui <2 x double> undef to <2 x i8> - ; CHECK: Found an estimated cost of 16 for instruction: %r103 = fptosi <2 x double> undef to <2 x i8> %r103 = fptosi <2 x double> undef to <2 x i8> - ; CHECK: Found an estimated cost of 16 for instruction: %r104 = fptoui <2 x double> undef to <2 x i16> %r104 = fptoui <2 x double> undef to <2 x i16> - ; CHECK: Found an estimated cost of 16 for instruction: %r105 = fptosi <2 x double> undef to <2 x i16> %r105 = fptosi <2 x double> undef to <2 x i16> - ; CHECK: Found an estimated cost of 2 for instruction: %r106 = fptoui <2 x double> undef to <2 x i32> %r106 = fptoui <2 x double> undef to <2 x i32> - ; CHECK: Found an estimated cost of 2 for instruction: %r107 = fptosi <2 x double> undef to <2 x i32> %r107 = fptosi <2 x double> undef to <2 x i32> - ; CHECK: Found an estimated cost of 32 for instruction: %r108 = fptoui <2 x double> undef to <2 x i64> %r108 = fptoui <2 x double> undef to <2 x i64> - ; CHECK: Found an estimated cost of 32 for instruction: %r109 = fptosi <2 x double> undef to <2 x i64> %r109 = fptosi <2 x double> undef to <2 x i64> - ; CHECK: Found an estimated cost of 32 for instruction: %r110 = fptoui <4 x float> undef to <4 x i1> %r110 = fptoui <4 x float> undef to <4 x i1> - ; CHECK: Found an estimated cost of 32 for instruction: %r111 = fptosi <4 x float> undef to <4 x i1> %r111 = fptosi <4 x float> undef to <4 x i1> - ; CHECK: Found an estimated cost of 3 for instruction: %r112 = fptoui <4 x float> undef to <4 x i8> %r112 = fptoui <4 x float> undef to <4 x i8> - ; CHECK: Found an estimated cost of 3 for instruction: %r113 = fptosi <4 x float> undef to <4 x i8> %r113 = fptosi <4 x float> undef to <4 x i8> - ; CHECK: Found an estimated cost of 2 for instruction: %r114 = fptoui <4 x float> undef to <4 x i16> %r114 = fptoui <4 x float> undef to <4 x i16> - ; CHECK: Found an estimated cost of 2 for instruction: %r115 = fptosi <4 x float> undef to <4 x i16> %r115 = fptosi <4 x float> undef to <4 x i16> - ; CHECK: Found an estimated cost of 1 for instruction: %r116 = fptoui <4 x float> undef to <4 x i32> %r116 = fptoui <4 x float> undef to <4 x i32> - ; CHECK: Found an estimated cost of 1 for instruction: %r117 = fptosi <4 x float> undef to <4 x i32> %r117 = fptosi <4 x float> undef to <4 x i32> - ; CHECK: Found an estimated cost of 65 for instruction: %r118 = fptoui <4 x float> undef to <4 x i64> %r118 = fptoui <4 x float> undef to <4 x i64> - ; CHECK: Found an estimated cost of 65 for instruction: %r119 = fptosi <4 x float> undef to <4 x i64> %r119 = fptosi <4 x float> undef to <4 x i64> - ; CHECK: Found an estimated cost of 33 for instruction: %r120 = fptoui <4 x double> undef to <4 x i1> %r120 = fptoui <4 x double> undef to <4 x i1> - ; CHECK: Found an estimated cost of 33 for instruction: %r121 = fptosi <4 x double> undef to <4 x i1> %r121 = fptosi <4 x double> undef to <4 x i1> - ; CHECK: Found an estimated cost of 33 for instruction: %r122 = fptoui <4 x double> undef to <4 x i8> %r122 = fptoui <4 x double> undef to <4 x i8> - ; CHECK: Found an estimated cost of 33 for instruction: %r123 = fptosi <4 x double> undef to <4 x i8> %r123 = fptosi <4 x double> undef to <4 x i8> - ; CHECK: Found an estimated cost of 33 for instruction: %r124 = fptoui <4 x double> undef to <4 x i16> %r124 = fptoui <4 x double> undef to <4 x i16> - ; CHECK: Found an estimated cost of 33 for instruction: %r125 = fptosi <4 x double> undef to <4 x i16> %r125 = fptosi <4 x double> undef to <4 x i16> - ; CHECK: Found an estimated cost of 5 for instruction: %r126 = fptoui <4 x double> undef to <4 x i32> %r126 = fptoui <4 x double> undef to <4 x i32> - ; CHECK: Found an estimated cost of 5 for instruction: %r127 = fptosi <4 x double> undef to <4 x i32> %r127 = fptosi <4 x double> undef to <4 x i32> - ; CHECK: Found an estimated cost of 65 for instruction: %r128 = fptoui <4 x double> undef to <4 x i64> %r128 = fptoui <4 x double> undef to <4 x i64> - ; CHECK: Found an estimated cost of 65 for instruction: %r129 = fptosi <4 x double> undef to <4 x i64> %r129 = fptosi <4 x double> undef to <4 x i64> - ; CHECK: Found an estimated cost of 65 for instruction: %r130 = fptoui <8 x float> undef to <8 x i1> %r130 = fptoui <8 x float> undef to <8 x i1> - ; CHECK: Found an estimated cost of 65 for instruction: %r131 = fptosi <8 x float> undef to <8 x i1> %r131 = fptosi <8 x float> undef to <8 x i1> - ; CHECK: Found an estimated cost of 7 for instruction: %r132 = fptoui <8 x float> undef to <8 x i8> %r132 = fptoui <8 x float> undef to <8 x i8> - ; CHECK: Found an estimated cost of 7 for instruction: %r133 = fptosi <8 x float> undef to <8 x i8> %r133 = fptosi <8 x float> undef to <8 x i8> - ; CHECK: Found an estimated cost of 4 for instruction: %r134 = fptoui <8 x float> undef to <8 x i16> %r134 = fptoui <8 x float> undef to <8 x i16> - ; CHECK: Found an estimated cost of 4 for instruction: %r135 = fptosi <8 x float> undef to <8 x i16> %r135 = fptosi <8 x float> undef to <8 x i16> - ; CHECK: Found an estimated cost of 2 for instruction: %r136 = fptoui <8 x float> undef to <8 x i32> %r136 = fptoui <8 x float> undef to <8 x i32> - ; CHECK: Found an estimated cost of 2 for instruction: %r137 = fptosi <8 x float> undef to <8 x i32> %r137 = fptosi <8 x float> undef to <8 x i32> - ; CHECK: Found an estimated cost of 131 for instruction: %r138 = fptoui <8 x float> undef to <8 x i64> %r138 = fptoui <8 x float> undef to <8 x i64> - ; CHECK: Found an estimated cost of 131 for instruction: %r139 = fptosi <8 x float> undef to <8 x i64> %r139 = fptosi <8 x float> undef to <8 x i64> - ; CHECK: Found an estimated cost of 67 for instruction: %r140 = fptoui <8 x double> undef to <8 x i1> %r140 = fptoui <8 x double> undef to <8 x i1> - ; CHECK: Found an estimated cost of 67 for instruction: %r141 = fptosi <8 x double> undef to <8 x i1> %r141 = fptosi <8 x double> undef to <8 x i1> - ; CHECK: Found an estimated cost of 67 for instruction: %r142 = fptoui <8 x double> undef to <8 x i8> %r142 = fptoui <8 x double> undef to <8 x i8> - ; CHECK: Found an estimated cost of 67 for instruction: %r143 = fptosi <8 x double> undef to <8 x i8> %r143 = fptosi <8 x double> undef to <8 x i8> - ; CHECK: Found an estimated cost of 67 for instruction: %r144 = fptoui <8 x double> undef to <8 x i16> %r144 = fptoui <8 x double> undef to <8 x i16> - ; CHECK: Found an estimated cost of 67 for instruction: %r145 = fptosi <8 x double> undef to <8 x i16> %r145 = fptosi <8 x double> undef to <8 x i16> - ; CHECK: Found an estimated cost of 11 for instruction: %r146 = fptoui <8 x double> undef to <8 x i32> %r146 = fptoui <8 x double> undef to <8 x i32> - ; CHECK: Found an estimated cost of 11 for instruction: %r147 = fptosi <8 x double> undef to <8 x i32> %r147 = fptosi <8 x double> undef to <8 x i32> - ; CHECK: Found an estimated cost of 131 for instruction: %r148 = fptoui <8 x double> undef to <8 x i64> %r148 = fptoui <8 x double> undef to <8 x i64> - ; CHECK: Found an estimated cost of 131 for instruction: %r149 = fptosi <8 x double> undef to <8 x i64> %r149 = fptosi <8 x double> undef to <8 x i64> - ; CHECK: Found an estimated cost of 131 for instruction: %r150 = fptoui <16 x float> undef to <16 x i1> %r150 = fptoui <16 x float> undef to <16 x i1> - ; CHECK: Found an estimated cost of 131 for instruction: %r151 = fptosi <16 x float> undef to <16 x i1> %r151 = fptosi <16 x float> undef to <16 x i1> - ; CHECK: Found an estimated cost of 15 for instruction: %r152 = fptoui <16 x float> undef to <16 x i8> %r152 = fptoui <16 x float> undef to <16 x i8> - ; CHECK: Found an estimated cost of 15 for instruction: %r153 = fptosi <16 x float> undef to <16 x i8> %r153 = fptosi <16 x float> undef to <16 x i8> - ; CHECK: Found an estimated cost of 8 for instruction: %r154 = fptoui <16 x float> undef to <16 x i16> %r154 = fptoui <16 x float> undef to <16 x i16> - ; CHECK: Found an estimated cost of 8 for instruction: %r155 = fptosi <16 x float> undef to <16 x i16> %r155 = fptosi <16 x float> undef to <16 x i16> - ; CHECK: Found an estimated cost of 4 for instruction: %r156 = fptoui <16 x float> undef to <16 x i32> %r156 = fptoui <16 x float> undef to <16 x i32> - ; CHECK: Found an estimated cost of 4 for instruction: %r157 = fptosi <16 x float> undef to <16 x i32> %r157 = fptosi <16 x float> undef to <16 x i32> - ; CHECK: Found an estimated cost of 263 for instruction: %r158 = fptoui <16 x float> undef to <16 x i64> %r158 = fptoui <16 x float> undef to <16 x i64> - ; CHECK: Found an estimated cost of 263 for instruction: %r159 = fptosi <16 x float> undef to <16 x i64> %r159 = fptosi <16 x float> undef to <16 x i64> - ; CHECK: Found an estimated cost of 135 for instruction: %r160 = fptoui <16 x double> undef to <16 x i1> %r160 = fptoui <16 x double> undef to <16 x i1> - ; CHECK: Found an estimated cost of 135 for instruction: %r161 = fptosi <16 x double> undef to <16 x i1> %r161 = fptosi <16 x double> undef to <16 x i1> - ; CHECK: Found an estimated cost of 135 for instruction: %r162 = fptoui <16 x double> undef to <16 x i8> %r162 = fptoui <16 x double> undef to <16 x i8> - ; CHECK: Found an estimated cost of 135 for instruction: %r163 = fptosi <16 x double> undef to <16 x i8> %r163 = fptosi <16 x double> undef to <16 x i8> - ; CHECK: Found an estimated cost of 135 for instruction: %r164 = fptoui <16 x double> undef to <16 x i16> %r164 = fptoui <16 x double> undef to <16 x i16> - ; CHECK: Found an estimated cost of 135 for instruction: %r165 = fptosi <16 x double> undef to <16 x i16> %r165 = fptosi <16 x double> undef to <16 x i16> - ; CHECK: Found an estimated cost of 23 for instruction: %r166 = fptoui <16 x double> undef to <16 x i32> %r166 = fptoui <16 x double> undef to <16 x i32> - ; CHECK: Found an estimated cost of 23 for instruction: %r167 = fptosi <16 x double> undef to <16 x i32> %r167 = fptosi <16 x double> undef to <16 x i32> - ; CHECK: Found an estimated cost of 263 for instruction: %r168 = fptoui <16 x double> undef to <16 x i64> %r168 = fptoui <16 x double> undef to <16 x i64> - ; CHECK: Found an estimated cost of 263 for instruction: %r169 = fptosi <16 x double> undef to <16 x i64> %r169 = fptosi <16 x double> undef to <16 x i64> - ; CHECK: Found an estimated cost of 12 for instruction: %r170 = uitofp <2 x i1> undef to <2 x float> %r170 = uitofp <2 x i1> undef to <2 x float> - ; CHECK: Found an estimated cost of 12 for instruction: %r171 = sitofp <2 x i1> undef to <2 x float> %r171 = sitofp <2 x i1> undef to <2 x float> - ; CHECK: Found an estimated cost of 3 for instruction: %r172 = uitofp <2 x i8> undef to <2 x float> %r172 = uitofp <2 x i8> undef to <2 x float> - ; CHECK: Found an estimated cost of 3 for instruction: %r173 = sitofp <2 x i8> undef to <2 x float> %r173 = sitofp <2 x i8> undef to <2 x float> - ; CHECK: Found an estimated cost of 2 for instruction: %r174 = uitofp <2 x i16> undef to <2 x float> %r174 = uitofp <2 x i16> undef to <2 x float> - ; CHECK: Found an estimated cost of 2 for instruction: %r175 = sitofp <2 x i16> undef to <2 x float> %r175 = sitofp <2 x i16> undef to <2 x float> - ; CHECK: Found an estimated cost of 1 for instruction: %r176 = uitofp <2 x i32> undef to <2 x float> %r176 = uitofp <2 x i32> undef to <2 x float> - ; CHECK: Found an estimated cost of 1 for instruction: %r177 = sitofp <2 x i32> undef to <2 x float> %r177 = sitofp <2 x i32> undef to <2 x float> - ; CHECK: Found an estimated cost of 28 for instruction: %r178 = uitofp <2 x i64> undef to <2 x float> %r178 = uitofp <2 x i64> undef to <2 x float> - ; CHECK: Found an estimated cost of 28 for instruction: %r179 = sitofp <2 x i64> undef to <2 x float> %r179 = sitofp <2 x i64> undef to <2 x float> - ; CHECK: Found an estimated cost of 8 for instruction: %r180 = uitofp <2 x i1> undef to <2 x double> %r180 = uitofp <2 x i1> undef to <2 x double> - ; CHECK: Found an estimated cost of 8 for instruction: %r181 = sitofp <2 x i1> undef to <2 x double> %r181 = sitofp <2 x i1> undef to <2 x double> - ; CHECK: Found an estimated cost of 4 for instruction: %r182 = uitofp <2 x i8> undef to <2 x double> %r182 = uitofp <2 x i8> undef to <2 x double> - ; CHECK: Found an estimated cost of 4 for instruction: %r183 = sitofp <2 x i8> undef to <2 x double> %r183 = sitofp <2 x i8> undef to <2 x double> - ; CHECK: Found an estimated cost of 3 for instruction: %r184 = uitofp <2 x i16> undef to <2 x double> %r184 = uitofp <2 x i16> undef to <2 x double> - ; CHECK: Found an estimated cost of 3 for instruction: %r185 = sitofp <2 x i16> undef to <2 x double> %r185 = sitofp <2 x i16> undef to <2 x double> - ; CHECK: Found an estimated cost of 2 for instruction: %r186 = uitofp <2 x i32> undef to <2 x double> %r186 = uitofp <2 x i32> undef to <2 x double> - ; CHECK: Found an estimated cost of 2 for instruction: %r187 = sitofp <2 x i32> undef to <2 x double> %r187 = sitofp <2 x i32> undef to <2 x double> - ; CHECK: Found an estimated cost of 24 for instruction: %r188 = uitofp <2 x i64> undef to <2 x double> %r188 = uitofp <2 x i64> undef to <2 x double> - ; CHECK: Found an estimated cost of 24 for instruction: %r189 = sitofp <2 x i64> undef to <2 x double> %r189 = sitofp <2 x i64> undef to <2 x double> - ; CHECK: Found an estimated cost of 3 for instruction: %r190 = uitofp <4 x i1> undef to <4 x float> %r190 = uitofp <4 x i1> undef to <4 x float> - ; CHECK: Found an estimated cost of 3 for instruction: %r191 = sitofp <4 x i1> undef to <4 x float> %r191 = sitofp <4 x i1> undef to <4 x float> - ; CHECK: Found an estimated cost of 3 for instruction: %r192 = uitofp <4 x i8> undef to <4 x float> %r192 = uitofp <4 x i8> undef to <4 x float> - ; CHECK: Found an estimated cost of 3 for instruction: %r193 = sitofp <4 x i8> undef to <4 x float> %r193 = sitofp <4 x i8> undef to <4 x float> - ; CHECK: Found an estimated cost of 2 for instruction: %r194 = uitofp <4 x i16> undef to <4 x float> %r194 = uitofp <4 x i16> undef to <4 x float> - ; CHECK: Found an estimated cost of 2 for instruction: %r195 = sitofp <4 x i16> undef to <4 x float> %r195 = sitofp <4 x i16> undef to <4 x float> - ; CHECK: Found an estimated cost of 1 for instruction: %r196 = uitofp <4 x i32> undef to <4 x float> %r196 = uitofp <4 x i32> undef to <4 x float> - ; CHECK: Found an estimated cost of 1 for instruction: %r197 = sitofp <4 x i32> undef to <4 x float> %r197 = sitofp <4 x i32> undef to <4 x float> - ; CHECK: Found an estimated cost of 57 for instruction: %r198 = uitofp <4 x i64> undef to <4 x float> %r198 = uitofp <4 x i64> undef to <4 x float> - ; CHECK: Found an estimated cost of 57 for instruction: %r199 = sitofp <4 x i64> undef to <4 x float> %r199 = sitofp <4 x i64> undef to <4 x float> - ; CHECK: Found an estimated cost of 17 for instruction: %r200 = uitofp <4 x i1> undef to <4 x double> %r200 = uitofp <4 x i1> undef to <4 x double> - ; CHECK: Found an estimated cost of 17 for instruction: %r201 = sitofp <4 x i1> undef to <4 x double> %r201 = sitofp <4 x i1> undef to <4 x double> - ; CHECK: Found an estimated cost of 9 for instruction: %r202 = uitofp <4 x i8> undef to <4 x double> %r202 = uitofp <4 x i8> undef to <4 x double> - ; CHECK: Found an estimated cost of 9 for instruction: %r203 = sitofp <4 x i8> undef to <4 x double> %r203 = sitofp <4 x i8> undef to <4 x double> - ; CHECK: Found an estimated cost of 7 for instruction: %r204 = uitofp <4 x i16> undef to <4 x double> %r204 = uitofp <4 x i16> undef to <4 x double> - ; CHECK: Found an estimated cost of 7 for instruction: %r205 = sitofp <4 x i16> undef to <4 x double> %r205 = sitofp <4 x i16> undef to <4 x double> - ; CHECK: Found an estimated cost of 5 for instruction: %r206 = uitofp <4 x i32> undef to <4 x double> %r206 = uitofp <4 x i32> undef to <4 x double> - ; CHECK: Found an estimated cost of 5 for instruction: %r207 = sitofp <4 x i32> undef to <4 x double> %r207 = sitofp <4 x i32> undef to <4 x double> - ; CHECK: Found an estimated cost of 49 for instruction: %r208 = uitofp <4 x i64> undef to <4 x double> %r208 = uitofp <4 x i64> undef to <4 x double> - ; CHECK: Found an estimated cost of 49 for instruction: %r209 = sitofp <4 x i64> undef to <4 x double> %r209 = sitofp <4 x i64> undef to <4 x double> - ; CHECK: Found an estimated cost of 7 for instruction: %r210 = uitofp <8 x i1> undef to <8 x float> %r210 = uitofp <8 x i1> undef to <8 x float> - ; CHECK: Found an estimated cost of 7 for instruction: %r211 = sitofp <8 x i1> undef to <8 x float> %r211 = sitofp <8 x i1> undef to <8 x float> - ; CHECK: Found an estimated cost of 7 for instruction: %r212 = uitofp <8 x i8> undef to <8 x float> %r212 = uitofp <8 x i8> undef to <8 x float> - ; CHECK: Found an estimated cost of 7 for instruction: %r213 = sitofp <8 x i8> undef to <8 x float> %r213 = sitofp <8 x i8> undef to <8 x float> - ; CHECK: Found an estimated cost of 4 for instruction: %r214 = uitofp <8 x i16> undef to <8 x float> %r214 = uitofp <8 x i16> undef to <8 x float> - ; CHECK: Found an estimated cost of 4 for instruction: %r215 = sitofp <8 x i16> undef to <8 x float> %r215 = sitofp <8 x i16> undef to <8 x float> - ; CHECK: Found an estimated cost of 2 for instruction: %r216 = uitofp <8 x i32> undef to <8 x float> %r216 = uitofp <8 x i32> undef to <8 x float> - ; CHECK: Found an estimated cost of 2 for instruction: %r217 = sitofp <8 x i32> undef to <8 x float> %r217 = sitofp <8 x i32> undef to <8 x float> - ; CHECK: Found an estimated cost of 115 for instruction: %r218 = uitofp <8 x i64> undef to <8 x float> %r218 = uitofp <8 x i64> undef to <8 x float> - ; CHECK: Found an estimated cost of 115 for instruction: %r219 = sitofp <8 x i64> undef to <8 x float> %r219 = sitofp <8 x i64> undef to <8 x float> - ; CHECK: Found an estimated cost of 35 for instruction: %r220 = uitofp <8 x i1> undef to <8 x double> %r220 = uitofp <8 x i1> undef to <8 x double> - ; CHECK: Found an estimated cost of 35 for instruction: %r221 = sitofp <8 x i1> undef to <8 x double> %r221 = sitofp <8 x i1> undef to <8 x double> - ; CHECK: Found an estimated cost of 19 for instruction: %r222 = uitofp <8 x i8> undef to <8 x double> %r222 = uitofp <8 x i8> undef to <8 x double> - ; CHECK: Found an estimated cost of 19 for instruction: %r223 = sitofp <8 x i8> undef to <8 x double> %r223 = sitofp <8 x i8> undef to <8 x double> - ; CHECK: Found an estimated cost of 15 for instruction: %r224 = uitofp <8 x i16> undef to <8 x double> %r224 = uitofp <8 x i16> undef to <8 x double> - ; CHECK: Found an estimated cost of 15 for instruction: %r225 = sitofp <8 x i16> undef to <8 x double> %r225 = sitofp <8 x i16> undef to <8 x double> - ; CHECK: Found an estimated cost of 15 for instruction: %r226 = uitofp <8 x i16> undef to <8 x double> %r226 = uitofp <8 x i16> undef to <8 x double> - ; CHECK: Found an estimated cost of 15 for instruction: %r227 = sitofp <8 x i16> undef to <8 x double> %r227 = sitofp <8 x i16> undef to <8 x double> - ; CHECK: Found an estimated cost of 99 for instruction: %r228 = uitofp <8 x i64> undef to <8 x double> %r228 = uitofp <8 x i64> undef to <8 x double> - ; CHECK: Found an estimated cost of 99 for instruction: %r229 = sitofp <8 x i64> undef to <8 x double> %r229 = sitofp <8 x i64> undef to <8 x double> - ; CHECK: Found an estimated cost of 15 for instruction: %r230 = uitofp <16 x i1> undef to <16 x float> %r230 = uitofp <16 x i1> undef to <16 x float> - ; CHECK: Found an estimated cost of 15 for instruction: %r231 = sitofp <16 x i1> undef to <16 x float> %r231 = sitofp <16 x i1> undef to <16 x float> - ; CHECK: Found an estimated cost of 15 for instruction: %r232 = uitofp <16 x i8> undef to <16 x float> %r232 = uitofp <16 x i8> undef to <16 x float> - ; CHECK: Found an estimated cost of 15 for instruction: %r233 = sitofp <16 x i8> undef to <16 x float> %r233 = sitofp <16 x i8> undef to <16 x float> - ; CHECK: Found an estimated cost of 8 for instruction: %r234 = uitofp <16 x i16> undef to <16 x float> %r234 = uitofp <16 x i16> undef to <16 x float> - ; CHECK: Found an estimated cost of 8 for instruction: %r235 = sitofp <16 x i16> undef to <16 x float> %r235 = sitofp <16 x i16> undef to <16 x float> - ; CHECK: Found an estimated cost of 4 for instruction: %r236 = uitofp <16 x i32> undef to <16 x float> %r236 = uitofp <16 x i32> undef to <16 x float> - ; CHECK: Found an estimated cost of 4 for instruction: %r237 = sitofp <16 x i32> undef to <16 x float> %r237 = sitofp <16 x i32> undef to <16 x float> - ; CHECK: Found an estimated cost of 231 for instruction: %r238 = uitofp <16 x i64> undef to <16 x float> %r238 = uitofp <16 x i64> undef to <16 x float> - ; CHECK: Found an estimated cost of 231 for instruction: %r239 = sitofp <16 x i64> undef to <16 x float> %r239 = sitofp <16 x i64> undef to <16 x float> - ; CHECK: Found an estimated cost of 71 for instruction: %r240 = uitofp <16 x i1> undef to <16 x double> %r240 = uitofp <16 x i1> undef to <16 x double> - ; CHECK: Found an estimated cost of 71 for instruction: %r241 = sitofp <16 x i1> undef to <16 x double> %r241 = sitofp <16 x i1> undef to <16 x double> - ; CHECK: Found an estimated cost of 39 for instruction: %r242 = uitofp <16 x i8> undef to <16 x double> %r242 = uitofp <16 x i8> undef to <16 x double> - ; CHECK: Found an estimated cost of 39 for instruction: %r243 = sitofp <16 x i8> undef to <16 x double> %r243 = sitofp <16 x i8> undef to <16 x double> - ; CHECK: Found an estimated cost of 31 for instruction: %r244 = uitofp <16 x i16> undef to <16 x double> %r244 = uitofp <16 x i16> undef to <16 x double> - ; CHECK: Found an estimated cost of 31 for instruction: %r245 = sitofp <16 x i16> undef to <16 x double> %r245 = sitofp <16 x i16> undef to <16 x double> - ; CHECK: Found an estimated cost of 31 for instruction: %r246 = uitofp <16 x i16> undef to <16 x double> %r246 = uitofp <16 x i16> undef to <16 x double> - ; CHECK: Found an estimated cost of 31 for instruction: %r247 = sitofp <16 x i16> undef to <16 x double> %r247 = sitofp <16 x i16> undef to <16 x double> - ; CHECK: Found an estimated cost of 199 for instruction: %r248 = uitofp <16 x i64> undef to <16 x double> %r248 = uitofp <16 x i64> undef to <16 x double> - ; CHECK: Found an estimated cost of 199 for instruction: %r249 = sitofp <16 x i64> undef to <16 x double> %r249 = sitofp <16 x i64> undef to <16 x double> - ; CHECK: Found an estimated cost of 0 for instruction: ret i32 undef + ret i32 undef +} + + +define i32 @load_extends() { +; CHECK-NEON-LABEL: 'load_extends' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi8 = load i8, i8* undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi16 = load i16, i16* undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi32 = load i32, i32* undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv2i8 = load <2 x i8>, <2 x i8>* undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv4i8 = load <4 x i8>, <4 x i8>* undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv8i8 = load <8 x i8>, <8 x i8>* undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv2i16 = load <2 x i16>, <2 x i16>* undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv4i16 = load <4 x i16>, <4 x i16>* undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv2i32 = load <2 x i32>, <2 x i32>* undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r0 = sext i8 %loadi8 to i16 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r1 = zext i8 %loadi8 to i16 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r2 = sext i8 %loadi8 to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r3 = zext i8 %loadi8 to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r4 = sext i8 %loadi8 to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r5 = zext i8 %loadi8 to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r6 = sext i16 %loadi16 to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r7 = zext i16 %loadi16 to i32 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r8 = sext i16 %loadi16 to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r9 = zext i16 %loadi16 to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r10 = sext i32 %loadi32 to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r11 = zext i32 %loadi32 to i64 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v0 = sext <8 x i8> %loadv8i8 to <8 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v1 = zext <8 x i8> %loadv8i8 to <8 x i16> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = sext <4 x i8> %loadv4i8 to <4 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3 = zext <4 x i8> %loadv4i8 to <4 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4 = sext <2 x i8> %loadv2i8 to <2 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5 = zext <2 x i8> %loadv2i8 to <2 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v6 = sext <4 x i16> %loadv4i16 to <4 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v7 = zext <4 x i16> %loadv4i16 to <4 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = sext <2 x i16> %loadv2i16 to <2 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = zext <2 x i16> %loadv2i16 to <2 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v10 = sext <2 x i32> %loadv2i32 to <2 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = zext <2 x i32> %loadv2i32 to <2 x i64> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; +; CHECK-MVE-LABEL: 'load_extends' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi8 = load i8, i8* undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi16 = load i16, i16* undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi32 = load i32, i32* undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv2i8 = load <2 x i8>, <2 x i8>* undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv4i8 = load <4 x i8>, <4 x i8>* undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv8i8 = load <8 x i8>, <8 x i8>* undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv2i16 = load <2 x i16>, <2 x i16>* undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv4i16 = load <4 x i16>, <4 x i16>* undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadv2i32 = load <2 x i32>, <2 x i32>* undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r0 = sext i8 %loadi8 to i16 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r1 = zext i8 %loadi8 to i16 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r2 = sext i8 %loadi8 to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r3 = zext i8 %loadi8 to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r4 = sext i8 %loadi8 to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r5 = zext i8 %loadi8 to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r6 = sext i16 %loadi16 to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r7 = zext i16 %loadi16 to i32 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %r8 = sext i16 %loadi16 to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r9 = zext i16 %loadi16 to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r10 = sext i32 %loadi32 to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r11 = zext i32 %loadi32 to i64 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v0 = sext <8 x i8> %loadv8i8 to <8 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v1 = zext <8 x i8> %loadv8i8 to <8 x i16> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = sext <4 x i8> %loadv4i8 to <4 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3 = zext <4 x i8> %loadv4i8 to <4 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4 = sext <2 x i8> %loadv2i8 to <2 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5 = zext <2 x i8> %loadv2i8 to <2 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v6 = sext <4 x i16> %loadv4i16 to <4 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = zext <4 x i16> %loadv4i16 to <4 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8 = sext <2 x i16> %loadv2i16 to <2 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = zext <2 x i16> %loadv2i16 to <2 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v10 = sext <2 x i32> %loadv2i32 to <2 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = zext <2 x i32> %loadv2i32 to <2 x i64> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; + + %loadi8 = load i8, i8* undef + %loadi16 = load i16, i16* undef + %loadi32 = load i32, i32* undef + %loadv2i8 = load <2 x i8>, <2 x i8>* undef + %loadv4i8 = load <4 x i8>, <4 x i8>* undef + %loadv8i8 = load <8 x i8>, <8 x i8>* undef + %loadv2i16 = load <2 x i16>, <2 x i16>* undef + %loadv4i16 = load <4 x i16>, <4 x i16>* undef + %loadv2i32 = load <2 x i32>, <2 x i32>* undef + + %r0 = sext i8 %loadi8 to i16 + %r1 = zext i8 %loadi8 to i16 + %r2 = sext i8 %loadi8 to i32 + %r3 = zext i8 %loadi8 to i32 + %r4 = sext i8 %loadi8 to i64 + %r5 = zext i8 %loadi8 to i64 + %r6 = sext i16 %loadi16 to i32 + %r7 = zext i16 %loadi16 to i32 + %r8 = sext i16 %loadi16 to i64 + %r9 = zext i16 %loadi16 to i64 + %r10 = sext i32 %loadi32 to i64 + %r11 = zext i32 %loadi32 to i64 + + %v0 = sext <8 x i8> %loadv8i8 to <8 x i16> + %v1 = zext <8 x i8> %loadv8i8 to <8 x i16> + %v2 = sext <4 x i8> %loadv4i8 to <4 x i32> + %v3 = zext <4 x i8> %loadv4i8 to <4 x i32> + %v4 = sext <2 x i8> %loadv2i8 to <2 x i64> + %v5 = zext <2 x i8> %loadv2i8 to <2 x i64> + %v6 = sext <4 x i16> %loadv4i16 to <4 x i32> + %v7 = zext <4 x i16> %loadv4i16 to <4 x i32> + %v8 = sext <2 x i16> %loadv2i16 to <2 x i64> + %v9 = zext <2 x i16> %loadv2i16 to <2 x i64> + %v10 = sext <2 x i32> %loadv2i32 to <2 x i64> + %v11 = zext <2 x i32> %loadv2i32 to <2 x i64> + ret i32 undef } diff --git a/test/Analysis/CostModel/ARM/divrem.ll b/test/Analysis/CostModel/ARM/divrem.ll index c4ac59b59e0..48f71fbe17a 100644 --- a/test/Analysis/CostModel/ARM/divrem.ll +++ b/test/Analysis/CostModel/ARM/divrem.ll @@ -1,450 +1,838 @@ -; RUN: opt < %s -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=cortex-a9 | FileCheck %s - -define <2 x i8> @sdiv_v2_i8(<2 x i8> %a, <2 x i8> %b) { - ; CHECK: sdiv_v2_i8 - ; CHECK: cost of 40 {{.*}} sdiv - - %1 = sdiv <2 x i8> %a, %b - ret <2 x i8> %1 -} -define <2 x i16> @sdiv_v2_i16(<2 x i16> %a, <2 x i16> %b) { - ; CHECK: sdiv_v2_i16 - ; CHECK: cost of 40 {{.*}} sdiv - - %1 = sdiv <2 x i16> %a, %b - ret <2 x i16> %1 -} -define <2 x i32> @sdiv_v2_i32(<2 x i32> %a, <2 x i32> %b) { - ; CHECK: sdiv_v2_i32 - ; CHECK: cost of 40 {{.*}} sdiv - - %1 = sdiv <2 x i32> %a, %b - ret <2 x i32> %1 -} -define <2 x i64> @sdiv_v2_i64(<2 x i64> %a, <2 x i64> %b) { - ; CHECK: sdiv_v2_i64 - ; CHECK: cost of 40 {{.*}} sdiv - - %1 = sdiv <2 x i64> %a, %b - ret <2 x i64> %1 -} -define <4 x i8> @sdiv_v4_i8(<4 x i8> %a, <4 x i8> %b) { - ; CHECK: sdiv_v4_i8 - ; CHECK: cost of 10 {{.*}} sdiv - - %1 = sdiv <4 x i8> %a, %b - ret <4 x i8> %1 -} -define <4 x i16> @sdiv_v4_i16(<4 x i16> %a, <4 x i16> %b) { - ; CHECK: sdiv_v4_i16 - ; CHECK: cost of 10 {{.*}} sdiv - - %1 = sdiv <4 x i16> %a, %b - ret <4 x i16> %1 -} -define <4 x i32> @sdiv_v4_i32(<4 x i32> %a, <4 x i32> %b) { - ; CHECK: sdiv_v4_i32 - ; CHECK: cost of 80 {{.*}} sdiv - - %1 = sdiv <4 x i32> %a, %b - ret <4 x i32> %1 -} -define <4 x i64> @sdiv_v4_i64(<4 x i64> %a, <4 x i64> %b) { - ; CHECK: sdiv_v4_i64 - ; CHECK: cost of 80 {{.*}} sdiv - - %1 = sdiv <4 x i64> %a, %b - ret <4 x i64> %1 -} -define <8 x i8> @sdiv_v8_i8(<8 x i8> %a, <8 x i8> %b) { - ; CHECK: sdiv_v8_i8 - ; CHECK: cost of 10 {{.*}} sdiv - - %1 = sdiv <8 x i8> %a, %b - ret <8 x i8> %1 -} -define <8 x i16> @sdiv_v8_i16(<8 x i16> %a, <8 x i16> %b) { - ; CHECK: sdiv_v8_i16 - ; CHECK: cost of 160 {{.*}} sdiv - - %1 = sdiv <8 x i16> %a, %b - ret <8 x i16> %1 -} -define <8 x i32> @sdiv_v8_i32(<8 x i32> %a, <8 x i32> %b) { - ; CHECK: sdiv_v8_i32 - ; CHECK: cost of 160 {{.*}} sdiv - - %1 = sdiv <8 x i32> %a, %b - ret <8 x i32> %1 -} -define <8 x i64> @sdiv_v8_i64(<8 x i64> %a, <8 x i64> %b) { - ; CHECK: sdiv_v8_i64 - ; CHECK: cost of 160 {{.*}} sdiv - - %1 = sdiv <8 x i64> %a, %b - ret <8 x i64> %1 -} -define <16 x i8> @sdiv_v16_i8(<16 x i8> %a, <16 x i8> %b) { - ; CHECK: sdiv_v16_i8 - ; CHECK: cost of 320 {{.*}} sdiv - - %1 = sdiv <16 x i8> %a, %b - ret <16 x i8> %1 -} -define <16 x i16> @sdiv_v16_i16(<16 x i16> %a, <16 x i16> %b) { - ; CHECK: sdiv_v16_i16 - ; CHECK: cost of 320 {{.*}} sdiv - - %1 = sdiv <16 x i16> %a, %b - ret <16 x i16> %1 -} -define <16 x i32> @sdiv_v16_i32(<16 x i32> %a, <16 x i32> %b) { - ; CHECK: sdiv_v16_i32 - ; CHECK: cost of 320 {{.*}} sdiv - - %1 = sdiv <16 x i32> %a, %b - ret <16 x i32> %1 -} -define <16 x i64> @sdiv_v16_i64(<16 x i64> %a, <16 x i64> %b) { - ; CHECK: sdiv_v16_i64 - ; CHECK: cost of 320 {{.*}} sdiv - - %1 = sdiv <16 x i64> %a, %b - ret <16 x i64> %1 -} -define <2 x i8> @udiv_v2_i8(<2 x i8> %a, <2 x i8> %b) { - ; CHECK: udiv_v2_i8 - ; CHECK: cost of 40 {{.*}} udiv - - %1 = udiv <2 x i8> %a, %b - ret <2 x i8> %1 -} -define <2 x i16> @udiv_v2_i16(<2 x i16> %a, <2 x i16> %b) { - ; CHECK: udiv_v2_i16 - ; CHECK: cost of 40 {{.*}} udiv - - %1 = udiv <2 x i16> %a, %b - ret <2 x i16> %1 -} -define <2 x i32> @udiv_v2_i32(<2 x i32> %a, <2 x i32> %b) { - ; CHECK: udiv_v2_i32 - ; CHECK: cost of 40 {{.*}} udiv - - %1 = udiv <2 x i32> %a, %b - ret <2 x i32> %1 -} -define <2 x i64> @udiv_v2_i64(<2 x i64> %a, <2 x i64> %b) { - ; CHECK: udiv_v2_i64 - ; CHECK: cost of 40 {{.*}} udiv - - %1 = udiv <2 x i64> %a, %b - ret <2 x i64> %1 -} -define <4 x i8> @udiv_v4_i8(<4 x i8> %a, <4 x i8> %b) { - ; CHECK: udiv_v4_i8 - ; CHECK: cost of 10 {{.*}} udiv - - %1 = udiv <4 x i8> %a, %b - ret <4 x i8> %1 -} -define <4 x i16> @udiv_v4_i16(<4 x i16> %a, <4 x i16> %b) { - ; CHECK: udiv_v4_i16 - ; CHECK: cost of 10 {{.*}} udiv - - %1 = udiv <4 x i16> %a, %b - ret <4 x i16> %1 -} -define <4 x i32> @udiv_v4_i32(<4 x i32> %a, <4 x i32> %b) { - ; CHECK: udiv_v4_i32 - ; CHECK: cost of 80 {{.*}} udiv - - %1 = udiv <4 x i32> %a, %b - ret <4 x i32> %1 -} -define <4 x i64> @udiv_v4_i64(<4 x i64> %a, <4 x i64> %b) { - ; CHECK: udiv_v4_i64 - ; CHECK: cost of 80 {{.*}} udiv - - %1 = udiv <4 x i64> %a, %b - ret <4 x i64> %1 -} -define <8 x i8> @udiv_v8_i8(<8 x i8> %a, <8 x i8> %b) { - ; CHECK: udiv_v8_i8 - ; CHECK: cost of 10 {{.*}} udiv - - %1 = udiv <8 x i8> %a, %b - ret <8 x i8> %1 -} -define <8 x i16> @udiv_v8_i16(<8 x i16> %a, <8 x i16> %b) { - ; CHECK: udiv_v8_i16 - ; CHECK: cost of 160 {{.*}} udiv - - %1 = udiv <8 x i16> %a, %b - ret <8 x i16> %1 -} -define <8 x i32> @udiv_v8_i32(<8 x i32> %a, <8 x i32> %b) { - ; CHECK: udiv_v8_i32 - ; CHECK: cost of 160 {{.*}} udiv - - %1 = udiv <8 x i32> %a, %b - ret <8 x i32> %1 -} -define <8 x i64> @udiv_v8_i64(<8 x i64> %a, <8 x i64> %b) { - ; CHECK: udiv_v8_i64 - ; CHECK: cost of 160 {{.*}} udiv - - %1 = udiv <8 x i64> %a, %b - ret <8 x i64> %1 -} -define <16 x i8> @udiv_v16_i8(<16 x i8> %a, <16 x i8> %b) { - ; CHECK: udiv_v16_i8 - ; CHECK: cost of 320 {{.*}} udiv - - %1 = udiv <16 x i8> %a, %b - ret <16 x i8> %1 -} -define <16 x i16> @udiv_v16_i16(<16 x i16> %a, <16 x i16> %b) { - ; CHECK: udiv_v16_i16 - ; CHECK: cost of 320 {{.*}} udiv - - %1 = udiv <16 x i16> %a, %b - ret <16 x i16> %1 -} -define <16 x i32> @udiv_v16_i32(<16 x i32> %a, <16 x i32> %b) { - ; CHECK: udiv_v16_i32 - ; CHECK: cost of 320 {{.*}} udiv - - %1 = udiv <16 x i32> %a, %b - ret <16 x i32> %1 -} -define <16 x i64> @udiv_v16_i64(<16 x i64> %a, <16 x i64> %b) { - ; CHECK: udiv_v16_i64 - ; CHECK: cost of 320 {{.*}} udiv - - %1 = udiv <16 x i64> %a, %b - ret <16 x i64> %1 +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py +; RUN: opt < %s -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=cortex-a9 | FileCheck %s --check-prefix=CHECK-NEON +; RUN: opt -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve.fp < %s | FileCheck %s --check-prefix=CHECK-MVE + +define void @i8() { +; CHECK-NEON-LABEL: 'i8' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = sdiv i8 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = udiv i8 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = srem i8 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = urem i8 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = sdiv i8 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = udiv i8 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i8 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i8 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'i8' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = sdiv i8 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = udiv i8 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = srem i8 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = urem i8 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = sdiv i8 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = udiv i8 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i8 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i8 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %1 = sdiv i8 undef, undef + %2 = udiv i8 undef, undef + %3 = srem i8 undef, undef + %4 = urem i8 undef, undef + %5 = sdiv i8 undef, 2 + %6 = udiv i8 undef, 2 + %7 = srem i8 undef, 2 + %8 = urem i8 undef, 2 + ret void +} + +define void @i16() { +; CHECK-NEON-LABEL: 'i16' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = sdiv i16 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = udiv i16 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = srem i16 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = urem i16 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = sdiv i16 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = udiv i16 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i16 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i16 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'i16' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = sdiv i16 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = udiv i16 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = srem i16 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = urem i16 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = sdiv i16 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = udiv i16 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i16 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i16 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %1 = sdiv i16 undef, undef + %2 = udiv i16 undef, undef + %3 = srem i16 undef, undef + %4 = urem i16 undef, undef + %5 = sdiv i16 undef, 2 + %6 = udiv i16 undef, 2 + %7 = srem i16 undef, 2 + %8 = urem i16 undef, 2 + ret void +} + +define void @i32() { +; CHECK-NEON-LABEL: 'i32' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = sdiv i32 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = udiv i32 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = srem i32 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = urem i32 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = sdiv i32 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = udiv i32 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i32 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i32 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'i32' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = sdiv i32 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = udiv i32 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = srem i32 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = urem i32 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = sdiv i32 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = udiv i32 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i32 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i32 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %1 = sdiv i32 undef, undef + %2 = udiv i32 undef, undef + %3 = srem i32 undef, undef + %4 = urem i32 undef, undef + %5 = sdiv i32 undef, 2 + %6 = udiv i32 undef, 2 + %7 = srem i32 undef, 2 + %8 = urem i32 undef, 2 + ret void +} + +define void @i64() { +; CHECK-NEON-LABEL: 'i64' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = sdiv i64 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = udiv i64 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = srem i64 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = urem i64 undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = sdiv i64 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %6 = udiv i64 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i64 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i64 undef, 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'i64' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = sdiv i64 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = udiv i64 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = srem i64 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = urem i64 undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = sdiv i64 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %6 = udiv i64 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i64 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i64 undef, 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %1 = sdiv i64 undef, undef + %2 = udiv i64 undef, undef + %3 = srem i64 undef, undef + %4 = urem i64 undef, undef + %5 = sdiv i64 undef, 2 + %6 = udiv i64 undef, 2 + %7 = srem i64 undef, 2 + %8 = urem i64 undef, 2 + ret void +} + +define void @f16() { +; CHECK-NEON-LABEL: 'f16' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv half undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = frem half undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = fdiv half undef, 0xH4000 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = frem half undef, 0xH4000 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'f16' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv half undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = frem half undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = fdiv half undef, 0xH4000 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = frem half undef, 0xH4000 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %1 = fdiv half undef, undef + %2 = frem half undef, undef + %3 = fdiv half undef, 2. + %4 = frem half undef, 2. + ret void +} + +define void @f32() { +; CHECK-NEON-LABEL: 'f32' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv float undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = frem float undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = fdiv float undef, 2.000000e+00 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = frem float undef, 2.000000e+00 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'f32' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv float undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = frem float undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = fdiv float undef, 2.000000e+00 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = frem float undef, 2.000000e+00 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %1 = fdiv float undef, undef + %2 = frem float undef, undef + %3 = fdiv float undef, 2. + %4 = frem float undef, 2. + ret void +} + +define void @f64() { +; CHECK-NEON-LABEL: 'f64' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv double undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = frem double undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = fdiv double undef, 2.000000e+00 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = frem double undef, 2.000000e+00 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'f64' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv double undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = frem double undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = fdiv double undef, 2.000000e+00 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = frem double undef, 2.000000e+00 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %1 = fdiv double undef, undef + %2 = frem double undef, undef + %3 = fdiv double undef, 2. + %4 = frem double undef, 2. + ret void +} + +define void @vi8() { +; CHECK-NEON-LABEL: 'vi8' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t2 = udiv <2 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t3 = srem <2 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t4 = urem <2 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f1 = sdiv <4 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f2 = udiv <4 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f3 = srem <4 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f4 = urem <4 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %e1 = sdiv <8 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %e2 = udiv <8 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e3 = srem <8 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e4 = urem <8 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s1 = sdiv <16 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i8> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vi8' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %t1 = sdiv <2 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %t2 = udiv <2 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %t3 = srem <2 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %t4 = urem <2 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f1 = sdiv <4 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f2 = udiv <4 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f3 = srem <4 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f4 = urem <4 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e1 = sdiv <8 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e2 = udiv <8 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e3 = srem <8 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e4 = urem <8 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %s1 = sdiv <16 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %s2 = udiv <16 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s3 = srem <16 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s4 = urem <16 x i8> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %t1 = sdiv <2 x i8> undef, undef + %t2 = udiv <2 x i8> undef, undef + %t3 = srem <2 x i8> undef, undef + %t4 = urem <2 x i8> undef, undef + %f1 = sdiv <4 x i8> undef, undef + %f2 = udiv <4 x i8> undef, undef + %f3 = srem <4 x i8> undef, undef + %f4 = urem <4 x i8> undef, undef + %e1 = sdiv <8 x i8> undef, undef + %e2 = udiv <8 x i8> undef, undef + %e3 = srem <8 x i8> undef, undef + %e4 = urem <8 x i8> undef, undef + %s1 = sdiv <16 x i8> undef, undef + %s2 = udiv <16 x i8> undef, undef + %s3 = srem <16 x i8> undef, undef + %s4 = urem <16 x i8> undef, undef + ret void +} + +define void @vi16() { +; CHECK-NEON-LABEL: 'vi16' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t2 = udiv <2 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t3 = srem <2 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t4 = urem <2 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f1 = sdiv <4 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f2 = udiv <4 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f3 = srem <4 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f4 = urem <4 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e1 = sdiv <8 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e2 = udiv <8 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e3 = srem <8 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e4 = urem <8 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s1 = sdiv <16 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i16> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vi16' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %t1 = sdiv <2 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %t2 = udiv <2 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %t3 = srem <2 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %t4 = urem <2 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f1 = sdiv <4 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f2 = udiv <4 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f3 = srem <4 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f4 = urem <4 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e1 = sdiv <8 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e2 = udiv <8 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e3 = srem <8 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e4 = urem <8 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %s1 = sdiv <16 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %s2 = udiv <16 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s3 = srem <16 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s4 = urem <16 x i16> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %t1 = sdiv <2 x i16> undef, undef + %t2 = udiv <2 x i16> undef, undef + %t3 = srem <2 x i16> undef, undef + %t4 = urem <2 x i16> undef, undef + %f1 = sdiv <4 x i16> undef, undef + %f2 = udiv <4 x i16> undef, undef + %f3 = srem <4 x i16> undef, undef + %f4 = urem <4 x i16> undef, undef + %e1 = sdiv <8 x i16> undef, undef + %e2 = udiv <8 x i16> undef, undef + %e3 = srem <8 x i16> undef, undef + %e4 = urem <8 x i16> undef, undef + %s1 = sdiv <16 x i16> undef, undef + %s2 = udiv <16 x i16> undef, undef + %s3 = srem <16 x i16> undef, undef + %s4 = urem <16 x i16> undef, undef + ret void +} + +define void @vi32() { +; CHECK-NEON-LABEL: 'vi32' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t2 = udiv <2 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t3 = srem <2 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t4 = urem <2 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f1 = sdiv <4 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f2 = udiv <4 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f3 = srem <4 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f4 = urem <4 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e1 = sdiv <8 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e2 = udiv <8 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e3 = srem <8 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e4 = urem <8 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s1 = sdiv <16 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i32> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vi32' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %t1 = sdiv <2 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %t2 = udiv <2 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %t3 = srem <2 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %t4 = urem <2 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f1 = sdiv <4 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f2 = udiv <4 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f3 = srem <4 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f4 = urem <4 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e1 = sdiv <8 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e2 = udiv <8 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e3 = srem <8 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e4 = urem <8 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %s1 = sdiv <16 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %s2 = udiv <16 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s3 = srem <16 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s4 = urem <16 x i32> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %t1 = sdiv <2 x i32> undef, undef + %t2 = udiv <2 x i32> undef, undef + %t3 = srem <2 x i32> undef, undef + %t4 = urem <2 x i32> undef, undef + %f1 = sdiv <4 x i32> undef, undef + %f2 = udiv <4 x i32> undef, undef + %f3 = srem <4 x i32> undef, undef + %f4 = urem <4 x i32> undef, undef + %e1 = sdiv <8 x i32> undef, undef + %e2 = udiv <8 x i32> undef, undef + %e3 = srem <8 x i32> undef, undef + %e4 = urem <8 x i32> undef, undef + %s1 = sdiv <16 x i32> undef, undef + %s2 = udiv <16 x i32> undef, undef + %s3 = srem <16 x i32> undef, undef + %s4 = urem <16 x i32> undef, undef + ret void +} + +define void @vi64() { +; CHECK-NEON-LABEL: 'vi64' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t2 = udiv <2 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t3 = srem <2 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t4 = urem <2 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f1 = sdiv <4 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f2 = udiv <4 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f3 = srem <4 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f4 = urem <4 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e1 = sdiv <8 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e2 = udiv <8 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e3 = srem <8 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e4 = urem <8 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s1 = sdiv <16 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i64> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vi64' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %t1 = sdiv <2 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %t2 = udiv <2 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %t3 = srem <2 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %t4 = urem <2 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %f1 = sdiv <4 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %f2 = udiv <4 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f3 = srem <4 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f4 = urem <4 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %e1 = sdiv <8 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %e2 = udiv <8 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e3 = srem <8 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e4 = urem <8 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %s1 = sdiv <16 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %s2 = udiv <16 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s3 = srem <16 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s4 = urem <16 x i64> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %t1 = sdiv <2 x i64> undef, undef + %t2 = udiv <2 x i64> undef, undef + %t3 = srem <2 x i64> undef, undef + %t4 = urem <2 x i64> undef, undef + %f1 = sdiv <4 x i64> undef, undef + %f2 = udiv <4 x i64> undef, undef + %f3 = srem <4 x i64> undef, undef + %f4 = urem <4 x i64> undef, undef + %e1 = sdiv <8 x i64> undef, undef + %e2 = udiv <8 x i64> undef, undef + %e3 = srem <8 x i64> undef, undef + %e4 = urem <8 x i64> undef, undef + %s1 = sdiv <16 x i64> undef, undef + %s2 = udiv <16 x i64> undef, undef + %s3 = srem <16 x i64> undef, undef + %s4 = urem <16 x i64> undef, undef + ret void +} + +define void @vf16() { +; CHECK-NEON-LABEL: 'vf16' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = fdiv <2 x half> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = fdiv <2 x half> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %3 = fdiv <4 x half> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %4 = fdiv <4 x half> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %5 = fdiv <8 x half> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %6 = fdiv <8 x half> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vf16' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %1 = fdiv <2 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %2 = fdiv <2 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %3 = fdiv <4 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %4 = fdiv <4 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %5 = fdiv <8 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %6 = fdiv <8 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %1 = fdiv <2 x half> undef, undef + %2 = fdiv <2 x half> undef, undef + %3 = fdiv <4 x half> undef, undef + %4 = fdiv <4 x half> undef, undef + %5 = fdiv <8 x half> undef, undef + %6 = fdiv <8 x half> undef, undef + ret void +} + +define void @vf32() { +; CHECK-NEON-LABEL: 'vf32' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %1 = fdiv <2 x float> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %2 = fdiv <2 x float> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %3 = fdiv <4 x float> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %4 = fdiv <4 x float> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %5 = fdiv <8 x float> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %6 = fdiv <8 x float> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vf32' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %1 = fdiv <2 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %2 = fdiv <2 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %3 = fdiv <4 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %4 = fdiv <4 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %5 = fdiv <8 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %6 = fdiv <8 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %1 = fdiv <2 x float> undef, undef + %2 = fdiv <2 x float> undef, undef + %3 = fdiv <4 x float> undef, undef + %4 = fdiv <4 x float> undef, undef + %5 = fdiv <8 x float> undef, undef + %6 = fdiv <8 x float> undef, undef + ret void +} + +define void @vf64() { +; CHECK-NEON-LABEL: 'vf64' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %1 = fdiv <2 x double> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %2 = fdiv <2 x double> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %3 = fdiv <4 x double> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %4 = fdiv <4 x double> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %5 = fdiv <8 x double> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %6 = fdiv <8 x double> undef, undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vf64' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %1 = fdiv <2 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %2 = fdiv <2 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %3 = fdiv <4 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %4 = fdiv <4 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %5 = fdiv <8 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %6 = fdiv <8 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %1 = fdiv <2 x double> undef, undef + %2 = fdiv <2 x double> undef, undef + %3 = fdiv <4 x double> undef, undef + %4 = fdiv <4 x double> undef, undef + %5 = fdiv <8 x double> undef, undef + %6 = fdiv <8 x double> undef, undef + ret void +} + +define void @vi8_2() { +; CHECK-NEON-LABEL: 'vi8_2' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t2 = udiv <2 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t3 = srem <2 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t4 = urem <2 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f1 = sdiv <4 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f2 = udiv <4 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f3 = srem <4 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f4 = urem <4 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %e1 = sdiv <8 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %e2 = udiv <8 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e3 = srem <8 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e4 = urem <8 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s1 = sdiv <16 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i8> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vi8_2' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %t1 = sdiv <2 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %t2 = udiv <2 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %t3 = srem <2 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %t4 = urem <2 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f1 = sdiv <4 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f2 = udiv <4 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f3 = srem <4 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f4 = urem <4 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e1 = sdiv <8 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e2 = udiv <8 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e3 = srem <8 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e4 = urem <8 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %s1 = sdiv <16 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %s2 = udiv <16 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s3 = srem <16 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s4 = urem <16 x i8> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %t1 = sdiv <2 x i8> undef, + %t2 = udiv <2 x i8> undef, + %t3 = srem <2 x i8> undef, + %t4 = urem <2 x i8> undef, + %f1 = sdiv <4 x i8> undef, + %f2 = udiv <4 x i8> undef, + %f3 = srem <4 x i8> undef, + %f4 = urem <4 x i8> undef, + %e1 = sdiv <8 x i8> undef, + %e2 = udiv <8 x i8> undef, + %e3 = srem <8 x i8> undef, + %e4 = urem <8 x i8> undef, + %s1 = sdiv <16 x i8> undef, + %s2 = udiv <16 x i8> undef, + %s3 = srem <16 x i8> undef, + %s4 = urem <16 x i8> undef, + ret void +} + +define void @vi16_2() { +; CHECK-NEON-LABEL: 'vi16_2' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t2 = udiv <2 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t3 = srem <2 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t4 = urem <2 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f1 = sdiv <4 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f2 = udiv <4 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f3 = srem <4 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f4 = urem <4 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e1 = sdiv <8 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e2 = udiv <8 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e3 = srem <8 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e4 = urem <8 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s1 = sdiv <16 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i16> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vi16_2' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %t1 = sdiv <2 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %t2 = udiv <2 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %t3 = srem <2 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %t4 = urem <2 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f1 = sdiv <4 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f2 = udiv <4 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f3 = srem <4 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f4 = urem <4 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e1 = sdiv <8 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e2 = udiv <8 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e3 = srem <8 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e4 = urem <8 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %s1 = sdiv <16 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %s2 = udiv <16 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s3 = srem <16 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s4 = urem <16 x i16> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %t1 = sdiv <2 x i16> undef, + %t2 = udiv <2 x i16> undef, + %t3 = srem <2 x i16> undef, + %t4 = urem <2 x i16> undef, + %f1 = sdiv <4 x i16> undef, + %f2 = udiv <4 x i16> undef, + %f3 = srem <4 x i16> undef, + %f4 = urem <4 x i16> undef, + %e1 = sdiv <8 x i16> undef, + %e2 = udiv <8 x i16> undef, + %e3 = srem <8 x i16> undef, + %e4 = urem <8 x i16> undef, + %s1 = sdiv <16 x i16> undef, + %s2 = udiv <16 x i16> undef, + %s3 = srem <16 x i16> undef, + %s4 = urem <16 x i16> undef, + ret void +} + +define void @vi32_2() { +; CHECK-NEON-LABEL: 'vi32_2' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t2 = udiv <2 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t3 = srem <2 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t4 = urem <2 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f1 = sdiv <4 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f2 = udiv <4 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f3 = srem <4 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f4 = urem <4 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e1 = sdiv <8 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e2 = udiv <8 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e3 = srem <8 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e4 = urem <8 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s1 = sdiv <16 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i32> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vi32_2' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %t1 = sdiv <2 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %t2 = udiv <2 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %t3 = srem <2 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %t4 = urem <2 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f1 = sdiv <4 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f2 = udiv <4 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f3 = srem <4 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %f4 = urem <4 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e1 = sdiv <8 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e2 = udiv <8 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e3 = srem <8 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %e4 = urem <8 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %s1 = sdiv <16 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %s2 = udiv <16 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s3 = srem <16 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %s4 = urem <16 x i32> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %t1 = sdiv <2 x i32> undef, + %t2 = udiv <2 x i32> undef, + %t3 = srem <2 x i32> undef, + %t4 = urem <2 x i32> undef, + %f1 = sdiv <4 x i32> undef, + %f2 = udiv <4 x i32> undef, + %f3 = srem <4 x i32> undef, + %f4 = urem <4 x i32> undef, + %e1 = sdiv <8 x i32> undef, + %e2 = udiv <8 x i32> undef, + %e3 = srem <8 x i32> undef, + %e4 = urem <8 x i32> undef, + %s1 = sdiv <16 x i32> undef, + %s2 = udiv <16 x i32> undef, + %s3 = srem <16 x i32> undef, + %s4 = urem <16 x i32> undef, + ret void +} + +define void @vi64_2() { +; CHECK-NEON-LABEL: 'vi64_2' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t2 = udiv <2 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t3 = srem <2 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t4 = urem <2 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f1 = sdiv <4 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f2 = udiv <4 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f3 = srem <4 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f4 = urem <4 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e1 = sdiv <8 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e2 = udiv <8 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e3 = srem <8 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e4 = urem <8 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s1 = sdiv <16 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i64> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vi64_2' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %t1 = sdiv <2 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %t2 = udiv <2 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %t3 = srem <2 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %t4 = urem <2 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %f1 = sdiv <4 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %f2 = udiv <4 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f3 = srem <4 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f4 = urem <4 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 84 for instruction: %e1 = sdiv <8 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 84 for instruction: %e2 = udiv <8 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %e3 = srem <8 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %e4 = urem <8 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 164 for instruction: %s1 = sdiv <16 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 164 for instruction: %s2 = udiv <16 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 116 for instruction: %s3 = srem <16 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 116 for instruction: %s4 = urem <16 x i64> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %t1 = sdiv <2 x i64> undef, + %t2 = udiv <2 x i64> undef, + %t3 = srem <2 x i64> undef, + %t4 = urem <2 x i64> undef, + %f1 = sdiv <4 x i64> undef, + %f2 = udiv <4 x i64> undef, + %f3 = srem <4 x i64> undef, + %f4 = urem <4 x i64> undef, + %e1 = sdiv <8 x i64> undef, + %e2 = udiv <8 x i64> undef, + %e3 = srem <8 x i64> undef, + %e4 = urem <8 x i64> undef, + %s1 = sdiv <16 x i64> undef, + %s2 = udiv <16 x i64> undef, + %s3 = srem <16 x i64> undef, + %s4 = urem <16 x i64> undef, + ret void +} + +define void @vf16_2() { +; CHECK-NEON-LABEL: 'vf16_2' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = fdiv <2 x half> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %2 = fdiv <2 x half> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %3 = fdiv <4 x half> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %4 = fdiv <4 x half> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %5 = fdiv <8 x half> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %6 = fdiv <8 x half> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vf16_2' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %1 = fdiv <2 x half> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %2 = fdiv <2 x half> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %3 = fdiv <4 x half> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %4 = fdiv <4 x half> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %5 = fdiv <8 x half> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %6 = fdiv <8 x half> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %1 = fdiv <2 x half> undef, + %2 = fdiv <2 x half> undef, + %3 = fdiv <4 x half> undef, + %4 = fdiv <4 x half> undef, + %5 = fdiv <8 x half> undef, + %6 = fdiv <8 x half> undef, + ret void +} + +define void @vf32_2() { +; CHECK-NEON-LABEL: 'vf32_2' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %1 = fdiv <2 x float> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %2 = fdiv <2 x float> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %3 = fdiv <4 x float> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %4 = fdiv <4 x float> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %5 = fdiv <8 x float> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %6 = fdiv <8 x float> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vf32_2' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %1 = fdiv <2 x float> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %2 = fdiv <2 x float> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %3 = fdiv <4 x float> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %4 = fdiv <4 x float> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %5 = fdiv <8 x float> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %6 = fdiv <8 x float> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %1 = fdiv <2 x float> undef, + %2 = fdiv <2 x float> undef, + %3 = fdiv <4 x float> undef, + %4 = fdiv <4 x float> undef, + %5 = fdiv <8 x float> undef, + %6 = fdiv <8 x float> undef, + ret void +} + +define void @vf64_2() { +; CHECK-NEON-LABEL: 'vf64_2' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %1 = fdiv <2 x double> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %2 = fdiv <2 x double> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %3 = fdiv <4 x double> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %4 = fdiv <4 x double> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %5 = fdiv <8 x double> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %6 = fdiv <8 x double> undef, +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'vf64_2' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %1 = fdiv <2 x double> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %2 = fdiv <2 x double> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %3 = fdiv <4 x double> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %4 = fdiv <4 x double> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %5 = fdiv <8 x double> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %6 = fdiv <8 x double> undef, +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %1 = fdiv <2 x double> undef, + %2 = fdiv <2 x double> undef, + %3 = fdiv <4 x double> undef, + %4 = fdiv <4 x double> undef, + %5 = fdiv <8 x double> undef, + %6 = fdiv <8 x double> undef, + ret void } -define <2 x i8> @srem_v2_i8(<2 x i8> %a, <2 x i8> %b) { - ; CHECK: srem_v2_i8 - ; CHECK: cost of 40 {{.*}} srem - %1 = srem <2 x i8> %a, %b - ret <2 x i8> %1 -} -define <2 x i16> @srem_v2_i16(<2 x i16> %a, <2 x i16> %b) { - ; CHECK: srem_v2_i16 - ; CHECK: cost of 40 {{.*}} srem - - %1 = srem <2 x i16> %a, %b - ret <2 x i16> %1 -} -define <2 x i32> @srem_v2_i32(<2 x i32> %a, <2 x i32> %b) { - ; CHECK: srem_v2_i32 - ; CHECK: cost of 40 {{.*}} srem - - %1 = srem <2 x i32> %a, %b - ret <2 x i32> %1 -} -define <2 x i64> @srem_v2_i64(<2 x i64> %a, <2 x i64> %b) { - ; CHECK: srem_v2_i64 - ; CHECK: cost of 40 {{.*}} srem - - %1 = srem <2 x i64> %a, %b - ret <2 x i64> %1 -} -define <4 x i8> @srem_v4_i8(<4 x i8> %a, <4 x i8> %b) { - ; CHECK: srem_v4_i8 - ; CHECK: cost of 80 {{.*}} srem - - %1 = srem <4 x i8> %a, %b - ret <4 x i8> %1 -} -define <4 x i16> @srem_v4_i16(<4 x i16> %a, <4 x i16> %b) { - ; CHECK: srem_v4_i16 - ; CHECK: cost of 80 {{.*}} srem - - %1 = srem <4 x i16> %a, %b - ret <4 x i16> %1 -} -define <4 x i32> @srem_v4_i32(<4 x i32> %a, <4 x i32> %b) { - ; CHECK: srem_v4_i32 - ; CHECK: cost of 80 {{.*}} srem - - %1 = srem <4 x i32> %a, %b - ret <4 x i32> %1 -} -define <4 x i64> @srem_v4_i64(<4 x i64> %a, <4 x i64> %b) { - ; CHECK: srem_v4_i64 - ; CHECK: cost of 80 {{.*}} srem - - %1 = srem <4 x i64> %a, %b - ret <4 x i64> %1 -} -define <8 x i8> @srem_v8_i8(<8 x i8> %a, <8 x i8> %b) { - ; CHECK: srem_v8_i8 - ; CHECK: cost of 160 {{.*}} srem - - %1 = srem <8 x i8> %a, %b - ret <8 x i8> %1 -} -define <8 x i16> @srem_v8_i16(<8 x i16> %a, <8 x i16> %b) { - ; CHECK: srem_v8_i16 - ; CHECK: cost of 160 {{.*}} srem - - %1 = srem <8 x i16> %a, %b - ret <8 x i16> %1 -} -define <8 x i32> @srem_v8_i32(<8 x i32> %a, <8 x i32> %b) { - ; CHECK: srem_v8_i32 - ; CHECK: cost of 160 {{.*}} srem - - %1 = srem <8 x i32> %a, %b - ret <8 x i32> %1 -} -define <8 x i64> @srem_v8_i64(<8 x i64> %a, <8 x i64> %b) { - ; CHECK: srem_v8_i64 - ; CHECK: cost of 160 {{.*}} srem - - %1 = srem <8 x i64> %a, %b - ret <8 x i64> %1 -} -define <16 x i8> @srem_v16_i8(<16 x i8> %a, <16 x i8> %b) { - ; CHECK: srem_v16_i8 - ; CHECK: cost of 320 {{.*}} srem - - %1 = srem <16 x i8> %a, %b - ret <16 x i8> %1 -} -define <16 x i16> @srem_v16_i16(<16 x i16> %a, <16 x i16> %b) { - ; CHECK: srem_v16_i16 - ; CHECK: cost of 320 {{.*}} srem - - %1 = srem <16 x i16> %a, %b - ret <16 x i16> %1 -} -define <16 x i32> @srem_v16_i32(<16 x i32> %a, <16 x i32> %b) { - ; CHECK: srem_v16_i32 - ; CHECK: cost of 320 {{.*}} srem - - %1 = srem <16 x i32> %a, %b - ret <16 x i32> %1 -} -define <16 x i64> @srem_v16_i64(<16 x i64> %a, <16 x i64> %b) { - ; CHECK: srem_v16_i64 - ; CHECK: cost of 320 {{.*}} srem - - %1 = srem <16 x i64> %a, %b - ret <16 x i64> %1 -} -define <2 x i8> @urem_v2_i8(<2 x i8> %a, <2 x i8> %b) { - ; CHECK: urem_v2_i8 - ; CHECK: cost of 40 {{.*}} urem - - %1 = urem <2 x i8> %a, %b - ret <2 x i8> %1 -} -define <2 x i16> @urem_v2_i16(<2 x i16> %a, <2 x i16> %b) { - ; CHECK: urem_v2_i16 - ; CHECK: cost of 40 {{.*}} urem - - %1 = urem <2 x i16> %a, %b - ret <2 x i16> %1 -} -define <2 x i32> @urem_v2_i32(<2 x i32> %a, <2 x i32> %b) { - ; CHECK: urem_v2_i32 - ; CHECK: cost of 40 {{.*}} urem - - %1 = urem <2 x i32> %a, %b - ret <2 x i32> %1 -} -define <2 x i64> @urem_v2_i64(<2 x i64> %a, <2 x i64> %b) { - ; CHECK: urem_v2_i64 - ; CHECK: cost of 40 {{.*}} urem - - %1 = urem <2 x i64> %a, %b - ret <2 x i64> %1 -} -define <4 x i8> @urem_v4_i8(<4 x i8> %a, <4 x i8> %b) { - ; CHECK: urem_v4_i8 - ; CHECK: cost of 80 {{.*}} urem - - %1 = urem <4 x i8> %a, %b - ret <4 x i8> %1 -} -define <4 x i16> @urem_v4_i16(<4 x i16> %a, <4 x i16> %b) { - ; CHECK: urem_v4_i16 - ; CHECK: cost of 80 {{.*}} urem - - %1 = urem <4 x i16> %a, %b - ret <4 x i16> %1 -} -define <4 x i32> @urem_v4_i32(<4 x i32> %a, <4 x i32> %b) { - ; CHECK: urem_v4_i32 - ; CHECK: cost of 80 {{.*}} urem - - %1 = urem <4 x i32> %a, %b - ret <4 x i32> %1 -} -define <4 x i64> @urem_v4_i64(<4 x i64> %a, <4 x i64> %b) { - ; CHECK: urem_v4_i64 - ; CHECK: cost of 80 {{.*}} urem - - %1 = urem <4 x i64> %a, %b - ret <4 x i64> %1 -} -define <8 x i8> @urem_v8_i8(<8 x i8> %a, <8 x i8> %b) { - ; CHECK: urem_v8_i8 - ; CHECK: cost of 160 {{.*}} urem - - %1 = urem <8 x i8> %a, %b - ret <8 x i8> %1 -} -define <8 x i16> @urem_v8_i16(<8 x i16> %a, <8 x i16> %b) { - ; CHECK: urem_v8_i16 - ; CHECK: cost of 160 {{.*}} urem - - %1 = urem <8 x i16> %a, %b - ret <8 x i16> %1 -} -define <8 x i32> @urem_v8_i32(<8 x i32> %a, <8 x i32> %b) { - ; CHECK: urem_v8_i32 - ; CHECK: cost of 160 {{.*}} urem - - %1 = urem <8 x i32> %a, %b - ret <8 x i32> %1 -} -define <8 x i64> @urem_v8_i64(<8 x i64> %a, <8 x i64> %b) { - ; CHECK: urem_v8_i64 - ; CHECK: cost of 160 {{.*}} urem - - %1 = urem <8 x i64> %a, %b - ret <8 x i64> %1 -} -define <16 x i8> @urem_v16_i8(<16 x i8> %a, <16 x i8> %b) { - ; CHECK: urem_v16_i8 - ; CHECK: cost of 320 {{.*}} urem - - %1 = urem <16 x i8> %a, %b - ret <16 x i8> %1 -} -define <16 x i16> @urem_v16_i16(<16 x i16> %a, <16 x i16> %b) { - ; CHECK: urem_v16_i16 - ; CHECK: cost of 320 {{.*}} urem - - %1 = urem <16 x i16> %a, %b - ret <16 x i16> %1 -} -define <16 x i32> @urem_v16_i32(<16 x i32> %a, <16 x i32> %b) { - ; CHECK: urem_v16_i32 - ; CHECK: cost of 320 {{.*}} urem - - %1 = urem <16 x i32> %a, %b - ret <16 x i32> %1 -} -define <16 x i64> @urem_v16_i64(<16 x i64> %a, <16 x i64> %b) { - ; CHECK: urem_v16_i64 - ; CHECK: cost of 320 {{.*}} urem - - %1 = urem <16 x i64> %a, %b - ret <16 x i64> %1 -} diff --git a/test/Analysis/CostModel/ARM/fparith.ll b/test/Analysis/CostModel/ARM/fparith.ll new file mode 100644 index 00000000000..2c4c050967d --- /dev/null +++ b/test/Analysis/CostModel/ARM/fparith.ll @@ -0,0 +1,172 @@ +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py +; RUN: opt -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve < %s | FileCheck %s --check-prefix=CHECK-MVE +; RUN: opt -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve.fp < %s | FileCheck %s --check-prefix=CHECK-MVEFP + +define void @f32() { +; CHECK-MVE-LABEL: 'f32' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = fadd float undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = fsub float undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = fmul float undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVEFP-LABEL: 'f32' +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = fadd float undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = fsub float undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = fmul float undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c = fadd float undef, undef + %d = fsub float undef, undef + %e = fmul float undef, undef + ret void +} + +define void @f16() { +; CHECK-MVE-LABEL: 'f16' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = fadd half undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = fsub half undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = fmul half undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVEFP-LABEL: 'f16' +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = fadd half undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = fsub half undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = fmul half undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c = fadd half undef, undef + %d = fsub half undef, undef + %e = fmul half undef, undef + ret void +} + +define void @f64() { +; CHECK-MVE-LABEL: 'f64' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = fadd double undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = fsub double undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = fmul double undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVEFP-LABEL: 'f64' +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = fadd double undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = fsub double undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = fmul double undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c = fadd double undef, undef + %d = fsub double undef, undef + %e = fmul double undef, undef + ret void +} + +define void @vf32() { +; CHECK-MVE-LABEL: 'vf32' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %c2 = fadd <2 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %d2 = fsub <2 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %e2 = fmul <2 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %c4 = fadd <4 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %d4 = fsub <4 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %e4 = fmul <4 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %c8 = fadd <8 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %d8 = fsub <8 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %e8 = fmul <8 x float> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVEFP-LABEL: 'vf32' +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c2 = fadd <2 x float> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d2 = fsub <2 x float> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e2 = fmul <2 x float> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c4 = fadd <4 x float> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d4 = fsub <4 x float> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e4 = fmul <4 x float> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c8 = fadd <8 x float> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d8 = fsub <8 x float> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e8 = fmul <8 x float> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c2 = fadd <2 x float> undef, undef + %d2 = fsub <2 x float> undef, undef + %e2 = fmul <2 x float> undef, undef + %c4 = fadd <4 x float> undef, undef + %d4 = fsub <4 x float> undef, undef + %e4 = fmul <4 x float> undef, undef + %c8 = fadd <8 x float> undef, undef + %d8 = fsub <8 x float> undef, undef + %e8 = fmul <8 x float> undef, undef + ret void +} + +define void @vf16() { +; CHECK-MVE-LABEL: 'vf16' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %c2 = fadd <2 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %d2 = fsub <2 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %e2 = fmul <2 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %c4 = fadd <4 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %d4 = fsub <4 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %e4 = fmul <4 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %c8 = fadd <8 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %d8 = fsub <8 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %e8 = fmul <8 x half> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVEFP-LABEL: 'vf16' +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c2 = fadd <2 x half> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d2 = fsub <2 x half> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e2 = fmul <2 x half> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c4 = fadd <4 x half> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d4 = fsub <4 x half> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e4 = fmul <4 x half> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c8 = fadd <8 x half> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d8 = fsub <8 x half> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e8 = fmul <8 x half> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c2 = fadd <2 x half> undef, undef + %d2 = fsub <2 x half> undef, undef + %e2 = fmul <2 x half> undef, undef + %c4 = fadd <4 x half> undef, undef + %d4 = fsub <4 x half> undef, undef + %e4 = fmul <4 x half> undef, undef + %c8 = fadd <8 x half> undef, undef + %d8 = fsub <8 x half> undef, undef + %e8 = fmul <8 x half> undef, undef + ret void +} + +define void @vf64() { +; CHECK-MVE-LABEL: 'vf64' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %c2 = fadd <2 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %d2 = fsub <2 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %e2 = fmul <2 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %c4 = fadd <4 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %d4 = fsub <4 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %e4 = fmul <4 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %c8 = fadd <8 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %d8 = fsub <8 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %e8 = fmul <8 x double> undef, undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVEFP-LABEL: 'vf64' +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %c2 = fadd <2 x double> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %d2 = fsub <2 x double> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %e2 = fmul <2 x double> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %c4 = fadd <4 x double> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %d4 = fsub <4 x double> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %e4 = fmul <4 x double> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %c8 = fadd <8 x double> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %d8 = fsub <8 x double> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %e8 = fmul <8 x double> undef, undef +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %c2 = fadd <2 x double> undef, undef + %d2 = fsub <2 x double> undef, undef + %e2 = fmul <2 x double> undef, undef + %c4 = fadd <4 x double> undef, undef + %d4 = fsub <4 x double> undef, undef + %e4 = fmul <4 x double> undef, undef + %c8 = fadd <8 x double> undef, undef + %d8 = fsub <8 x double> undef, undef + %e8 = fmul <8 x double> undef, undef + ret void +} + diff --git a/test/Analysis/CostModel/ARM/load_store.ll b/test/Analysis/CostModel/ARM/load_store.ll new file mode 100644 index 00000000000..29118a69aab --- /dev/null +++ b/test/Analysis/CostModel/ARM/load_store.ll @@ -0,0 +1,278 @@ +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py +; RUN: opt -cost-model -analyze -mtriple=thumbv6m-none-eabi < %s | FileCheck %s --check-prefix=CHECK-NOVEC +; RUN: opt -cost-model -analyze -mtriple=thumbv7m-none-eabi -mcpu=cortex-m3 < %s | FileCheck %s --check-prefix=CHECK-NOVEC +; RUN: opt -cost-model -analyze -mtriple=thumbv7m-none-eabi -mcpu=cortex-m4 < %s | FileCheck %s --check-prefix=CHECK-FP +; RUN: opt -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve < %s | FileCheck %s --check-prefix=CHECK-MVE +; RUN: opt -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=swift < %s | FileCheck %s --check-prefix=CHECK-NEON +; RUN: opt -cost-model -analyze -mtriple=arm-none-eabi -mcpu=cortex-a53 < %s | FileCheck %s --check-prefix=CHECK-NEON + +define void @stores() { +; CHECK-NOVEC-LABEL: 'stores' +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 undef, i8* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 undef, i16* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 undef, i32* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 undef, i64* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 undef, i128* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store float undef, float* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store double undef, double* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i8> undef, <2 x i8>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i16> undef, <2 x i16>* undef, align 2 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i32> undef, <2 x i32>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 2 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <16 x i8> undef, <16 x i8>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x float> undef, <4 x float>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <4 x double> undef, <4 x double>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x float> undef, <2 x float>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <2 x double> undef, <2 x double>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x float> undef, <4 x float>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <2 x double> undef, <2 x double>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-FP-LABEL: 'stores' +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 undef, i8* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 undef, i16* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 undef, i32* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 undef, i64* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 undef, i128* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store float undef, float* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store double undef, double* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i8> undef, <2 x i8>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i16> undef, <2 x i16>* undef, align 2 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i32> undef, <2 x i32>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 2 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <16 x i8> undef, <16 x i8>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x float> undef, <4 x float>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <4 x double> undef, <4 x double>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x float> undef, <2 x float>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <2 x double> undef, <2 x double>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x float> undef, <4 x float>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <2 x double> undef, <2 x double>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'stores' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 undef, i8* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 undef, i16* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 undef, i32* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 undef, i64* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 undef, i128* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store float undef, float* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store double undef, double* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> undef, <2 x i8>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> undef, <2 x i16>* undef, align 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> undef, <2 x i32>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> undef, <16 x i8>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x float> undef, <4 x float>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <4 x double> undef, <4 x double>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x float> undef, <2 x float>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x double> undef, <2 x double>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x float> undef, <4 x float>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x double> undef, <2 x double>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-NEON-LABEL: 'stores' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 undef, i8* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 undef, i16* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 undef, i32* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 undef, i64* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 undef, i128* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store float undef, float* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store double undef, double* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> undef, <2 x i8>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> undef, <2 x i16>* undef, align 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> undef, <2 x i32>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> undef, <16 x i8>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x float> undef, <4 x float>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <4 x double> undef, <4 x double>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x float> undef, <2 x float>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x double> undef, <2 x double>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x float> undef, <4 x float>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x double> undef, <2 x double>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + store i8 undef, i8* undef, align 4 + store i16 undef, i16* undef, align 4 + store i32 undef, i32* undef, align 4 + store i64 undef, i64* undef, align 4 + store i128 undef, i128* undef, align 4 + store float undef, float* undef, align 4 + store double undef, double* undef, align 4 + + store <2 x i8> undef, <2 x i8>* undef, align 1 + store <2 x i16> undef, <2 x i16>* undef, align 2 + store <2 x i32> undef, <2 x i32>* undef, align 4 + store <2 x i64> undef, <2 x i64>* undef, align 4 + store <4 x i32> undef, <4 x i32>* undef, align 4 + store <8 x i16> undef, <8 x i16>* undef, align 2 + store <16 x i8> undef, <16 x i8>* undef, align 1 + + store <4 x float> undef, <4 x float>* undef, align 4 + store <4 x double> undef, <4 x double>* undef, align 4 + store <2 x float> undef, <2 x float>* undef, align 4 + store <2 x double> undef, <2 x double>* undef, align 4 + + store <2 x i64> undef, <2 x i64>* undef, align 1 + store <4 x i32> undef, <4 x i32>* undef, align 1 + store <8 x i16> undef, <8 x i16>* undef, align 1 + store <4 x float> undef, <4 x float>* undef, align 1 + store <2 x double> undef, <2 x double>* undef, align 1 + + ret void +} + +define void @loads() { +; CHECK-NOVEC-LABEL: 'loads' +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i8, i8* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load i16, i16* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load i32, i32* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load i64, i64* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load i128, i128* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load float, float* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = load double, double* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = load <2 x i8>, <2 x i8>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = load <2 x i16>, <2 x i16>* undef, align 2 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = load <2 x i32>, <2 x i32>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %11 = load <2 x i64>, <2 x i64>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %12 = load <4 x i32>, <4 x i32>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %13 = load <8 x i16>, <8 x i16>* undef, align 2 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %14 = load <16 x i8>, <16 x i8>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %15 = load <4 x float>, <4 x float>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %16 = load <4 x double>, <4 x double>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = load <2 x float>, <2 x float>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %18 = load <2 x double>, <2 x double>* undef, align 4 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %19 = load <2 x i64>, <2 x i64>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %20 = load <4 x i32>, <4 x i32>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %21 = load <8 x i16>, <8 x i16>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %22 = load <4 x float>, <4 x float>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %23 = load <2 x double>, <2 x double>* undef, align 1 +; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-FP-LABEL: 'loads' +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i8, i8* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load i16, i16* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load i32, i32* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load i64, i64* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load i128, i128* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load float, float* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load double, double* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = load <2 x i8>, <2 x i8>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = load <2 x i16>, <2 x i16>* undef, align 2 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = load <2 x i32>, <2 x i32>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %11 = load <2 x i64>, <2 x i64>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %12 = load <4 x i32>, <4 x i32>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %13 = load <8 x i16>, <8 x i16>* undef, align 2 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %14 = load <16 x i8>, <16 x i8>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %15 = load <4 x float>, <4 x float>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %16 = load <4 x double>, <4 x double>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = load <2 x float>, <2 x float>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %18 = load <2 x double>, <2 x double>* undef, align 4 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %19 = load <2 x i64>, <2 x i64>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %20 = load <4 x i32>, <4 x i32>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %21 = load <8 x i16>, <8 x i16>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %22 = load <4 x float>, <4 x float>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %23 = load <2 x double>, <2 x double>* undef, align 1 +; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-MVE-LABEL: 'loads' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i8, i8* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load i16, i16* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load i32, i32* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load i64, i64* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load i128, i128* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load float, float* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load double, double* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <2 x i8>, <2 x i8>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <2 x i16>, <2 x i16>* undef, align 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i32>, <2 x i32>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <2 x i64>, <2 x i64>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <4 x i32>, <4 x i32>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load <8 x i16>, <8 x i16>* undef, align 2 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <16 x i8>, <16 x i8>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <4 x float>, <4 x float>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %16 = load <4 x double>, <4 x double>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = load <2 x float>, <2 x float>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %18 = load <2 x double>, <2 x double>* undef, align 4 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = load <2 x i64>, <2 x i64>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <4 x i32>, <4 x i32>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %21 = load <8 x i16>, <8 x i16>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = load <4 x float>, <4 x float>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %23 = load <2 x double>, <2 x double>* undef, align 1 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-NEON-LABEL: 'loads' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i8, i8* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load i16, i16* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load i32, i32* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load i64, i64* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load i128, i128* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load float, float* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load double, double* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <2 x i8>, <2 x i8>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <2 x i16>, <2 x i16>* undef, align 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i32>, <2 x i32>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <2 x i64>, <2 x i64>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <4 x i32>, <4 x i32>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load <8 x i16>, <8 x i16>* undef, align 2 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <16 x i8>, <16 x i8>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <4 x float>, <4 x float>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %16 = load <4 x double>, <4 x double>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = load <2 x float>, <2 x float>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %18 = load <2 x double>, <2 x double>* undef, align 4 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = load <2 x i64>, <2 x i64>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <4 x i32>, <4 x i32>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %21 = load <8 x i16>, <8 x i16>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = load <4 x float>, <4 x float>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %23 = load <2 x double>, <2 x double>* undef, align 1 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + load i8, i8* undef, align 4 + load i16, i16* undef, align 4 + load i32, i32* undef, align 4 + load i64, i64* undef, align 4 + load i128, i128* undef, align 4 + load float, float* undef, align 4 + load double, double* undef, align 4 + + load <2 x i8>, <2 x i8>* undef, align 1 + load <2 x i16>, <2 x i16>* undef, align 2 + load <2 x i32>, <2 x i32>* undef, align 4 + load <2 x i64>, <2 x i64>* undef, align 4 + load <4 x i32>, <4 x i32>* undef, align 4 + load <8 x i16>, <8 x i16>* undef, align 2 + load <16 x i8>, <16 x i8>* undef, align 1 + + load <4 x float>, <4 x float>* undef, align 4 + load <4 x double>, <4 x double>* undef, align 4 + load <2 x float>, <2 x float>* undef, align 4 + load <2 x double>, <2 x double>* undef, align 4 + + load <2 x i64>, <2 x i64>* undef, align 1 + load <4 x i32>, <4 x i32>* undef, align 1 + load <8 x i16>, <8 x i16>* undef, align 1 + load <4 x float>, <4 x float>* undef, align 1 + load <2 x double>, <2 x double>* undef, align 1 + + ret void +} + diff --git a/test/Analysis/CostModel/ARM/select.ll b/test/Analysis/CostModel/ARM/select.ll index 57e1418a3f2..9b252c0c2b0 100644 --- a/test/Analysis/CostModel/ARM/select.ll +++ b/test/Analysis/CostModel/ARM/select.ll @@ -1,74 +1,107 @@ -; RUN: opt < %s -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=swift | FileCheck %s -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 triple = "thumbv7-apple-ios6.0.0" +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py +; RUN: opt < %s -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve.fp | FileCheck %s --check-prefix=CHECK-MVE +; RUN: opt < %s -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=swift | FileCheck %s --check-prefix=CHECK-NEON -; CHECK: casts define void @casts() { - ; Scalar values - ; CHECK: cost of 1 {{.*}} select +; CHECK-MVE-LABEL: 'casts' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v1 = select i1 undef, i8 undef, i8 undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = select i1 undef, i16 undef, i16 undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3 = select i1 undef, i32 undef, i32 undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4 = select i1 undef, i64 undef, i64 undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5 = select i1 undef, float undef, float undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v6 = select i1 undef, double undef, double undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v7 = select <2 x i1> undef, <2 x i8> undef, <2 x i8> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = select <4 x i1> undef, <4 x i8> undef, <4 x i8> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = select <8 x i1> undef, <8 x i8> undef, <8 x i8> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v10 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v11 = select <2 x i1> undef, <2 x i16> undef, <2 x i16> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = select <4 x i1> undef, <4 x i16> undef, <4 x i16> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v13 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v13b = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v14 = select <2 x i1> undef, <2 x i32> undef, <2 x i32> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v15b = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v15c = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v16 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %v16a = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %v16b = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %v16c = select <16 x i1> undef, <16 x i64> undef, <16 x i64> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v17 = select <2 x i1> undef, <2 x float> undef, <2 x float> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v18 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v19 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v20 = select <1 x i1> undef, <1 x i32> undef, <1 x i32> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v21 = select <3 x i1> undef, <3 x float> undef, <3 x float> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v22 = select <5 x i1> undef, <5 x double> undef, <5 x double> undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-NEON-LABEL: 'casts' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v1 = select i1 undef, i8 undef, i8 undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = select i1 undef, i16 undef, i16 undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3 = select i1 undef, i32 undef, i32 undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4 = select i1 undef, i64 undef, i64 undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5 = select i1 undef, float undef, float undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v6 = select i1 undef, double undef, double undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = select <2 x i1> undef, <2 x i8> undef, <2 x i8> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = select <4 x i1> undef, <4 x i8> undef, <4 x i8> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = select <8 x i1> undef, <8 x i8> undef, <8 x i8> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v10 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = select <2 x i1> undef, <2 x i16> undef, <2 x i16> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = select <4 x i1> undef, <4 x i16> undef, <4 x i16> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v13 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v13b = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = select <2 x i1> undef, <2 x i32> undef, <2 x i32> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v15b = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v15c = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %v16a = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %v16b = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 100 for instruction: %v16c = select <16 x i1> undef, <16 x i64> undef, <16 x i64> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v17 = select <2 x i1> undef, <2 x float> undef, <2 x float> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v18 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v19 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v20 = select <1 x i1> undef, <1 x i32> undef, <1 x i32> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v21 = select <3 x i1> undef, <3 x float> undef, <3 x float> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v22 = select <5 x i1> undef, <5 x double> undef, <5 x double> undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + ; Scalar values %v1 = select i1 undef, i8 undef, i8 undef - ; CHECK: cost of 1 {{.*}} select %v2 = select i1 undef, i16 undef, i16 undef - ; CHECK: cost of 1 {{.*}} select %v3 = select i1 undef, i32 undef, i32 undef - ; CHECK: cost of 2 {{.*}} select %v4 = select i1 undef, i64 undef, i64 undef - ; CHECK: cost of 1 {{.*}} select %v5 = select i1 undef, float undef, float undef - ; CHECK: cost of 1 {{.*}} select %v6 = select i1 undef, double undef, double undef - ; Vector values - ; CHECK: cost of 1 {{.*}} select + ; Vector values %v7 = select <2 x i1> undef, <2 x i8> undef, <2 x i8> undef - ; CHECK: cost of 1 {{.*}} select %v8 = select <4 x i1> undef, <4 x i8> undef, <4 x i8> undef - ; CHECK: cost of 1 {{.*}} select %v9 = select <8 x i1> undef, <8 x i8> undef, <8 x i8> undef - ; CHECK: cost of 1 {{.*}} select %v10 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef - ; CHECK: cost of 1 {{.*}} select %v11 = select <2 x i1> undef, <2 x i16> undef, <2 x i16> undef - ; CHECK: cost of 1 {{.*}} select %v12 = select <4 x i1> undef, <4 x i16> undef, <4 x i16> undef - ; CHECK: cost of 1 {{.*}} select %v13 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef - ; CHECK: cost of 2 {{.*}} select %v13b = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef - ; CHECK: cost of 1 {{.*}} select %v14 = select <2 x i1> undef, <2 x i32> undef, <2 x i32> undef - ; CHECK: cost of 1 {{.*}} select %v15 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef - ; CHECK: cost of 2 {{.*}} select %v15b = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef - ; CHECK: cost of 4 {{.*}} select %v15c = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef - ; CHECK: cost of 1 {{.*}} select %v16 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef - ; CHECK: cost of 19 {{.*}} select %v16a = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef - ; CHECK: cost of 50 {{.*}} select %v16b = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef - ; CHECK: cost of 100 {{.*}} select %v16c = select <16 x i1> undef, <16 x i64> undef, <16 x i64> undef - ; CHECK: cost of 1 {{.*}} select %v17 = select <2 x i1> undef, <2 x float> undef, <2 x float> undef - ; CHECK: cost of 1 {{.*}} select %v18 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef - ; CHECK: cost of 1 {{.*}} select %v19 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef ; odd vectors get legalized and should have similar costs - ; CHECK: cost of 1 {{.*}} select %v20 = select <1 x i1> undef, <1 x i32> undef, <1 x i32> undef - ; CHECK: cost of 1 {{.*}} select %v21 = select <3 x i1> undef, <3 x float> undef, <3 x float> undef - ; CHECK: cost of 4 {{.*}} select %v22 = select <5 x i1> undef, <5 x double> undef, <5 x double> undef ret void diff --git a/test/Analysis/CostModel/ARM/shuffle.ll b/test/Analysis/CostModel/ARM/shuffle.ll index a6a42352564..c3cd4271b73 100644 --- a/test/Analysis/CostModel/ARM/shuffle.ll +++ b/test/Analysis/CostModel/ARM/shuffle.ll @@ -1,71 +1,104 @@ ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py -; RUN: opt < %s -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=swift | FileCheck %s -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 triple = "thumbv7-apple-ios6.0.0" +; RUN: opt < %s -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve.fp | FileCheck %s --check-prefix=CHECK-MVE +; RUN: opt < %s -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=swift | FileCheck %s --check-prefix=CHECK-NEON 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 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-LABEL: 'broadcast' +; CHECK-MVE-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 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> zeroinitializer +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> zeroinitializer +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> zeroinitializer +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> zeroinitializer +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> zeroinitializer +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> zeroinitializer +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> zeroinitializer +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> zeroinitializer +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> zeroinitializer +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> zeroinitializer +; CHECK-MVE-NEXT: Cost Model: Unknown cost for instruction: %v18 = shufflevector <8 x half> undef, <8 x half> undef, <4 x i32> zeroinitializer +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; - %v7 = shufflevector <2 x i8> undef, <2 x i8>undef, <2 x i32> zeroinitializer - %v8 = shufflevector <4 x i8> undef, <4 x i8>undef, <4 x i32> zeroinitializer - %v9 = shufflevector <8 x i8> undef, <8 x i8>undef, <8 x i32> zeroinitializer - %v10 = shufflevector <16 x i8> undef, <16 x i8>undef, <16 x i32> zeroinitializer +; CHECK-NEON-LABEL: 'broadcast' +; CHECK-NEON-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 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> zeroinitializer +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> zeroinitializer +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> zeroinitializer +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> zeroinitializer +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> zeroinitializer +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> zeroinitializer +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> zeroinitializer +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> zeroinitializer +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> zeroinitializer +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> zeroinitializer +; CHECK-NEON-NEXT: Cost Model: Unknown cost for instruction: %v18 = shufflevector <8 x half> undef, <8 x half> undef, <4 x i32> zeroinitializer +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; + %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> zeroinitializer + %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> zeroinitializer + %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> zeroinitializer + %v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> zeroinitializer - %v11 = shufflevector <2 x i16> undef, <2 x i16>undef, <2 x i32> zeroinitializer - %v12 = shufflevector <4 x i16> undef, <4 x i16>undef, <4 x i32> zeroinitializer - %v13 = shufflevector <8 x i16> undef, <8 x i16>undef, <8 x i32> zeroinitializer + %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> zeroinitializer + %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> zeroinitializer + %v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> zeroinitializer - %v14 = shufflevector <2 x i32> undef, <2 x i32>undef, <2 x i32> zeroinitializer - %v15 = shufflevector <4 x i32> undef, <4 x i32>undef, <4 x i32> zeroinitializer + %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> zeroinitializer + %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> zeroinitializer - %v16 = shufflevector <2 x float> undef, <2 x float>undef, <2 x i32> zeroinitializer - %v17 = shufflevector <4 x float> undef, <4 x float>undef, <4 x i32> zeroinitializer + %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> zeroinitializer + %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> zeroinitializer + %v18 = shufflevector <8 x half> undef, <8 x half> undef, <4 x i32> zeroinitializer ret void } -;; Reverse shuffles should be lowered to vrev and possibly a vext (for quadwords) +;; Reverse shuffles should be lowered to vrev and possibly a vext (for quadwords, on neon) define void @reverse() { -; CHECK-LABEL: 'reverse' -; 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> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-LABEL: 'reverse' +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v18 = shufflevector <8 x half> undef, <8 x half> undef, <8 x i32> +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; +; CHECK-NEON-LABEL: 'reverse' +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %v18 = shufflevector <8 x half> undef, <8 x half> undef, <8 x i32> +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; - %v7 = shufflevector <2 x i8> undef, <2 x i8>undef, <2 x i32> - %v8 = shufflevector <4 x i8> undef, <4 x i8>undef, <4 x i32> - %v9 = shufflevector <8 x i8> undef, <8 x i8>undef, <8 x i32> - %v10 = shufflevector <16 x i8> undef, <16 x i8>undef, <16 x i32> + %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> + %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> + %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> + %v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> - %v11 = shufflevector <2 x i16> undef, <2 x i16>undef, <2 x i32> - %v12 = shufflevector <4 x i16> undef, <4 x i16>undef, <4 x i32> - %v13 = shufflevector <8 x i16> undef, <8 x i16>undef, <8 x i32> + %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> + %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> + %v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> - %v14 = shufflevector <2 x i32> undef, <2 x i32>undef, <2 x i32> - %v15 = shufflevector <4 x i32> undef, <4 x i32>undef, <4 x i32> + %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> + %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> - %v16 = shufflevector <2 x float> undef, <2 x float>undef, <2 x i32> - %v17 = shufflevector <4 x float> undef, <4 x float>undef, <4 x i32> + %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> + %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> + %v18 = shufflevector <8 x half> undef, <8 x half> undef, <8 x i32> ret void }