From 438ffdb821bb930b4b4e18fcd863ba37dc23bf16 Mon Sep 17 00:00:00 2001 From: David Green Date: Thu, 7 Jul 2022 16:10:00 +0100 Subject: [PATCH] [ARM] Switch the costs of mve1beat and mve4beat These three subtarget features are meant to control where MVE instructions take 1 vs 2 vs 4 architectural beats. The mve1beat feature is described as "Model MVE instructions as a 1 beat per tick architecture", meaning MVE instruction will execute over 4 cycles. mve4beat is the opposite where the entire 4 beats of the MVE instruction execute in a single cycle. The costs for the two were backwards though, not matching the cycle counts like they should. This patch switches the costs on the two to bring them in-line with expectations. Differential Revision: https://reviews.llvm.org/D129141 --- llvm/lib/Target/ARM/ARM.td | 4 +- llvm/test/Analysis/CostModel/ARM/arith.ll | 408 ++++++++++----------- .../Transforms/LoopVectorize/ARM/pointer_iv.ll | 2 +- 3 files changed, 207 insertions(+), 207 deletions(-) diff --git a/llvm/lib/Target/ARM/ARM.td b/llvm/lib/Target/ARM/ARM.td index 7bc5c8c..73970b9 100644 --- a/llvm/lib/Target/ARM/ARM.td +++ b/llvm/lib/Target/ARM/ARM.td @@ -378,13 +378,13 @@ def FeaturePref32BitThumb : SubtargetFeature<"32bit", "Prefers32BitThumb", "true def FeaturePrefLoopAlign32 : SubtargetFeature<"loop-align", "PrefLoopLogAlignment","2", "Prefer 32-bit alignment for loops">; -def FeatureMVEVectorCostFactor1 : SubtargetFeature<"mve1beat", "MVEVectorCostFactor", "1", +def FeatureMVEVectorCostFactor1 : SubtargetFeature<"mve1beat", "MVEVectorCostFactor", "4", "Model MVE instructions as a 1 beat per tick architecture">; def FeatureMVEVectorCostFactor2 : SubtargetFeature<"mve2beat", "MVEVectorCostFactor", "2", "Model MVE instructions as a 2 beats per tick architecture">; -def FeatureMVEVectorCostFactor4 : SubtargetFeature<"mve4beat", "MVEVectorCostFactor", "4", +def FeatureMVEVectorCostFactor4 : SubtargetFeature<"mve4beat", "MVEVectorCostFactor", "1", "Model MVE instructions as a 4 beats per tick architecture">; /// Some instructions update CPSR partially, which can add false dependency for diff --git a/llvm/test/Analysis/CostModel/ARM/arith.ll b/llvm/test/Analysis/CostModel/ARM/arith.ll index 8c81100..acd75d5 100644 --- a/llvm/test/Analysis/CostModel/ARM/arith.ll +++ b/llvm/test/Analysis/CostModel/ARM/arith.ll @@ -383,36 +383,36 @@ define void @vi8() { ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f2 = ashr <2 x i8> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %g2 = lshr <2 x i8> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %h2 = shl <2 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c4 = add <4 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d4 = sub <4 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e4 = mul <4 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f4 = ashr <4 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g4 = lshr <4 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h4 = shl <4 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = and <4 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j4 = or <4 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k4 = xor <4 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = add <8 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d8 = sub <8 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e8 = mul <8 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f8 = ashr <8 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g8 = lshr <8 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h8 = shl <8 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = and <8 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j8 = or <8 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k8 = xor <8 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c16 = add <16 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d16 = sub <16 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e16 = mul <16 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16 = ashr <16 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g16 = lshr <16 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h16 = shl <16 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = and <16 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j16 = or <16 x i8> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k16 = xor <16 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i2 = and <2 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j2 = or <2 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k2 = xor <2 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c4 = add <4 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d4 = sub <4 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e4 = mul <4 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f4 = ashr <4 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g4 = lshr <4 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h4 = shl <4 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i4 = and <4 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j4 = or <4 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k4 = xor <4 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c8 = add <8 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d8 = sub <8 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e8 = mul <8 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f8 = ashr <8 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g8 = lshr <8 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h8 = shl <8 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i8 = and <8 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j8 = or <8 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k8 = xor <8 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c16 = add <16 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d16 = sub <16 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e16 = mul <16 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f16 = ashr <16 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g16 = lshr <16 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h16 = shl <16 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i16 = and <16 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j16 = or <16 x i8> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k16 = xor <16 x i8> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; CHECK-MVE2-LABEL: 'vi8' @@ -461,36 +461,36 @@ define void @vi8() { ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f2 = ashr <2 x i8> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %g2 = lshr <2 x i8> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %h2 = shl <2 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i2 = and <2 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j2 = or <2 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k2 = xor <2 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c4 = add <4 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d4 = sub <4 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e4 = mul <4 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f4 = ashr <4 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g4 = lshr <4 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h4 = shl <4 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i4 = and <4 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j4 = or <4 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k4 = xor <4 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c8 = add <8 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d8 = sub <8 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e8 = mul <8 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f8 = ashr <8 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g8 = lshr <8 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h8 = shl <8 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i8 = and <8 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j8 = or <8 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k8 = xor <8 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c16 = add <16 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d16 = sub <16 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e16 = mul <16 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f16 = ashr <16 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g16 = lshr <16 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h16 = shl <16 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i16 = and <16 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j16 = or <16 x i8> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k16 = xor <16 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c4 = add <4 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d4 = sub <4 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e4 = mul <4 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f4 = ashr <4 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g4 = lshr <4 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h4 = shl <4 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = and <4 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j4 = or <4 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k4 = xor <4 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = add <8 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d8 = sub <8 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e8 = mul <8 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f8 = ashr <8 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g8 = lshr <8 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h8 = shl <8 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = and <8 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j8 = or <8 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k8 = xor <8 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c16 = add <16 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d16 = sub <16 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e16 = mul <16 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16 = ashr <16 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g16 = lshr <16 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h16 = shl <16 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = and <16 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j16 = or <16 x i8> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k16 = xor <16 x i8> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi8' @@ -696,36 +696,36 @@ define void @vi16() { ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f2 = ashr <2 x i16> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %g2 = lshr <2 x i16> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %h2 = shl <2 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c4 = add <4 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d4 = sub <4 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e4 = mul <4 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f4 = ashr <4 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g4 = lshr <4 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h4 = shl <4 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = and <4 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j4 = or <4 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k4 = xor <4 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = add <8 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d8 = sub <8 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e8 = mul <8 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f8 = ashr <8 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g8 = lshr <8 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h8 = shl <8 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = and <8 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j8 = or <8 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k8 = xor <8 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c16 = add <16 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d16 = sub <16 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e16 = mul <16 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f16 = ashr <16 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g16 = lshr <16 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h16 = shl <16 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i16 = and <16 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j16 = or <16 x i16> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k16 = xor <16 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i2 = and <2 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j2 = or <2 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k2 = xor <2 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c4 = add <4 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d4 = sub <4 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e4 = mul <4 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f4 = ashr <4 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g4 = lshr <4 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h4 = shl <4 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i4 = and <4 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j4 = or <4 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k4 = xor <4 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c8 = add <8 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d8 = sub <8 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e8 = mul <8 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f8 = ashr <8 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g8 = lshr <8 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h8 = shl <8 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i8 = and <8 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j8 = or <8 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k8 = xor <8 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %c16 = add <16 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %d16 = sub <16 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %e16 = mul <16 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %f16 = ashr <16 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %g16 = lshr <16 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %h16 = shl <16 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %i16 = and <16 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %j16 = or <16 x i16> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %k16 = xor <16 x i16> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; CHECK-MVE2-LABEL: 'vi16' @@ -774,36 +774,36 @@ define void @vi16() { ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f2 = ashr <2 x i16> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %g2 = lshr <2 x i16> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %h2 = shl <2 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i2 = and <2 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j2 = or <2 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k2 = xor <2 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c4 = add <4 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d4 = sub <4 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e4 = mul <4 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f4 = ashr <4 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g4 = lshr <4 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h4 = shl <4 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i4 = and <4 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j4 = or <4 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k4 = xor <4 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c8 = add <8 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d8 = sub <8 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e8 = mul <8 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f8 = ashr <8 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g8 = lshr <8 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h8 = shl <8 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i8 = and <8 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j8 = or <8 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k8 = xor <8 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %c16 = add <16 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %d16 = sub <16 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %e16 = mul <16 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %f16 = ashr <16 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %g16 = lshr <16 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %h16 = shl <16 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %i16 = and <16 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %j16 = or <16 x i16> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %k16 = xor <16 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c4 = add <4 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d4 = sub <4 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e4 = mul <4 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f4 = ashr <4 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g4 = lshr <4 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h4 = shl <4 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = and <4 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j4 = or <4 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k4 = xor <4 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = add <8 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d8 = sub <8 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e8 = mul <8 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f8 = ashr <8 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g8 = lshr <8 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h8 = shl <8 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = and <8 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j8 = or <8 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k8 = xor <8 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c16 = add <16 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d16 = sub <16 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e16 = mul <16 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f16 = ashr <16 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g16 = lshr <16 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h16 = shl <16 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i16 = and <16 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j16 = or <16 x i16> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k16 = xor <16 x i16> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi16' @@ -1009,36 +1009,36 @@ define void @vi32() { ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f2 = ashr <2 x i32> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %g2 = lshr <2 x i32> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %h2 = shl <2 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c4 = add <4 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d4 = sub <4 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e4 = mul <4 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f4 = ashr <4 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g4 = lshr <4 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h4 = shl <4 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = and <4 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j4 = or <4 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k4 = xor <4 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c8 = add <8 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d8 = sub <8 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e8 = mul <8 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f8 = ashr <8 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g8 = lshr <8 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h8 = shl <8 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i8 = and <8 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j8 = or <8 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k8 = xor <8 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c16 = add <16 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d16 = sub <16 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e16 = mul <16 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f16 = ashr <16 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g16 = lshr <16 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h16 = shl <16 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i16 = and <16 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j16 = or <16 x i32> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k16 = xor <16 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i2 = and <2 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j2 = or <2 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k2 = xor <2 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c4 = add <4 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d4 = sub <4 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e4 = mul <4 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f4 = ashr <4 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g4 = lshr <4 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h4 = shl <4 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i4 = and <4 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j4 = or <4 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k4 = xor <4 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %c8 = add <8 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %d8 = sub <8 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %e8 = mul <8 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %f8 = ashr <8 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %g8 = lshr <8 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %h8 = shl <8 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %i8 = and <8 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %j8 = or <8 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %k8 = xor <8 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %c16 = add <16 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %d16 = sub <16 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %e16 = mul <16 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %f16 = ashr <16 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %g16 = lshr <16 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %h16 = shl <16 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %i16 = and <16 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %j16 = or <16 x i32> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %k16 = xor <16 x i32> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; CHECK-MVE2-LABEL: 'vi32' @@ -1087,36 +1087,36 @@ define void @vi32() { ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %f2 = ashr <2 x i32> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %g2 = lshr <2 x i32> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %h2 = shl <2 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i2 = and <2 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j2 = or <2 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k2 = xor <2 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c4 = add <4 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d4 = sub <4 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e4 = mul <4 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f4 = ashr <4 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g4 = lshr <4 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h4 = shl <4 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i4 = and <4 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j4 = or <4 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k4 = xor <4 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %c8 = add <8 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %d8 = sub <8 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %e8 = mul <8 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %f8 = ashr <8 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %g8 = lshr <8 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %h8 = shl <8 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %i8 = and <8 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %j8 = or <8 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %k8 = xor <8 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %c16 = add <16 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %d16 = sub <16 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %e16 = mul <16 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %f16 = ashr <16 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %g16 = lshr <16 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %h16 = shl <16 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %i16 = and <16 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %j16 = or <16 x i32> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %k16 = xor <16 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c4 = add <4 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d4 = sub <4 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e4 = mul <4 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f4 = ashr <4 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g4 = lshr <4 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h4 = shl <4 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = and <4 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j4 = or <4 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k4 = xor <4 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c8 = add <8 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d8 = sub <8 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e8 = mul <8 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f8 = ashr <8 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g8 = lshr <8 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h8 = shl <8 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i8 = and <8 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j8 = or <8 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k8 = xor <8 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c16 = add <16 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d16 = sub <16 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e16 = mul <16 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f16 = ashr <16 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g16 = lshr <16 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h16 = shl <16 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i16 = and <16 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j16 = or <16 x i32> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k16 = xor <16 x i32> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi32' @@ -1322,36 +1322,36 @@ define void @vi64() { ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %f2 = ashr <2 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %g2 = lshr <2 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %h2 = shl <2 x i64> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i64> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i64> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i64> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i2 = and <2 x i64> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j2 = or <2 x i64> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k2 = xor <2 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %c4 = add <4 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %d4 = sub <4 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %e4 = mul <4 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %f4 = ashr <4 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %g4 = lshr <4 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %h4 = shl <4 x i64> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i4 = and <4 x i64> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j4 = or <4 x i64> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k4 = xor <4 x i64> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %i4 = and <4 x i64> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %j4 = or <4 x i64> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %k4 = xor <4 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %c8 = add <8 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %d8 = sub <8 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %e8 = mul <8 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f8 = ashr <8 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %g8 = lshr <8 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %h8 = shl <8 x i64> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i8 = and <8 x i64> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j8 = or <8 x i64> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k8 = xor <8 x i64> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %i8 = and <8 x i64> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %j8 = or <8 x i64> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %k8 = xor <8 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %c16 = add <16 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %d16 = sub <16 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e16 = mul <16 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %f16 = ashr <16 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %g16 = lshr <16 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %h16 = shl <16 x i64> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %i16 = and <16 x i64> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %j16 = or <16 x i64> undef, undef -; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %k16 = xor <16 x i64> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %i16 = and <16 x i64> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %j16 = or <16 x i64> undef, undef +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %k16 = xor <16 x i64> undef, undef ; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; CHECK-MVE2-LABEL: 'vi64' @@ -1400,36 +1400,36 @@ define void @vi64() { ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %f2 = ashr <2 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %g2 = lshr <2 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %h2 = shl <2 x i64> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i2 = and <2 x i64> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j2 = or <2 x i64> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k2 = xor <2 x i64> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i64> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i64> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %c4 = add <4 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %d4 = sub <4 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %e4 = mul <4 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %f4 = ashr <4 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %g4 = lshr <4 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %h4 = shl <4 x i64> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %i4 = and <4 x i64> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %j4 = or <4 x i64> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %k4 = xor <4 x i64> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i4 = and <4 x i64> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j4 = or <4 x i64> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k4 = xor <4 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %c8 = add <8 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %d8 = sub <8 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %e8 = mul <8 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %f8 = ashr <8 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %g8 = lshr <8 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %h8 = shl <8 x i64> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %i8 = and <8 x i64> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %j8 = or <8 x i64> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %k8 = xor <8 x i64> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i8 = and <8 x i64> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j8 = or <8 x i64> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k8 = xor <8 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %c16 = add <16 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %d16 = sub <16 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %e16 = mul <16 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %f16 = ashr <16 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %g16 = lshr <16 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %h16 = shl <16 x i64> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %i16 = and <16 x i64> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %j16 = or <16 x i64> undef, undef -; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %k16 = xor <16 x i64> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %i16 = and <16 x i64> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %j16 = or <16 x i64> undef, undef +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %k16 = xor <16 x i64> undef, undef ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi64' diff --git a/llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll b/llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll index c662419..3b66d1e 100644 --- a/llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll +++ b/llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -loop-vectorize -S -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp,mve1beat -dce -instcombine --simplifycfg -simplifycfg-require-and-preserve-domtree=1 -tail-predication=disabled < %s | FileCheck %s +; RUN: opt -loop-vectorize -S -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp,mve4beat -dce -instcombine --simplifycfg -simplifycfg-require-and-preserve-domtree=1 -tail-predication=disabled < %s | FileCheck %s target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "thumbv8.1m.main-none-none-eabi" -- 2.7.4