Index: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h =================================================================== --- llvm/include/llvm/Analysis/TargetTransformInfoImpl.h +++ llvm/include/llvm/Analysis/TargetTransformInfoImpl.h @@ -427,7 +427,13 @@ } unsigned getCFInstrCost(unsigned Opcode, - TTI::TargetCostKind CostKind) { return 1; } + TTI::TargetCostKind CostKind) { + // A phi would be free, unless we're costing the throughput because it + // will require a register. + if (Opcode == Instruction::PHI && CostKind != TTI::TCK_RecipThroughput) + return 0; + return 1; + } unsigned getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, TTI::TargetCostKind CostKind, Index: llvm/include/llvm/CodeGen/BasicTTIImpl.h =================================================================== --- llvm/include/llvm/CodeGen/BasicTTIImpl.h +++ llvm/include/llvm/CodeGen/BasicTTIImpl.h @@ -845,8 +845,7 @@ } unsigned getCFInstrCost(unsigned Opcode, TTI::TargetCostKind CostKind) { - // Branches are assumed to be predicted. - return 0; + return BaseT::getCFInstrCost(Opcode, CostKind); } unsigned getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, Index: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp =================================================================== --- llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp +++ llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp @@ -615,6 +615,9 @@ unsigned GCNTTIImpl::getCFInstrCost(unsigned Opcode, TTI::TargetCostKind CostKind) { + if (CostKind == TTI::TCK_CodeSize || CostKind == TTI::TCK_SizeAndLatency) + return Opcode == Instruction::PHI ? 0 : 1; + // XXX - For some reason this isn't called for switch. switch (Opcode) { case Instruction::Br: @@ -1136,6 +1139,9 @@ unsigned R600TTIImpl::getCFInstrCost(unsigned Opcode, TTI::TargetCostKind CostKind) { + if (CostKind == TTI::TCK_CodeSize || CostKind == TTI::TCK_SizeAndLatency) + return Opcode == Instruction::PHI ? 0 : 1; + // XXX - For some reason this isn't called for switch. switch (Opcode) { case Instruction::Br: Index: llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h =================================================================== --- llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h +++ llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h @@ -103,6 +103,7 @@ int getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src, TTI::TargetCostKind CostKind, const Instruction *I = nullptr); + int getCFInstrCost(unsigned Opcode, TTI::TargetCostKind CostKind); int getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, TTI::TargetCostKind CostKind, const Instruction *I = nullptr); Index: llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp =================================================================== --- llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp +++ llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp @@ -754,6 +754,13 @@ nullptr); } +int PPCTTIImpl::getCFInstrCost(unsigned Opcode, TTI::TargetCostKind CostKind) { + if (CostKind == TTI::TCK_CodeSize || CostKind == TTI::TCK_SizeAndLatency) + return Opcode == Instruction::PHI ? 0 : 1; + + return 0; +} + int PPCTTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src, TTI::TargetCostKind CostKind, const Instruction *I) { Index: llvm/lib/Target/X86/X86TargetTransformInfo.h =================================================================== --- llvm/lib/Target/X86/X86TargetTransformInfo.h +++ llvm/lib/Target/X86/X86TargetTransformInfo.h @@ -201,6 +201,8 @@ unsigned getUserCost(const User *U, ArrayRef Operands, TTI::TargetCostKind); + unsigned getCFInstrCost(unsigned Opcode, TTI::TargetCostKind CostKind); + int getIntImmCostInst(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind); int getIntImmCostIntrin(Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Index: llvm/lib/Target/X86/X86TargetTransformInfo.cpp =================================================================== --- llvm/lib/Target/X86/X86TargetTransformInfo.cpp +++ llvm/lib/Target/X86/X86TargetTransformInfo.cpp @@ -3795,6 +3795,14 @@ return X86TTIImpl::getIntImmCost(Imm, Ty, CostKind); } +unsigned +X86TTIImpl::getCFInstrCost(unsigned Opcode, TTI::TargetCostKind CostKind) { + if (CostKind == TTI::TCK_CodeSize || CostKind == TTI::TCK_SizeAndLatency) + return Opcode == Instruction::PHI ? 0 : 1; + // Branches are assumed to be predicted. + return 0; +} + unsigned X86TTIImpl::getUserCost(const User *U, ArrayRef Operands, TTI::TargetCostKind CostKind) { Index: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp =================================================================== --- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -5710,7 +5710,8 @@ ScalarCost += TTI.getScalarizationOverhead( cast(ToVectorTy(I->getType(), VF)), APInt::getAllOnesValue(VF), true, false); - ScalarCost += VF * TTI.getCFInstrCost(Instruction::PHI); + ScalarCost += VF * TTI.getCFInstrCost(Instruction::PHI, + TTI::TCK_RecipThroughput); } // Compute the scalarization overhead of needed extractelement @@ -6231,10 +6232,10 @@ VectorType::get(IntegerType::getInt1Ty(RetTy->getContext()), VF); return (TTI.getScalarizationOverhead(Vec_i1Ty, APInt::getAllOnesValue(VF), false, true) + - (TTI.getCFInstrCost(Instruction::Br) * VF)); + (TTI.getCFInstrCost(Instruction::Br, CostKind) * VF)); } else if (I->getParent() == TheLoop->getLoopLatch() || VF == 1) // The back-edge branch will remain, as will all scalar branches. - return TTI.getCFInstrCost(Instruction::Br); + return TTI.getCFInstrCost(Instruction::Br, CostKind); else // This branch will be eliminated by if-conversion. return 0; @@ -6262,7 +6263,7 @@ ToVectorTy(Type::getInt1Ty(Phi->getContext()), VF), CostKind); - return TTI.getCFInstrCost(Instruction::PHI); + return TTI.getCFInstrCost(Instruction::PHI, CostKind); } case Instruction::UDiv: case Instruction::SDiv: @@ -6279,7 +6280,7 @@ // that we will create. This cost is likely to be zero. The phi node // cost, if any, should be scaled by the block probability because it // models a copy at the end of each predicated block. - Cost += VF * TTI.getCFInstrCost(Instruction::PHI); + Cost += VF * TTI.getCFInstrCost(Instruction::PHI, CostKind); // The cost of the non-predicated instruction. Cost += VF * TTI.getArithmeticInstrCost(I->getOpcode(), RetTy, CostKind); Index: llvm/test/Analysis/CostModel/AArch64/aggregates.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/aggregates.ll +++ llvm/test/Analysis/CostModel/AArch64/aggregates.ll @@ -4,119 +4,63 @@ ; RUN: opt < %s -mtriple=aarch64-unknown-linux-gnu -cost-model -cost-kind=code-size -analyze | FileCheck %s --check-prefixes=ALL,CODESIZE define i32 @extract_first_i32({i32, i32} %agg) { -; THROUGHPUT-LABEL: 'extract_first_i32' -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0 -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r -; -; LATENCY-LABEL: 'extract_first_i32' -; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0 -; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r -; -; CODESIZE-LABEL: 'extract_first_i32' -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0 -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r +; ALL-LABEL: 'extract_first_i32' +; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 0 +; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r ; %r = extractvalue {i32, i32} %agg, 0 ret i32 %r } define i32 @extract_second_i32({i32, i32} %agg) { -; THROUGHPUT-LABEL: 'extract_second_i32' -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 1 -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r -; -; LATENCY-LABEL: 'extract_second_i32' -; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 1 -; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r -; -; CODESIZE-LABEL: 'extract_second_i32' -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 1 -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r +; ALL-LABEL: 'extract_second_i32' +; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i32 } %agg, 1 +; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r ; %r = extractvalue {i32, i32} %agg, 1 ret i32 %r } define i32 @extract_i32({i32, i1} %agg) { -; THROUGHPUT-LABEL: 'extract_i32' -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 0 -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r -; -; LATENCY-LABEL: 'extract_i32' -; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 0 -; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r -; -; CODESIZE-LABEL: 'extract_i32' -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 0 -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r +; ALL-LABEL: 'extract_i32' +; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 0 +; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r ; %r = extractvalue {i32, i1} %agg, 0 ret i32 %r } define i1 @extract_i1({i32, i1} %agg) { -; THROUGHPUT-LABEL: 'extract_i1' -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 1 -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i1 %r -; -; LATENCY-LABEL: 'extract_i1' -; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 1 -; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i1 %r -; -; CODESIZE-LABEL: 'extract_i1' -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 1 -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i1 %r +; ALL-LABEL: 'extract_i1' +; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, i1 } %agg, 1 +; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i1 %r ; %r = extractvalue {i32, i1} %agg, 1 ret i1 %r } define float @extract_float({i32, float} %agg) { -; THROUGHPUT-LABEL: 'extract_float' -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, float } %agg, 1 -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret float %r -; -; LATENCY-LABEL: 'extract_float' -; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, float } %agg, 1 -; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %r -; -; CODESIZE-LABEL: 'extract_float' -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, float } %agg, 1 -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %r +; ALL-LABEL: 'extract_float' +; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, float } %agg, 1 +; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %r ; %r = extractvalue {i32, float} %agg, 1 ret float %r } define [42 x i42] @extract_array({i32, [42 x i42]} %agg) { -; THROUGHPUT-LABEL: 'extract_array' -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1 -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret [42 x i42] %r -; -; LATENCY-LABEL: 'extract_array' -; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1 -; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret [42 x i42] %r -; -; CODESIZE-LABEL: 'extract_array' -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1 -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret [42 x i42] %r +; ALL-LABEL: 'extract_array' +; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, [42 x i42] } %agg, 1 +; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret [42 x i42] %r ; %r = extractvalue {i32, [42 x i42]} %agg, 1 ret [42 x i42] %r } define <42 x i42> @extract_vector({i32, <42 x i42>} %agg) { -; THROUGHPUT-LABEL: 'extract_vector' -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1 -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <42 x i42> %r -; -; LATENCY-LABEL: 'extract_vector' -; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1 -; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <42 x i42> %r -; -; CODESIZE-LABEL: 'extract_vector' -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1 -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <42 x i42> %r +; ALL-LABEL: 'extract_vector' +; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, <42 x i42> } %agg, 1 +; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <42 x i42> %r ; %r = extractvalue {i32, <42 x i42>} %agg, 1 ret <42 x i42> %r @@ -125,17 +69,9 @@ %T1 = type { i32, float, <4 x i1> } define %T1 @extract_struct({i32, %T1} %agg) { -; THROUGHPUT-LABEL: 'extract_struct' -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, %T1 } %agg, 1 -; THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret %T1 %r -; -; LATENCY-LABEL: 'extract_struct' -; LATENCY-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, %T1 } %agg, 1 -; LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret %T1 %r -; -; CODESIZE-LABEL: 'extract_struct' -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, %T1 } %agg, 1 -; CODESIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret %T1 %r +; ALL-LABEL: 'extract_struct' +; ALL-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r = extractvalue { i32, %T1 } %agg, 1 +; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret %T1 %r ; %r = extractvalue {i32, %T1} %agg, 1 ret %T1 %r Index: llvm/test/Analysis/CostModel/AArch64/cast.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/cast.ll +++ llvm/test/Analysis/CostModel/AArch64/cast.ll @@ -267,7 +267,7 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %r247 = sitofp <16 x i16> undef to <16 x double> ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %r248 = uitofp <16 x i64> undef to <16 x double> ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %r249 = sitofp <16 x i64> undef to <16 x double> -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %r0 = sext i1 undef to i8 %r1 = zext i1 undef to i8 @@ -609,7 +609,7 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %r23, i16* undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %r24, i32* undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 %r25, i64* undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %r12 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %r12 ; %r0 = sext i8 %a to i16 %r1 = sext i8 %a to i32 @@ -683,7 +683,7 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = bitcast double undef to i64 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g = bitcast half undef to i16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h = bitcast i16 undef to half -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %a = bitcast i32 undef to i32 %b = bitcast float undef to float @@ -731,7 +731,7 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = zext <2 x i16> %loadv2i16 to <2 x i64> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v10 = sext <2 x i32> %loadv2i32 to <2 x i64> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = zext <2 x i32> %loadv2i32 to <2 x i64> -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %loadi8 = load i8, i8* undef %loadi16 = load i16, i16* undef @@ -786,7 +786,7 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 %r4, i16* undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %r5 = trunc i16 undef to i8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 %r5, i8* undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %r0 = trunc i64 undef to i8 store i8 %r0, i8* undef Index: llvm/test/Analysis/CostModel/AArch64/shuffle-broadcast.ll =================================================================== --- llvm/test/Analysis/CostModel/AArch64/shuffle-broadcast.ll +++ llvm/test/Analysis/CostModel/AArch64/shuffle-broadcast.ll @@ -14,7 +14,7 @@ ; 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-NEXT: Cost Model: Found an estimated cost of 1 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 Index: llvm/test/Analysis/CostModel/ARM/arith.ll =================================================================== --- llvm/test/Analysis/CostModel/ARM/arith.ll +++ llvm/test/Analysis/CostModel/ARM/arith.ll @@ -17,7 +17,7 @@ ; 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 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'i8' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i8 undef, undef @@ -29,7 +29,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i8 undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i8 undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i8 undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'i8' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i8 undef, undef @@ -41,7 +41,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i8 undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i8 undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i8 undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'i8' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i8 undef, undef @@ -53,7 +53,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i8 undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i8 undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i8 undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c = add i8 undef, undef %d = sub i8 undef, undef @@ -78,7 +78,7 @@ ; 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 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'i16' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i16 undef, undef @@ -90,7 +90,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i16 undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i16 undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i16 undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'i16' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i16 undef, undef @@ -102,7 +102,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i16 undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i16 undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i16 undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'i16' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i16 undef, undef @@ -114,7 +114,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i16 undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i16 undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i16 undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c = add i16 undef, undef %d = sub i16 undef, undef @@ -139,7 +139,7 @@ ; 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 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'i32' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i32 undef, undef @@ -151,7 +151,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i32 undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i32 undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i32 undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'i32' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i32 undef, undef @@ -163,7 +163,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i32 undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i32 undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i32 undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'i32' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i32 undef, undef @@ -175,7 +175,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i32 undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i32 undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i32 undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c = add i32 undef, undef %d = sub i32 undef, undef @@ -200,7 +200,7 @@ ; 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 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'i64' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = add i64 undef, undef @@ -212,7 +212,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i = and i64 undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j = or i64 undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k = xor i64 undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'i64' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = add i64 undef, undef @@ -224,7 +224,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i = and i64 undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j = or i64 undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k = xor i64 undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'i64' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = add i64 undef, undef @@ -236,7 +236,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i = and i64 undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j = or i64 undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k = xor i64 undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c = add i64 undef, undef %d = sub i64 undef, undef @@ -289,7 +289,7 @@ ; 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 0 for instruction: ret void +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE2-LABEL: 'vi8' ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %c2 = add <2 x i8> undef, undef @@ -328,7 +328,7 @@ ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i16 = and <16 x i8> undef, undef ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j16 = or <16 x i8> undef, undef ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k16 = xor <16 x i8> undef, undef -; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE4-LABEL: 'vi8' ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %c2 = add <2 x i8> undef, undef @@ -367,7 +367,7 @@ ; 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 0 for instruction: ret void +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi8' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c2 = add <2 x i8> undef, undef @@ -406,7 +406,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %i16 = and <16 x i8> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %j16 = or <16 x i8> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %k16 = xor <16 x i8> undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vi8' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c2 = add <2 x i8> undef, undef @@ -445,7 +445,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %i16 = and <16 x i8> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %j16 = or <16 x i8> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %k16 = xor <16 x i8> undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vi8' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c2 = add <2 x i8> undef, undef @@ -484,7 +484,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = and <16 x i8> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j16 = or <16 x i8> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k16 = xor <16 x i8> undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c2 = add <2 x i8> undef, undef %d2 = sub <2 x i8> undef, undef @@ -563,7 +563,7 @@ ; 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 0 for instruction: ret void +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE2-LABEL: 'vi16' ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %c2 = add <2 x i16> undef, undef @@ -602,7 +602,7 @@ ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i16 = and <16 x i16> undef, undef ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j16 = or <16 x i16> undef, undef ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k16 = xor <16 x i16> undef, undef -; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE4-LABEL: 'vi16' ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %c2 = add <2 x i16> undef, undef @@ -641,7 +641,7 @@ ; 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 0 for instruction: ret void +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi16' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c2 = add <2 x i16> undef, undef @@ -680,7 +680,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %i16 = and <16 x i16> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %j16 = or <16 x i16> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %k16 = xor <16 x i16> undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vi16' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c2 = add <2 x i16> undef, undef @@ -719,7 +719,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %i16 = and <16 x i16> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %j16 = or <16 x i16> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %k16 = xor <16 x i16> undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vi16' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c2 = add <2 x i16> undef, undef @@ -758,7 +758,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i16 = and <16 x i16> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j16 = or <16 x i16> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k16 = xor <16 x i16> undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c2 = add <2 x i16> undef, undef %d2 = sub <2 x i16> undef, undef @@ -837,7 +837,7 @@ ; 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 0 for instruction: ret void +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE2-LABEL: 'vi32' ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %c2 = add <2 x i32> undef, undef @@ -876,7 +876,7 @@ ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %i16 = and <16 x i32> undef, undef ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %j16 = or <16 x i32> undef, undef ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %k16 = xor <16 x i32> undef, undef -; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE4-LABEL: 'vi32' ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %c2 = add <2 x i32> undef, undef @@ -915,7 +915,7 @@ ; 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 0 for instruction: ret void +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi32' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c2 = add <2 x i32> undef, undef @@ -954,7 +954,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %i16 = and <16 x i32> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %j16 = or <16 x i32> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %k16 = xor <16 x i32> undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vi32' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c2 = add <2 x i32> undef, undef @@ -993,7 +993,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %i16 = and <16 x i32> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %j16 = or <16 x i32> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %k16 = xor <16 x i32> undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vi32' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c2 = add <2 x i32> undef, undef @@ -1032,7 +1032,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i16 = and <16 x i32> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j16 = or <16 x i32> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k16 = xor <16 x i32> undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c2 = add <2 x i32> undef, undef %d2 = sub <2 x i32> undef, undef @@ -1111,7 +1111,7 @@ ; 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 0 for instruction: ret void +; CHECK-MVE1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE2-LABEL: 'vi64' ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %c2 = add <2 x i64> undef, undef @@ -1150,7 +1150,7 @@ ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %i16 = and <16 x i64> undef, undef ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %j16 = or <16 x i64> undef, undef ; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %k16 = xor <16 x i64> undef, undef -; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE4-LABEL: 'vi64' ; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %c2 = add <2 x i64> undef, undef @@ -1189,7 +1189,7 @@ ; 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 0 for instruction: ret void +; CHECK-MVE4-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi64' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c2 = add <2 x i64> undef, undef @@ -1228,7 +1228,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %i16 = and <16 x i64> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %j16 = or <16 x i64> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %k16 = xor <16 x i64> undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vi64' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c2 = add <2 x i64> undef, undef @@ -1267,7 +1267,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %i16 = and <16 x i64> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %j16 = or <16 x i64> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %k16 = xor <16 x i64> undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vi64' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c2 = add <2 x i64> undef, undef @@ -1306,7 +1306,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %i16 = and <16 x i64> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %j16 = or <16 x i64> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %k16 = xor <16 x i64> undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c2 = add <2 x i64> undef, undef %d2 = sub <2 x i64> undef, undef Index: llvm/test/Analysis/CostModel/ARM/cast.ll =================================================================== --- llvm/test/Analysis/CostModel/ARM/cast.ll +++ llvm/test/Analysis/CostModel/ARM/cast.ll @@ -271,7 +271,7 @@ ; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %r247 = sitofp <16 x i16> undef to <16 x double> ; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %r248 = uitofp <16 x i64> undef to <16 x double> ; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 192 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 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 @@ -538,7 +538,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1044 for instruction: %r247 = sitofp <16 x i16> undef to <16 x double> ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: %r248 = uitofp <16 x i64> undef to <16 x double> ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1024 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 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; CHECK-V8M-MAIN-LABEL: 'casts' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r0 = sext i1 undef to i8 @@ -805,7 +805,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %r247 = sitofp <16 x i16> undef to <16 x double> ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %r248 = uitofp <16 x i64> undef to <16 x double> ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %r249 = sitofp <16 x i64> undef to <16 x double> -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; CHECK-V8M-BASE-LABEL: 'casts' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r0 = sext i1 undef to i8 @@ -1072,7 +1072,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %r247 = sitofp <16 x i16> undef to <16 x double> ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %r248 = uitofp <16 x i64> undef to <16 x double> ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %r249 = sitofp <16 x i64> undef to <16 x double> -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; CHECK-V8R-LABEL: 'casts' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r0 = sext i1 undef to i8 @@ -1339,7 +1339,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %r247 = sitofp <16 x i16> undef to <16 x double> ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %r248 = uitofp <16 x i64> undef to <16 x double> ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %r249 = sitofp <16 x i64> undef to <16 x double> -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; -- scalars -- %r0 = sext i1 undef to i8 @@ -1678,7 +1678,7 @@ ; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 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 @@ -1714,7 +1714,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v9 = zext <2 x i16> %loadv2i16 to <2 x i64> ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v10 = sext <2 x i32> %loadv2i32 to <2 x i64> ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 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 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; CHECK-V8M-MAIN-LABEL: 'load_extends' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi8 = load i8, i8* undef @@ -1750,7 +1750,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v9 = zext <2 x i16> %loadv2i16 to <2 x i64> ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v10 = sext <2 x i32> %loadv2i32 to <2 x i64> ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v11 = zext <2 x i32> %loadv2i32 to <2 x i64> -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; CHECK-V8M-BASE-LABEL: 'load_extends' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi8 = load i8, i8* undef @@ -1786,7 +1786,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v9 = zext <2 x i16> %loadv2i16 to <2 x i64> ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v10 = sext <2 x i32> %loadv2i32 to <2 x i64> ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v11 = zext <2 x i32> %loadv2i32 to <2 x i64> -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; CHECK-V8R-LABEL: 'load_extends' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %loadi8 = load i8, i8* undef @@ -1822,7 +1822,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v9 = zext <2 x i16> %loadv2i16 to <2 x i64> ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v10 = sext <2 x i32> %loadv2i32 to <2 x i64> ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = zext <2 x i32> %loadv2i32 to <2 x i64> -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %loadi8 = load i8, i8* undef @@ -1874,7 +1874,7 @@ ; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = bitcast double undef to i64 ; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g = bitcast half undef to i16 ; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h = bitcast i16 undef to half -; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; CHECK-MVE-LABEL: 'bitcasts' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a = bitcast i32 undef to i32 @@ -1885,7 +1885,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = bitcast double undef to i64 ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g = bitcast half undef to i16 ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h = bitcast i16 undef to half -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; CHECK-V8M-MAIN-LABEL: 'bitcasts' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a = bitcast i32 undef to i32 @@ -1896,7 +1896,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f = bitcast double undef to i64 ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g = bitcast half undef to i16 ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h = bitcast i16 undef to half -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; CHECK-V8M-BASE-LABEL: 'bitcasts' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a = bitcast i32 undef to i32 @@ -1907,7 +1907,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f = bitcast double undef to i64 ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g = bitcast half undef to i16 ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h = bitcast i16 undef to half -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; CHECK-V8R-LABEL: 'bitcasts' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a = bitcast i32 undef to i32 @@ -1918,7 +1918,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = bitcast double undef to i64 ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g = bitcast half undef to i16 ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h = bitcast i16 undef to half -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %a = bitcast i32 undef to i32 %b = bitcast float undef to float Index: llvm/test/Analysis/CostModel/ARM/control-flow.ll =================================================================== --- llvm/test/Analysis/CostModel/ARM/control-flow.ll +++ llvm/test/Analysis/CostModel/ARM/control-flow.ll @@ -66,36 +66,36 @@ ; ; CHECK-T1-THROUGHPUT-LABEL: 'simple_loop_cost' ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res ; ; CHECK-V8M-THROUGHPUT-LABEL: 'simple_loop_cost' ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res ; ; CHECK-V8_1M-THROUGHPUT-LABEL: 'simple_loop_cost' ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res ; entry: %zero = icmp eq i32 %N, 0 @@ -198,9 +198,9 @@ ; ; CHECK-T1-THROUGHPUT-LABEL: 'simple_mul_loop' ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i32, i32* %addr.a ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load @@ -208,15 +208,15 @@ ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res ; ; CHECK-V8M-THROUGHPUT-LABEL: 'simple_mul_loop' ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i32, i32* %addr.a ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load @@ -224,15 +224,15 @@ ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res ; ; CHECK-V8_1M-THROUGHPUT-LABEL: 'simple_mul_loop' ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = getelementptr i32, i32* %A, i32 %iv ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i32, i32* %addr.a ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %load, %load @@ -240,9 +240,9 @@ ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 %mul, i32* %addr.b ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv.next = add nuw i32 %iv, 1 ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res ; entry: %zero = icmp eq i32 %N, 0 @@ -365,11 +365,11 @@ ; ; CHECK-T1-THROUGHPUT-LABEL: 'simple_mul_ext_lsr_loop' ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i16, i16* %addr.a ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 @@ -378,17 +378,17 @@ ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res ; ; CHECK-V8M-THROUGHPUT-LABEL: 'simple_mul_ext_lsr_loop' ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i16, i16* %addr.a ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 @@ -397,17 +397,17 @@ ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 ; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] -; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] +; CHECK-V8M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res ; ; CHECK-V8_1M-THROUGHPUT-LABEL: 'simple_mul_ext_lsr_loop' ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %zero = icmp eq i32 %N, 0 -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %zero, label %exit, label %preheader -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br label %loop -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %zero, label %exit, label %preheader +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %loop +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ] +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.a = phi i16* [ %A, %preheader ], [ %addr.a, %loop ] +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %addr.b = phi i32* [ %B, %preheader ], [ %addr.b, %loop ] ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %load = load i16, i16* %addr.a ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %sext = sext i16 %load to i32 ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %mul = mul i32 %sext, 7 @@ -416,9 +416,9 @@ ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.a.next = getelementptr i16, i16* %addr.a, i32 1 ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %addr.b.next = getelementptr i32, i32* %addr.b, i32 1 ; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp ne i32 %iv.next, %N -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: br i1 %cmp, label %loop, label %exit -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] -; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br i1 %cmp, label %loop, label %exit +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %res = phi i32 [ 0, %entry ], [ %iv.next, %loop ] +; CHECK-V8_1M-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %res ; entry: %zero = icmp eq i32 %N, 0 Index: llvm/test/Analysis/CostModel/ARM/divrem.ll =================================================================== --- llvm/test/Analysis/CostModel/ARM/divrem.ll +++ llvm/test/Analysis/CostModel/ARM/divrem.ll @@ -15,7 +15,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'i8' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = sdiv i8 undef, undef @@ -26,7 +26,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 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 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'i8' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = sdiv i8 undef, undef @@ -37,7 +37,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = udiv i8 undef, 2 ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i8 undef, 2 ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i8 undef, 2 -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'i8' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = sdiv i8 undef, undef @@ -48,7 +48,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = udiv i8 undef, 2 ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i8 undef, 2 ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i8 undef, 2 -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'i8' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = sdiv i8 undef, undef @@ -59,7 +59,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = udiv i8 undef, 2 ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i8 undef, 2 ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i8 undef, 2 -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %1 = sdiv i8 undef, undef %2 = udiv i8 undef, undef @@ -82,7 +82,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'i16' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = sdiv i16 undef, undef @@ -93,7 +93,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 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 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'i16' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = sdiv i16 undef, undef @@ -104,7 +104,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = udiv i16 undef, 2 ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i16 undef, 2 ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i16 undef, 2 -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'i16' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = sdiv i16 undef, undef @@ -115,7 +115,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = udiv i16 undef, 2 ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i16 undef, 2 ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i16 undef, 2 -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'i16' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = sdiv i16 undef, undef @@ -126,7 +126,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = udiv i16 undef, 2 ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i16 undef, 2 ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i16 undef, 2 -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %1 = sdiv i16 undef, undef %2 = udiv i16 undef, undef @@ -149,7 +149,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'i32' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = sdiv i32 undef, undef @@ -160,7 +160,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 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 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'i32' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = sdiv i32 undef, undef @@ -171,7 +171,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = udiv i32 undef, 2 ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i32 undef, 2 ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i32 undef, 2 -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'i32' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = sdiv i32 undef, undef @@ -182,7 +182,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = udiv i32 undef, 2 ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i32 undef, 2 ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i32 undef, 2 -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'i32' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = sdiv i32 undef, undef @@ -193,7 +193,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = udiv i32 undef, 2 ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i32 undef, 2 ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i32 undef, 2 -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %1 = sdiv i32 undef, undef %2 = udiv i32 undef, undef @@ -216,7 +216,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'i64' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = sdiv i64 undef, undef @@ -227,7 +227,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 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 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'i64' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = sdiv i64 undef, undef @@ -238,7 +238,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = udiv i64 undef, 2 ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i64 undef, 2 ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i64 undef, 2 -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'i64' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = sdiv i64 undef, undef @@ -249,7 +249,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = udiv i64 undef, 2 ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i64 undef, 2 ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i64 undef, 2 -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'i64' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = sdiv i64 undef, undef @@ -260,7 +260,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = udiv i64 undef, 2 ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = srem i64 undef, 2 ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = urem i64 undef, 2 -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %1 = sdiv i64 undef, undef %2 = udiv i64 undef, undef @@ -279,35 +279,35 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'f16' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = fdiv half undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = frem half undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = fdiv half undef, 0xH4000 ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = frem half undef, 0xH4000 -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'f16' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = fdiv half undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = frem half undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = fdiv half undef, 0xH4000 ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = frem half undef, 0xH4000 -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'f16' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = fdiv half undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = frem half undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = fdiv half undef, 0xH4000 ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = frem half undef, 0xH4000 -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'f16' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv half undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = frem half undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = fdiv half undef, 0xH4000 ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = frem half undef, 0xH4000 -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %1 = fdiv half undef, undef %2 = frem half undef, undef @@ -322,35 +322,35 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'f32' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = fdiv float undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = frem float undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = fdiv float undef, 2.000000e+00 ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = frem float undef, 2.000000e+00 -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'f32' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = fdiv float undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = frem float undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = fdiv float undef, 2.000000e+00 ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = frem float undef, 2.000000e+00 -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'f32' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = fdiv float undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = frem float undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = fdiv float undef, 2.000000e+00 ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = frem float undef, 2.000000e+00 -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'f32' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv float undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = frem float undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = fdiv float undef, 2.000000e+00 ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = frem float undef, 2.000000e+00 -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %1 = fdiv float undef, undef %2 = frem float undef, undef @@ -365,35 +365,35 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'f64' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = fdiv double undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = frem double undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = fdiv double undef, 2.000000e+00 ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = frem double undef, 2.000000e+00 -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'f64' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv double undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = frem double undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = fdiv double undef, 2.000000e+00 ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = frem double undef, 2.000000e+00 -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'f64' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv double undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = frem double undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = fdiv double undef, 2.000000e+00 ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = frem double undef, 2.000000e+00 -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'f64' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv double undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = frem double undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = fdiv double undef, 2.000000e+00 ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = frem double undef, 2.000000e+00 -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %1 = fdiv double undef, undef %2 = frem double undef, undef @@ -420,7 +420,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vi8' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %t1 = sdiv <2 x i8> undef, undef @@ -439,7 +439,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s2 = udiv <16 x i8> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s3 = srem <16 x i8> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s4 = urem <16 x i8> undef, undef -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi8' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %t1 = sdiv <2 x i8> undef, undef @@ -458,7 +458,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %s2 = udiv <16 x i8> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s3 = srem <16 x i8> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s4 = urem <16 x i8> undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vi8' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %t1 = sdiv <2 x i8> undef, undef @@ -477,7 +477,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %s2 = udiv <16 x i8> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s3 = srem <16 x i8> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s4 = urem <16 x i8> undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vi8' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i8> undef, undef @@ -496,7 +496,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i8> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i8> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i8> undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %t1 = sdiv <2 x i8> undef, undef %t2 = udiv <2 x i8> undef, undef @@ -535,7 +535,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vi16' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %t1 = sdiv <2 x i16> undef, undef @@ -554,7 +554,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s2 = udiv <16 x i16> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s3 = srem <16 x i16> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s4 = urem <16 x i16> undef, undef -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi16' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %t1 = sdiv <2 x i16> undef, undef @@ -573,7 +573,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %s2 = udiv <16 x i16> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s3 = srem <16 x i16> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s4 = urem <16 x i16> undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vi16' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %t1 = sdiv <2 x i16> undef, undef @@ -592,7 +592,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %s2 = udiv <16 x i16> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s3 = srem <16 x i16> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s4 = urem <16 x i16> undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vi16' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i16> undef, undef @@ -611,7 +611,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i16> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i16> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i16> undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %t1 = sdiv <2 x i16> undef, undef %t2 = udiv <2 x i16> undef, undef @@ -650,7 +650,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vi32' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %t1 = sdiv <2 x i32> undef, undef @@ -669,7 +669,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s2 = udiv <16 x i32> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s3 = srem <16 x i32> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s4 = urem <16 x i32> undef, undef -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi32' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %t1 = sdiv <2 x i32> undef, undef @@ -688,7 +688,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %s2 = udiv <16 x i32> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s3 = srem <16 x i32> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s4 = urem <16 x i32> undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vi32' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %t1 = sdiv <2 x i32> undef, undef @@ -707,7 +707,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %s2 = udiv <16 x i32> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s3 = srem <16 x i32> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s4 = urem <16 x i32> undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vi32' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i32> undef, undef @@ -726,7 +726,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i32> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i32> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i32> undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %t1 = sdiv <2 x i32> undef, undef %t2 = udiv <2 x i32> undef, undef @@ -765,7 +765,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vi64' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %t1 = sdiv <2 x i64> undef, undef @@ -784,7 +784,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 288 for instruction: %s2 = udiv <16 x i64> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s3 = srem <16 x i64> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s4 = urem <16 x i64> undef, undef -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi64' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %t1 = sdiv <2 x i64> undef, undef @@ -803,7 +803,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s2 = udiv <16 x i64> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %s3 = srem <16 x i64> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %s4 = urem <16 x i64> undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vi64' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %t1 = sdiv <2 x i64> undef, undef @@ -822,7 +822,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s2 = udiv <16 x i64> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %s3 = srem <16 x i64> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %s4 = urem <16 x i64> undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vi64' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i64> undef, undef @@ -841,7 +841,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i64> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i64> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i64> undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %t1 = sdiv <2 x i64> undef, undef %t2 = udiv <2 x i64> undef, undef @@ -870,7 +870,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vf16' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = fdiv <2 x half> undef, undef @@ -879,7 +879,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %4 = fdiv <4 x half> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %5 = fdiv <8 x half> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %6 = fdiv <8 x half> undef, undef -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vf16' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv <2 x half> undef, undef @@ -888,7 +888,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = fdiv <4 x half> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %5 = fdiv <8 x half> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %6 = fdiv <8 x half> undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vf16' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv <2 x half> undef, undef @@ -897,7 +897,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = fdiv <4 x half> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %5 = fdiv <8 x half> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %6 = fdiv <8 x half> undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vf16' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = fdiv <2 x half> undef, undef @@ -906,7 +906,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %4 = fdiv <4 x half> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %5 = fdiv <8 x half> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %6 = fdiv <8 x half> undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %1 = fdiv <2 x half> undef, undef %2 = fdiv <2 x half> undef, undef @@ -925,7 +925,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vf32' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = fdiv <2 x float> undef, undef @@ -934,7 +934,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %4 = fdiv <4 x float> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %5 = fdiv <8 x float> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %6 = fdiv <8 x float> undef, undef -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vf32' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv <2 x float> undef, undef @@ -943,7 +943,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = fdiv <4 x float> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %5 = fdiv <8 x float> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %6 = fdiv <8 x float> undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vf32' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv <2 x float> undef, undef @@ -952,7 +952,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = fdiv <4 x float> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %5 = fdiv <8 x float> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %6 = fdiv <8 x float> undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vf32' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %1 = fdiv <2 x float> undef, undef @@ -961,7 +961,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %4 = fdiv <4 x float> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %5 = fdiv <8 x float> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %6 = fdiv <8 x float> undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %1 = fdiv <2 x float> undef, undef %2 = fdiv <2 x float> undef, undef @@ -980,7 +980,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vf64' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = fdiv <2 x double> undef, undef @@ -989,7 +989,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %4 = fdiv <4 x double> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %5 = fdiv <8 x double> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %6 = fdiv <8 x double> undef, undef -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vf64' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = fdiv <2 x double> undef, undef @@ -998,7 +998,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %4 = fdiv <4 x double> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %5 = fdiv <8 x double> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %6 = fdiv <8 x double> undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vf64' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = fdiv <2 x double> undef, undef @@ -1007,7 +1007,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %4 = fdiv <4 x double> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %5 = fdiv <8 x double> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %6 = fdiv <8 x double> undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vf64' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %1 = fdiv <2 x double> undef, undef @@ -1016,7 +1016,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %4 = fdiv <4 x double> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %5 = fdiv <8 x double> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %6 = fdiv <8 x double> undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %1 = fdiv <2 x double> undef, undef %2 = fdiv <2 x double> undef, undef @@ -1045,7 +1045,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vi8_2' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %t1 = sdiv <2 x i8> undef, @@ -1064,7 +1064,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s2 = udiv <16 x i8> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s3 = srem <16 x i8> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s4 = urem <16 x i8> undef, -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi8_2' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %t1 = sdiv <2 x i8> undef, @@ -1083,7 +1083,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %s2 = udiv <16 x i8> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s3 = srem <16 x i8> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s4 = urem <16 x i8> undef, -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vi8_2' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %t1 = sdiv <2 x i8> undef, @@ -1102,7 +1102,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %s2 = udiv <16 x i8> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s3 = srem <16 x i8> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s4 = urem <16 x i8> undef, -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vi8_2' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i8> undef, @@ -1121,7 +1121,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i8> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i8> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i8> undef, -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %t1 = sdiv <2 x i8> undef, %t2 = udiv <2 x i8> undef, @@ -1160,7 +1160,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vi16_2' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %t1 = sdiv <2 x i16> undef, @@ -1179,7 +1179,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s2 = udiv <16 x i16> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s3 = srem <16 x i16> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s4 = urem <16 x i16> undef, -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi16_2' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %t1 = sdiv <2 x i16> undef, @@ -1198,7 +1198,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %s2 = udiv <16 x i16> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s3 = srem <16 x i16> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s4 = urem <16 x i16> undef, -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vi16_2' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %t1 = sdiv <2 x i16> undef, @@ -1217,7 +1217,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %s2 = udiv <16 x i16> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s3 = srem <16 x i16> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s4 = urem <16 x i16> undef, -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vi16_2' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i16> undef, @@ -1236,7 +1236,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i16> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i16> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i16> undef, -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %t1 = sdiv <2 x i16> undef, %t2 = udiv <2 x i16> undef, @@ -1275,7 +1275,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vi32_2' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %t1 = sdiv <2 x i32> undef, @@ -1294,7 +1294,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s2 = udiv <16 x i32> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s3 = srem <16 x i32> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s4 = urem <16 x i32> undef, -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi32_2' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %t1 = sdiv <2 x i32> undef, @@ -1313,7 +1313,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %s2 = udiv <16 x i32> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s3 = srem <16 x i32> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s4 = urem <16 x i32> undef, -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vi32_2' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %t1 = sdiv <2 x i32> undef, @@ -1332,7 +1332,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %s2 = udiv <16 x i32> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s3 = srem <16 x i32> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s4 = urem <16 x i32> undef, -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vi32_2' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i32> undef, @@ -1351,7 +1351,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i32> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i32> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i32> undef, -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %t1 = sdiv <2 x i32> undef, %t2 = udiv <2 x i32> undef, @@ -1390,7 +1390,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vi64_2' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %t1 = sdiv <2 x i64> undef, @@ -1409,7 +1409,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 288 for instruction: %s2 = udiv <16 x i64> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s3 = srem <16 x i64> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 272 for instruction: %s4 = urem <16 x i64> undef, -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vi64_2' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %t1 = sdiv <2 x i64> undef, @@ -1428,7 +1428,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s2 = udiv <16 x i64> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %s3 = srem <16 x i64> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %s4 = urem <16 x i64> undef, -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vi64_2' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %t1 = sdiv <2 x i64> undef, @@ -1447,7 +1447,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %s2 = udiv <16 x i64> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %s3 = srem <16 x i64> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %s4 = urem <16 x i64> undef, -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vi64_2' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %t1 = sdiv <2 x i64> undef, @@ -1466,7 +1466,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s2 = udiv <16 x i64> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s3 = srem <16 x i64> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %s4 = urem <16 x i64> undef, -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %t1 = sdiv <2 x i64> undef, %t2 = udiv <2 x i64> undef, @@ -1495,7 +1495,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vf16_2' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = fdiv <2 x half> undef, @@ -1504,7 +1504,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %4 = fdiv <4 x half> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %5 = fdiv <8 x half> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %6 = fdiv <8 x half> undef, -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vf16_2' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv <2 x half> undef, @@ -1513,7 +1513,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = fdiv <4 x half> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %5 = fdiv <8 x half> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %6 = fdiv <8 x half> undef, -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vf16_2' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv <2 x half> undef, @@ -1522,7 +1522,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = fdiv <4 x half> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %5 = fdiv <8 x half> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %6 = fdiv <8 x half> undef, -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vf16_2' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = fdiv <2 x half> undef, @@ -1531,7 +1531,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %4 = fdiv <4 x half> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %5 = fdiv <8 x half> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %6 = fdiv <8 x half> undef, -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %1 = fdiv <2 x half> undef, %2 = fdiv <2 x half> undef, @@ -1550,7 +1550,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vf32_2' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = fdiv <2 x float> undef, @@ -1559,7 +1559,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %4 = fdiv <4 x float> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %5 = fdiv <8 x float> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %6 = fdiv <8 x float> undef, -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vf32_2' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv <2 x float> undef, @@ -1568,7 +1568,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = fdiv <4 x float> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %5 = fdiv <8 x float> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %6 = fdiv <8 x float> undef, -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vf32_2' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = fdiv <2 x float> undef, @@ -1577,7 +1577,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = fdiv <4 x float> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %5 = fdiv <8 x float> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %6 = fdiv <8 x float> undef, -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vf32_2' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %1 = fdiv <2 x float> undef, @@ -1586,7 +1586,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %4 = fdiv <4 x float> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %5 = fdiv <8 x float> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %6 = fdiv <8 x float> undef, -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %1 = fdiv <2 x float> undef, %2 = fdiv <2 x float> undef, @@ -1605,7 +1605,7 @@ ; 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'vf64_2' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %1 = fdiv <2 x double> undef, @@ -1614,7 +1614,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %4 = fdiv <4 x double> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %5 = fdiv <8 x double> undef, ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %6 = fdiv <8 x double> undef, -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-MAIN-LABEL: 'vf64_2' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = fdiv <2 x double> undef, @@ -1623,7 +1623,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %4 = fdiv <4 x double> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %5 = fdiv <8 x double> undef, ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %6 = fdiv <8 x double> undef, -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8M-BASE-LABEL: 'vf64_2' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = fdiv <2 x double> undef, @@ -1632,7 +1632,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %4 = fdiv <4 x double> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %5 = fdiv <8 x double> undef, ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %6 = fdiv <8 x double> undef, -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V8R-LABEL: 'vf64_2' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %1 = fdiv <2 x double> undef, @@ -1641,7 +1641,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %4 = fdiv <4 x double> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %5 = fdiv <8 x double> undef, ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %6 = fdiv <8 x double> undef, -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %1 = fdiv <2 x double> undef, %2 = fdiv <2 x double> undef, Index: llvm/test/Analysis/CostModel/ARM/fparith.ll =================================================================== --- llvm/test/Analysis/CostModel/ARM/fparith.ll +++ llvm/test/Analysis/CostModel/ARM/fparith.ll @@ -7,13 +7,13 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = fadd float undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d = fsub float undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fmul float undef, undef -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVEFP-LABEL: 'f32' ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = fadd float undef, undef ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d = fsub float undef, undef ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fmul float undef, undef -; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c = fadd float undef, undef %d = fsub float undef, undef @@ -26,13 +26,13 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = fadd half undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d = fsub half undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fmul half undef, undef -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVEFP-LABEL: 'f16' ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = fadd half undef, undef ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d = fsub half undef, undef ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fmul half undef, undef -; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c = fadd half undef, undef %d = fsub half undef, undef @@ -45,13 +45,13 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = fadd double undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d = fsub double undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fmul double undef, undef -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVEFP-LABEL: 'f64' ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = fadd double undef, undef ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d = fsub double undef, undef ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fmul double undef, undef -; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c = fadd double undef, undef %d = fsub double undef, undef @@ -70,7 +70,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %c8 = fadd <8 x float> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %d8 = fsub <8 x float> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 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-MVE-NEXT: Cost Model: Found an estimated cost of 1 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 @@ -82,7 +82,7 @@ ; 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 +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c2 = fadd <2 x float> undef, undef %d2 = fsub <2 x float> undef, undef @@ -107,7 +107,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %c8 = fadd <8 x half> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %d8 = fsub <8 x half> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 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-MVE-NEXT: Cost Model: Found an estimated cost of 1 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 @@ -119,7 +119,7 @@ ; 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 +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c2 = fadd <2 x half> undef, undef %d2 = fsub <2 x half> undef, undef @@ -144,7 +144,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %c8 = fadd <8 x double> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %d8 = fsub <8 x double> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 72 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-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVEFP-LABEL: 'vf64' ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %c2 = fadd <2 x double> undef, undef @@ -156,7 +156,7 @@ ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %c8 = fadd <8 x double> undef, undef ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %d8 = fsub <8 x double> undef, undef ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %e8 = fmul <8 x double> undef, undef -; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %c2 = fadd <2 x double> undef, undef %d2 = fsub <2 x double> undef, undef Index: llvm/test/Analysis/CostModel/ARM/freeshift.ll =================================================================== --- llvm/test/Analysis/CostModel/ARM/freeshift.ll +++ llvm/test/Analysis/CostModel/ARM/freeshift.ll @@ -15,7 +15,7 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %oc = or i32 %b, %os ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %is = shl i32 %a, 3 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ic = icmp eq i32 %b, %is -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %as = shl i32 %a, 3 %ac = add i32 %b, %as @@ -46,7 +46,7 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %oc = or i32 %b, %os ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %is = ashr i32 %a, 3 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ic = icmp eq i32 %b, %is -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %as = ashr i32 %a, 3 %ac = add i32 %b, %as @@ -77,7 +77,7 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %oc = or i32 %b, %os ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %is = lshr i32 %a, 3 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ic = icmp eq i32 %b, %is -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %as = lshr i32 %a, 3 %ac = add i32 %b, %as Index: llvm/test/Analysis/CostModel/ARM/gep.ll =================================================================== --- llvm/test/Analysis/CostModel/ARM/gep.ll +++ llvm/test/Analysis/CostModel/ARM/gep.ll @@ -19,7 +19,7 @@ ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am255 = getelementptr inbounds i8, i8* %a, i32 -255 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am256 = getelementptr inbounds i8, i8* %a, i32 -256 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %ai = getelementptr inbounds i8, i8* %a, i32 %i -; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V7M-LABEL: 'testi8' ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds i8, i8* %a, i32 0 @@ -32,7 +32,7 @@ ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am255 = getelementptr inbounds i8, i8* %a, i32 -255 ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am256 = getelementptr inbounds i8, i8* %a, i32 -256 ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %ai = getelementptr inbounds i8, i8* %a, i32 %i -; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-T32-LABEL: 'testi8' ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds i8, i8* %a, i32 0 @@ -45,7 +45,7 @@ ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am255 = getelementptr inbounds i8, i8* %a, i32 -255 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am256 = getelementptr inbounds i8, i8* %a, i32 -256 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %ai = getelementptr inbounds i8, i8* %a, i32 %i -; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-A32-LABEL: 'testi8' ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds i8, i8* %a, i32 0 @@ -58,7 +58,7 @@ ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am255 = getelementptr inbounds i8, i8* %a, i32 -255 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am256 = getelementptr inbounds i8, i8* %a, i32 -256 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %ai = getelementptr inbounds i8, i8* %a, i32 %i -; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds i8, i8* %a, i32 0 %a1 = getelementptr inbounds i8, i8* %a, i32 1 @@ -86,7 +86,7 @@ ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am255 = getelementptr inbounds i16, i16* %a, i32 -127 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am256 = getelementptr inbounds i16, i16* %a, i32 -128 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i16, i16* %a, i32 %i -; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V7M-LABEL: 'testi16' ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds i16, i16* %a, i32 0 @@ -99,7 +99,7 @@ ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am255 = getelementptr inbounds i16, i16* %a, i32 -127 ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am256 = getelementptr inbounds i16, i16* %a, i32 -128 ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %ai = getelementptr inbounds i16, i16* %a, i32 %i -; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-T32-LABEL: 'testi16' ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds i16, i16* %a, i32 0 @@ -112,7 +112,7 @@ ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am255 = getelementptr inbounds i16, i16* %a, i32 -127 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am256 = getelementptr inbounds i16, i16* %a, i32 -128 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %ai = getelementptr inbounds i16, i16* %a, i32 %i -; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-A32-LABEL: 'testi16' ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds i16, i16* %a, i32 0 @@ -125,7 +125,7 @@ ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am255 = getelementptr inbounds i16, i16* %a, i32 -127 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am256 = getelementptr inbounds i16, i16* %a, i32 -128 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i16, i16* %a, i32 %i -; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds i16, i16* %a, i32 0 %a1 = getelementptr inbounds i16, i16* %a, i32 1 @@ -153,7 +153,7 @@ ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am255 = getelementptr inbounds i32, i32* %a, i32 -63 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am256 = getelementptr inbounds i32, i32* %a, i32 -64 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i32, i32* %a, i32 %i -; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V7M-LABEL: 'testi32' ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds i32, i32* %a, i32 0 @@ -166,7 +166,7 @@ ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am255 = getelementptr inbounds i32, i32* %a, i32 -63 ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am256 = getelementptr inbounds i32, i32* %a, i32 -64 ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %ai = getelementptr inbounds i32, i32* %a, i32 %i -; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-T32-LABEL: 'testi32' ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds i32, i32* %a, i32 0 @@ -179,7 +179,7 @@ ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am255 = getelementptr inbounds i32, i32* %a, i32 -63 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am256 = getelementptr inbounds i32, i32* %a, i32 -64 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %ai = getelementptr inbounds i32, i32* %a, i32 %i -; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-A32-LABEL: 'testi32' ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds i32, i32* %a, i32 0 @@ -192,7 +192,7 @@ ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am255 = getelementptr inbounds i32, i32* %a, i32 -63 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am256 = getelementptr inbounds i32, i32* %a, i32 -64 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %ai = getelementptr inbounds i32, i32* %a, i32 %i -; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds i32, i32* %a, i32 0 %a1 = getelementptr inbounds i32, i32* %a, i32 1 @@ -222,7 +222,7 @@ ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am255 = getelementptr inbounds i64, i64* %a, i32 -63 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am256 = getelementptr inbounds i64, i64* %a, i32 -64 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i64, i64* %a, i32 %i -; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V7M-LABEL: 'testi64' ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds i64, i64* %a, i32 0 @@ -237,7 +237,7 @@ ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am255 = getelementptr inbounds i64, i64* %a, i32 -63 ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am256 = getelementptr inbounds i64, i64* %a, i32 -64 ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i64, i64* %a, i32 %i -; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-T32-LABEL: 'testi64' ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds i64, i64* %a, i32 0 @@ -252,7 +252,7 @@ ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am255 = getelementptr inbounds i64, i64* %a, i32 -63 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am256 = getelementptr inbounds i64, i64* %a, i32 -64 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i64, i64* %a, i32 %i -; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-A32-LABEL: 'testi64' ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds i64, i64* %a, i32 0 @@ -267,7 +267,7 @@ ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am255 = getelementptr inbounds i64, i64* %a, i32 -63 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am256 = getelementptr inbounds i64, i64* %a, i32 -64 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i64, i64* %a, i32 %i -; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds i64, i64* %a, i32 0 %a1 = getelementptr inbounds i64, i64* %a, i32 1 @@ -299,7 +299,7 @@ ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am63 = getelementptr inbounds half, half* %a, i32 -63 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am64 = getelementptr inbounds half, half* %a, i32 -64 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds half, half* %a, i32 %i -; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V7M-NOFP-LABEL: 'testhalf' ; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds half, half* %a, i32 0 @@ -314,7 +314,7 @@ ; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am63 = getelementptr inbounds half, half* %a, i32 -63 ; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am64 = getelementptr inbounds half, half* %a, i32 -64 ; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds half, half* %a, i32 %i -; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V7M-FP-LABEL: 'testhalf' ; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds half, half* %a, i32 0 @@ -329,7 +329,7 @@ ; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am63 = getelementptr inbounds half, half* %a, i32 -63 ; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am64 = getelementptr inbounds half, half* %a, i32 -64 ; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds half, half* %a, i32 %i -; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'testhalf' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds half, half* %a, i32 0 @@ -344,7 +344,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am63 = getelementptr inbounds half, half* %a, i32 -63 ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am64 = getelementptr inbounds half, half* %a, i32 -64 ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds half, half* %a, i32 %i -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVEFP-LABEL: 'testhalf' ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds half, half* %a, i32 0 @@ -359,7 +359,7 @@ ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am63 = getelementptr inbounds half, half* %a, i32 -63 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am64 = getelementptr inbounds half, half* %a, i32 -64 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds half, half* %a, i32 %i -; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-T32-LABEL: 'testhalf' ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds half, half* %a, i32 0 @@ -374,7 +374,7 @@ ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am63 = getelementptr inbounds half, half* %a, i32 -63 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am64 = getelementptr inbounds half, half* %a, i32 -64 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds half, half* %a, i32 %i -; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-A32-LABEL: 'testhalf' ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds half, half* %a, i32 0 @@ -389,7 +389,7 @@ ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am63 = getelementptr inbounds half, half* %a, i32 -63 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am64 = getelementptr inbounds half, half* %a, i32 -64 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds half, half* %a, i32 %i -; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds half, half* %a, i32 0 %a1 = getelementptr inbounds half, half* %a, i32 1 @@ -421,7 +421,7 @@ ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am63 = getelementptr inbounds float, float* %a, i32 -63 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am64 = getelementptr inbounds float, float* %a, i32 -64 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds float, float* %a, i32 %i -; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V7M-NOFP-LABEL: 'testfloat' ; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds float, float* %a, i32 0 @@ -436,7 +436,7 @@ ; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am63 = getelementptr inbounds float, float* %a, i32 -63 ; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am64 = getelementptr inbounds float, float* %a, i32 -64 ; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds float, float* %a, i32 %i -; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V7M-FP-LABEL: 'testfloat' ; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds float, float* %a, i32 0 @@ -451,7 +451,7 @@ ; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am63 = getelementptr inbounds float, float* %a, i32 -63 ; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am64 = getelementptr inbounds float, float* %a, i32 -64 ; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds float, float* %a, i32 %i -; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'testfloat' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds float, float* %a, i32 0 @@ -466,7 +466,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am63 = getelementptr inbounds float, float* %a, i32 -63 ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am64 = getelementptr inbounds float, float* %a, i32 -64 ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds float, float* %a, i32 %i -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVEFP-LABEL: 'testfloat' ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds float, float* %a, i32 0 @@ -481,7 +481,7 @@ ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am63 = getelementptr inbounds float, float* %a, i32 -63 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am64 = getelementptr inbounds float, float* %a, i32 -64 ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds float, float* %a, i32 %i -; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-T32-LABEL: 'testfloat' ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds float, float* %a, i32 0 @@ -496,7 +496,7 @@ ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am63 = getelementptr inbounds float, float* %a, i32 -63 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am64 = getelementptr inbounds float, float* %a, i32 -64 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds float, float* %a, i32 %i -; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-A32-LABEL: 'testfloat' ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds float, float* %a, i32 0 @@ -511,7 +511,7 @@ ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am63 = getelementptr inbounds float, float* %a, i32 -63 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am64 = getelementptr inbounds float, float* %a, i32 -64 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds float, float* %a, i32 %i -; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds float, float* %a, i32 0 %a1 = getelementptr inbounds float, float* %a, i32 1 @@ -543,7 +543,7 @@ ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am63 = getelementptr inbounds double, double* %a, i32 -31 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %am64 = getelementptr inbounds double, double* %a, i32 -32 ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds double, double* %a, i32 %i -; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V7M-LABEL: 'testdouble' ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds double, double* %a, i32 0 @@ -558,7 +558,7 @@ ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am63 = getelementptr inbounds double, double* %a, i32 -31 ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am64 = getelementptr inbounds double, double* %a, i32 -32 ; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds double, double* %a, i32 %i -; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V7M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-T32-LABEL: 'testdouble' ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds double, double* %a, i32 0 @@ -573,7 +573,7 @@ ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am63 = getelementptr inbounds double, double* %a, i32 -31 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am64 = getelementptr inbounds double, double* %a, i32 -32 ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds double, double* %a, i32 %i -; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-A32-LABEL: 'testdouble' ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a0 = getelementptr inbounds double, double* %a, i32 0 @@ -588,7 +588,7 @@ ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am63 = getelementptr inbounds double, double* %a, i32 -31 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %am64 = getelementptr inbounds double, double* %a, i32 -32 ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds double, double* %a, i32 %i -; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds double, double* %a, i32 0 %a1 = getelementptr inbounds double, double* %a, i32 1 @@ -665,7 +665,7 @@ ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c12 = getelementptr inbounds <4 x float>, <4 x float>* undef, i32 %i ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c13 = getelementptr inbounds <4 x double>, <4 x double>* undef, i32 %i ; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d0 = getelementptr inbounds i8, i8* undef, i32 -1 -; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V6M-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V7M-NOFP-LABEL: 'testvecs' ; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a7 = getelementptr inbounds <4 x i8>, <4 x i8>* undef, i32 0 @@ -725,7 +725,7 @@ ; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c12 = getelementptr inbounds <4 x float>, <4 x float>* undef, i32 %i ; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c13 = getelementptr inbounds <4 x double>, <4 x double>* undef, i32 %i ; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %d0 = getelementptr inbounds i8, i8* undef, i32 -1 -; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V7M-NOFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-V7M-FP-LABEL: 'testvecs' ; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a7 = getelementptr inbounds <4 x i8>, <4 x i8>* undef, i32 0 @@ -785,7 +785,7 @@ ; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c12 = getelementptr inbounds <4 x float>, <4 x float>* undef, i32 %i ; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c13 = getelementptr inbounds <4 x double>, <4 x double>* undef, i32 %i ; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %d0 = getelementptr inbounds i8, i8* undef, i32 -1 -; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-V7M-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVE-LABEL: 'testvecs' ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a7 = getelementptr inbounds <4 x i8>, <4 x i8>* undef, i32 0 @@ -845,7 +845,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c12 = getelementptr inbounds <4 x float>, <4 x float>* undef, i32 %i ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c13 = getelementptr inbounds <4 x double>, <4 x double>* undef, i32 %i ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %d0 = getelementptr inbounds i8, i8* undef, i32 -1 -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-MVEFP-LABEL: 'testvecs' ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a7 = getelementptr inbounds <4 x i8>, <4 x i8>* undef, i32 0 @@ -905,7 +905,7 @@ ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c12 = getelementptr inbounds <4 x float>, <4 x float>* undef, i32 %i ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c13 = getelementptr inbounds <4 x double>, <4 x double>* undef, i32 %i ; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %d0 = getelementptr inbounds i8, i8* undef, i32 -1 -; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-T32-LABEL: 'testvecs' ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a7 = getelementptr inbounds <4 x i8>, <4 x i8>* undef, i32 0 @@ -965,7 +965,7 @@ ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c12 = getelementptr inbounds <4 x float>, <4 x float>* undef, i32 %i ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c13 = getelementptr inbounds <4 x double>, <4 x double>* undef, i32 %i ; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %d0 = getelementptr inbounds i8, i8* undef, i32 -1 -; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-T32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-A32-LABEL: 'testvecs' ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a7 = getelementptr inbounds <4 x i8>, <4 x i8>* undef, i32 0 @@ -1025,7 +1025,7 @@ ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c12 = getelementptr inbounds <4 x float>, <4 x float>* undef, i32 %i ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c13 = getelementptr inbounds <4 x double>, <4 x double>* undef, i32 %i ; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %d0 = getelementptr inbounds i8, i8* undef, i32 -1 -; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-A32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a7 = getelementptr inbounds <4 x i8>, <4 x i8>* undef, i32 0 %a8 = getelementptr inbounds <4 x i16>, <4 x i16>* undef, i32 0 Index: llvm/test/Analysis/CostModel/ARM/icmps.ll =================================================================== --- llvm/test/Analysis/CostModel/ARM/icmps.ll +++ llvm/test/Analysis/CostModel/ARM/icmps.ll @@ -13,7 +13,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = icmp slt <16 x i8> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f = icmp ult <8 x i16> undef, undef ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g = icmp sge <4 x i32> undef, undef -; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; CHECK-V8M-MAIN-LABEL: 'icmps' ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a = icmp slt i8 undef, undef @@ -23,7 +23,7 @@ ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %e = icmp slt <16 x i8> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %f = icmp ult <8 x i16> undef, undef ; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %g = icmp sge <4 x i32> undef, undef -; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-V8M-MAIN-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; CHECK-V8M-BASE-LABEL: 'icmps' ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a = icmp slt i8 undef, undef @@ -33,7 +33,7 @@ ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %e = icmp slt <16 x i8> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %f = icmp ult <8 x i16> undef, undef ; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %g = icmp sge <4 x i32> undef, undef -; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-V8M-BASE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; CHECK-V8R-LABEL: 'icmps' ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a = icmp slt i8 undef, undef @@ -43,7 +43,7 @@ ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = icmp slt <16 x i8> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = icmp ult <8 x i16> undef, undef ; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g = icmp sge <4 x i32> undef, undef -; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef +; CHECK-V8R-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %a = icmp slt i8 undef, undef %b = icmp ult i16 undef, undef Index: llvm/test/Analysis/CostModel/ARM/immediates.ll =================================================================== --- llvm/test/Analysis/CostModel/ARM/immediates.ll +++ llvm/test/Analysis/CostModel/ARM/immediates.ll @@ -115,7 +115,7 @@ ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_1024 = icmp ult i32 undef, 1024 ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %select_1_0 = select i1 undef, i32 1, i32 0 ; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %select_7_255 = select i1 undef, i32 7, i32 255 -; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 1 +; CHECK-T1-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 1 ; ; CHECK-T2-THROUGHPUT-LABEL: 'const_costs' ; CHECK-T2-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %add_1 = add i32 undef, 1 @@ -137,7 +137,7 @@ ; CHECK-T2-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_1024 = icmp ult i32 undef, 1024 ; CHECK-T2-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %select_1_0 = select i1 undef, i32 1, i32 0 ; CHECK-T2-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %select_7_255 = select i1 undef, i32 7, i32 255 -; CHECK-T2-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 1 +; CHECK-T2-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 1 ; %add_1 = add i32 undef, 1 %add_32767 = add i32 undef, 32767 Index: llvm/test/Analysis/CostModel/ARM/load_store.ll =================================================================== --- llvm/test/Analysis/CostModel/ARM/load_store.ll +++ llvm/test/Analysis/CostModel/ARM/load_store.ll @@ -31,7 +31,7 @@ ; 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 4 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-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 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 @@ -57,7 +57,7 @@ ; 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 2 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-FP-NEXT: Cost Model: Found an estimated cost of 1 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 @@ -83,7 +83,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 1 ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x float> undef, <4 x float>* undef, align 1 ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 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-MVE-NEXT: Cost Model: Found an estimated cost of 1 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 @@ -109,7 +109,7 @@ ; 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 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; store i8 undef, i8* undef, align 4 store i16 undef, i16* undef, align 4 @@ -166,7 +166,7 @@ ; 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 4 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-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 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 @@ -192,7 +192,7 @@ ; 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 2 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-FP-NEXT: Cost Model: Found an estimated cost of 1 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 @@ -218,7 +218,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %21 = load <8 x i16>, <8 x i16>* undef, align 1 ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %22 = load <4 x float>, <4 x float>* undef, align 1 ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 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-MVE-NEXT: Cost Model: Found an estimated cost of 1 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 @@ -244,7 +244,7 @@ ; 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 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; load i8, i8* undef, align 4 load i16, i16* undef, align 4 Index: llvm/test/Analysis/CostModel/ARM/mve-gather-scatter-cost.ll =================================================================== --- llvm/test/Analysis/CostModel/ARM/mve-gather-scatter-cost.ll +++ llvm/test/Analysis/CostModel/ARM/mve-gather-scatter-cost.ll @@ -28,7 +28,7 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: %V8I8 = call <8 x i8> @llvm.masked.gather.v8i8.v8p0i8(<8 x i8*> undef, i32 1, <8 x i1> undef, <8 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %V4I8 = call <4 x i8> @llvm.masked.gather.v4i8.v4p0i8(<4 x i8*> undef, i32 1, <4 x i1> undef, <4 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V2I8 = call <2 x i8> @llvm.masked.gather.v2i8.v2p0i8(<2 x i8*> undef, i32 1, <2 x i1> undef, <2 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 0 ; %V4F64 = call <4 x double> @llvm.masked.gather.v4f64.v4p0f64(<4 x double*> undef, i32 4, <4 x i1> undef, <4 x double> undef) %V2F64 = call <2 x double> @llvm.masked.gather.v2f64.v2p0f64(<2 x double*> undef, i32 4, <2 x i1> undef, <2 x double> undef) @@ -92,7 +92,7 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: call void @llvm.masked.scatter.v8i8.v8p0i8(<8 x i8> undef, <8 x i8*> undef, i32 1, <8 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: call void @llvm.masked.scatter.v4i8.v4p0i8(<4 x i8> undef, <4 x i8*> undef, i32 1, <4 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: call void @llvm.masked.scatter.v2i8.v2p0i8(<2 x i8> undef, <2 x i8*> undef, i32 1, <2 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 0 ; call void @llvm.masked.scatter.v4f64.v4p0f64(<4 x double> undef, <4 x double*> undef, i32 4, <4 x i1> undef) call void @llvm.masked.scatter.v2f64.v2p0f64(<2 x double> undef, <2 x double*> undef, i32 4, <2 x i1> undef) @@ -134,32 +134,32 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep1 = getelementptr i32, i32* %base, <4 x i32> %ind32 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res1 = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> %gep1, i32 4, <4 x i1> %mask, <4 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> %res1, <4 x i32*> %gep1, i32 4, <4 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %indzext = zext <4 x i16> %ind16 to <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep2 = getelementptr i32, i32* %base, <4 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res2 = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> %gep2, i32 4, <4 x i1> %mask, <4 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> %res2, <4 x i32*> %gep2, i32 4, <4 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %indsext = sext <4 x i16> %ind16 to <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep3 = getelementptr i32, i32* %base, <4 x i32> %indsext ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res3 = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> %gep3, i32 4, <4 x i1> %mask, <4 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> %res3, <4 x i32*> %gep3, i32 4, <4 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepu = getelementptr i32, i32* %base, <4 x i32> %ind32 ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %resu = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> %gepu, i32 1, <4 x i1> %mask, <4 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> %resu, <4 x i32*> %gepu, i32 1, <4 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepos = getelementptr i8, i8* %base8, <4 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %geposb = bitcast <4 x i8*> %gepos to <4 x i32*> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %resos = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> %geposb, i32 4, <4 x i1> %mask, <4 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> %resos, <4 x i32*> %geposb, i32 4, <4 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepbs = getelementptr i16, i16* %base16, <4 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepbsb = bitcast <4 x i16*> %gepbs to <4 x i32*> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %resbs = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> %gepbsb, i32 4, <4 x i1> %mask, <4 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> %resbs, <4 x i32*> %gepbsb, i32 4, <4 x i1> %mask) -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; + + + + + %gep1 = getelementptr i32, i32* %base, <4 x i32> %ind32 %res1 = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> %gep1, i32 4, <4 x i1> %mask, <4 x i32> undef) call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> %res1, <4 x i32*> %gep1, i32 4, <4 x i1> %mask) @@ -198,32 +198,32 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %gep1 = getelementptr float, float* %base, <4 x i32> %ind32 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res1 = call <4 x float> @llvm.masked.gather.v4f32.v4p0f32(<4 x float*> %gep1, i32 4, <4 x i1> %mask, <4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4f32.v4p0f32(<4 x float> %res1, <4 x float*> %gep1, i32 4, <4 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %indzext = zext <4 x i16> %ind16 to <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %gep2 = getelementptr float, float* %base, <4 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res2 = call <4 x float> @llvm.masked.gather.v4f32.v4p0f32(<4 x float*> %gep2, i32 4, <4 x i1> %mask, <4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4f32.v4p0f32(<4 x float> %res2, <4 x float*> %gep2, i32 4, <4 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %indsext = sext <4 x i16> %ind16 to <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %gep3 = getelementptr float, float* %base, <4 x i32> %indsext ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res3 = call <4 x float> @llvm.masked.gather.v4f32.v4p0f32(<4 x float*> %gep3, i32 4, <4 x i1> %mask, <4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4f32.v4p0f32(<4 x float> %res3, <4 x float*> %gep3, i32 4, <4 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %gepu = getelementptr float, float* %base, <4 x i32> %ind32 ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %resu = call <4 x float> @llvm.masked.gather.v4f32.v4p0f32(<4 x float*> %gepu, i32 1, <4 x i1> %mask, <4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: call void @llvm.masked.scatter.v4f32.v4p0f32(<4 x float> %resu, <4 x float*> %gepu, i32 1, <4 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepos = getelementptr i8, i8* %base8, <4 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %geposb = bitcast <4 x i8*> %gepos to <4 x float*> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %resos = call <4 x float> @llvm.masked.gather.v4f32.v4p0f32(<4 x float*> %geposb, i32 4, <4 x i1> %mask, <4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4f32.v4p0f32(<4 x float> %resos, <4 x float*> %geposb, i32 4, <4 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepbs = getelementptr i16, i16* %base16, <4 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepbsb = bitcast <4 x i16*> %gepbs to <4 x float*> ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %resbs = call <4 x float> @llvm.masked.gather.v4f32.v4p0f32(<4 x float*> %gepbsb, i32 4, <4 x i1> %mask, <4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4f32.v4p0f32(<4 x float> %resbs, <4 x float*> %gepbsb, i32 4, <4 x i1> %mask) -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; + + + + + %gep1 = getelementptr float, float* %base, <4 x i32> %ind32 %res1 = call <4 x float> @llvm.masked.gather.v4f32.v4p0f32(<4 x float*> %gep1, i32 4, <4 x i1> %mask, <4 x float> undef) call void @llvm.masked.scatter.v4f32.v4p0f32(<4 x float> %res1, <4 x float*> %gep1, i32 4, <4 x i1> %mask) @@ -262,30 +262,29 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep1 = getelementptr i16, i16* %base, <4 x i32> %ind32 ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %res1 = call <4 x i16> @llvm.masked.gather.v4i16.v4p0i16(<4 x i16*> %gep1, i32 2, <4 x i1> %mask, <4 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: call void @llvm.masked.scatter.v4i16.v4p0i16(<4 x i16> %res1, <4 x i16*> %gep1, i32 2, <4 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %indzext = zext <4 x i16> %ind16 to <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep2 = getelementptr i16, i16* %base, <4 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %res2 = call <4 x i16> @llvm.masked.gather.v4i16.v4p0i16(<4 x i16*> %gep2, i32 2, <4 x i1> %mask, <4 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: call void @llvm.masked.scatter.v4i16.v4p0i16(<4 x i16> %res2, <4 x i16*> %gep2, i32 2, <4 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %indsext = sext <4 x i16> %ind16 to <4 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep3 = getelementptr i16, i16* %base, <4 x i32> %indsext ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %res3 = call <4 x i16> @llvm.masked.gather.v4i16.v4p0i16(<4 x i16*> %gep3, i32 2, <4 x i1> %mask, <4 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 36 for instruction: call void @llvm.masked.scatter.v4i16.v4p0i16(<4 x i16> %res3, <4 x i16*> %gep3, i32 2, <4 x i1> %mask) +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep5 = getelementptr i16, i16* %base, <4 x i16> %ind16 +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res5 = call <4 x i16> @llvm.masked.gather.v4i16.v4p0i16(<4 x i16*> %gep5, i32 2, <4 x i1> %mask, <4 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %res5zext = zext <4 x i16> %res5 to <4 x i32> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res5trunc = trunc <4 x i32> %res5zext to <4 x i16> +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i16.v4p0i16(<4 x i16> %res5trunc, <4 x i16*> %gep5, i32 4, <4 x i1> %mask) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res6 = call <4 x i16> @llvm.masked.gather.v4i16.v4p0i16(<4 x i16*> %gep5, i32 2, <4 x i1> %mask, <4 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %res6sext = sext <4 x i16> %res6 to <4 x i32> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res6trunc = trunc <4 x i32> %res6sext to <4 x i16> +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i16.v4p0i16(<4 x i16> %res6trunc, <4 x i16*> %gep5, i32 4, <4 x i1> %mask) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + + -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep5 = getelementptr i16, i16* %base, <4 x i16> %ind16 -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res5 = call <4 x i16> @llvm.masked.gather.v4i16.v4p0i16(<4 x i16*> %gep5, i32 2, <4 x i1> %mask, <4 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %res5zext = zext <4 x i16> %res5 to <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res5trunc = trunc <4 x i32> %res5zext to <4 x i16> -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i16.v4p0i16(<4 x i16> %res5trunc, <4 x i16*> %gep5, i32 4, <4 x i1> %mask) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res6 = call <4 x i16> @llvm.masked.gather.v4i16.v4p0i16(<4 x i16*> %gep5, i32 2, <4 x i1> %mask, <4 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %res6sext = sext <4 x i16> %res6 to <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res6trunc = trunc <4 x i32> %res6sext to <4 x i16> -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i16.v4p0i16(<4 x i16> %res6trunc, <4 x i16*> %gep5, i32 4, <4 x i1> %mask) -; -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void -; %gep1 = getelementptr i16, i16* %base, <4 x i32> %ind32 %res1 = call <4 x i16> @llvm.masked.gather.v4i16.v4p0i16(<4 x i16*> %gep1, i32 2, <4 x i1> %mask, <4 x i16> undef) call void @llvm.masked.scatter.v4i16.v4p0i16(<4 x i16> %res1, <4 x i16*> %gep1, i32 2, <4 x i1> %mask) @@ -299,53 +298,52 @@ %gep3 = getelementptr i16, i16* %base, <4 x i32> %indsext %res3 = call <4 x i16> @llvm.masked.gather.v4i16.v4p0i16(<4 x i16*> %gep3, i32 2, <4 x i1> %mask, <4 x i16> undef) call void @llvm.masked.scatter.v4i16.v4p0i16(<4 x i16> %res3, <4 x i16*> %gep3, i32 2, <4 x i1> %mask) - + ; result zext %gep5 = getelementptr i16, i16* %base, <4 x i16> %ind16 %res5 = call <4 x i16> @llvm.masked.gather.v4i16.v4p0i16(<4 x i16*> %gep5, i32 2, <4 x i1> %mask, <4 x i16> undef) %res5zext = zext <4 x i16> %res5 to <4 x i32> %res5trunc = trunc <4 x i32> %res5zext to <4 x i16> call void @llvm.masked.scatter.v4i16.v4p0i16(<4 x i16> %res5trunc, <4 x i16*> %gep5, i32 4, <4 x i1> %mask) - + ; result sext %res6 = call <4 x i16> @llvm.masked.gather.v4i16.v4p0i16(<4 x i16*> %gep5, i32 2, <4 x i1> %mask, <4 x i16> undef) %res6sext = sext <4 x i16> %res6 to <4 x i32> %res6trunc = trunc <4 x i32> %res6sext to <4 x i16> call void @llvm.masked.scatter.v4i16.v4p0i16(<4 x i16> %res6trunc, <4 x i16*> %gep5, i32 4, <4 x i1> %mask) - + ret void } define void @gep_v4i8(i8* %base, <4 x i8> %ind8, <4 x i1> %mask) { ; CHECK-LABEL: 'gep_v4i8' +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep5 = getelementptr i8, i8* %base, <4 x i8> %ind8 +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res5 = call <4 x i8> @llvm.masked.gather.v4i8.v4p0i8(<4 x i8*> %gep5, i32 2, <4 x i1> %mask, <4 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res5zext = zext <4 x i8> %res5 to <4 x i32> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res5trunc = trunc <4 x i32> %res5zext to <4 x i8> +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i8.v4p0i8(<4 x i8> %res5trunc, <4 x i8*> %gep5, i32 4, <4 x i1> %mask) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res6 = call <4 x i8> @llvm.masked.gather.v4i8.v4p0i8(<4 x i8*> %gep5, i32 2, <4 x i1> %mask, <4 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res6sext = sext <4 x i8> %res6 to <4 x i32> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res6trunc = trunc <4 x i32> %res6sext to <4 x i8> +; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i8.v4p0i8(<4 x i8> %res6trunc, <4 x i8*> %gep5, i32 4, <4 x i1> %mask) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep5 = getelementptr i8, i8* %base, <4 x i8> %ind8 -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res5 = call <4 x i8> @llvm.masked.gather.v4i8.v4p0i8(<4 x i8*> %gep5, i32 2, <4 x i1> %mask, <4 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res5zext = zext <4 x i8> %res5 to <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res5trunc = trunc <4 x i32> %res5zext to <4 x i8> -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i8.v4p0i8(<4 x i8> %res5trunc, <4 x i8*> %gep5, i32 4, <4 x i1> %mask) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res6 = call <4 x i8> @llvm.masked.gather.v4i8.v4p0i8(<4 x i8*> %gep5, i32 2, <4 x i1> %mask, <4 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %res6sext = sext <4 x i8> %res6 to <4 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res6trunc = trunc <4 x i32> %res6sext to <4 x i8> -; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i8.v4p0i8(<4 x i8> %res6trunc, <4 x i8*> %gep5, i32 4, <4 x i1> %mask) -; -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void -; - ; result zext %gep5 = getelementptr i8, i8* %base, <4 x i8> %ind8 %res5 = call <4 x i8> @llvm.masked.gather.v4i8.v4p0i8(<4 x i8*> %gep5, i32 2, <4 x i1> %mask, <4 x i8> undef) %res5zext = zext <4 x i8> %res5 to <4 x i32> %res5trunc = trunc <4 x i32> %res5zext to <4 x i8> call void @llvm.masked.scatter.v4i8.v4p0i8(<4 x i8> %res5trunc, <4 x i8*> %gep5, i32 4, <4 x i1> %mask) - + ; result sext %res6 = call <4 x i8> @llvm.masked.gather.v4i8.v4p0i8(<4 x i8*> %gep5, i32 2, <4 x i1> %mask, <4 x i8> undef) %res6sext = sext <4 x i8> %res6 to <4 x i32> %res6trunc = trunc <4 x i32> %res6sext to <4 x i8> call void @llvm.masked.scatter.v4i8.v4p0i8(<4 x i8> %res6trunc, <4 x i8*> %gep5, i32 4, <4 x i1> %mask) - + ret void } @@ -354,42 +352,42 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep1 = getelementptr i16, i16* %base, <8 x i32> %ind32 ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: %res1 = call <8 x i16> @llvm.masked.gather.v8i16.v8p0i16(<8 x i16*> %gep1, i32 2, <8 x i1> %mask, <8 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: call void @llvm.masked.scatter.v8i16.v8p0i16(<8 x i16> %res1, <8 x i16*> %gep1, i32 2, <8 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %indzext = zext <8 x i16> %ind16 to <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep2 = getelementptr i16, i16* %base, <8 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %res2 = call <8 x i16> @llvm.masked.gather.v8i16.v8p0i16(<8 x i16*> %gep2, i32 2, <8 x i1> %mask, <8 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.v8i16.v8p0i16(<8 x i16> %res2, <8 x i16*> %gep2, i32 2, <8 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %indsext = sext <8 x i16> %ind16 to <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep3 = getelementptr i16, i16* %base, <8 x i32> %indsext ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: %res3 = call <8 x i16> @llvm.masked.gather.v8i16.v8p0i16(<8 x i16*> %gep3, i32 2, <8 x i1> %mask, <8 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: call void @llvm.masked.scatter.v8i16.v8p0i16(<8 x i16> %res3, <8 x i16*> %gep3, i32 2, <8 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: %resu = call <8 x i16> @llvm.masked.gather.v8i16.v8p0i16(<8 x i16*> %gep2, i32 1, <8 x i1> %mask, <8 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: call void @llvm.masked.scatter.v8i16.v8p0i16(<8 x i16> %resu, <8 x i16*> %gep2, i32 1, <8 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepos = getelementptr i8, i8* %base8, <8 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %geposb = bitcast <8 x i8*> %gepos to <8 x i16*> ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %resos = call <8 x i16> @llvm.masked.gather.v8i16.v8p0i16(<8 x i16*> %geposb, i32 2, <8 x i1> %mask, <8 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.v8i16.v8p0i16(<8 x i16> %resos, <8 x i16*> %geposb, i32 2, <8 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepbs = getelementptr i32, i32* %base32, <8 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepbsb = bitcast <8 x i32*> %gepbs to <8 x i16*> ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: %resbs = call <8 x i16> @llvm.masked.gather.v8i16.v8p0i16(<8 x i16*> %gepbsb, i32 2, <8 x i1> %mask, <8 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: call void @llvm.masked.scatter.v8i16.v8p0i16(<8 x i16> %resbs, <8 x i16*> %gepbsb, i32 2, <8 x i1> %mask) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %indzext4 = zext <8 x i16> %ind16 to <8 x i32> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep4 = getelementptr i16, i16* %base, <8 x i32> %indzext4 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %indtrunc = trunc <8 x i32> %ind32 to <8 x i16> +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.v8i16.v8p0i16(<8 x i16> %indtrunc, <8 x i16*> %gep4, i32 2, <8 x i1> %mask) +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %res = call <8 x i16> @llvm.masked.gather.v8i16.v8p0i16(<8 x i16*> %gep4, i32 2, <8 x i1> %mask, <8 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %ressext = sext <8 x i16> %res to <8 x i32> +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %restrunc = trunc <8 x i32> %ressext to <8 x i16> +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.v8i16.v8p0i16(<8 x i16> %restrunc, <8 x i16*> %gep4, i32 4, <8 x i1> %mask) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + + + + + -; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %indzext4 = zext <8 x i16> %ind16 to <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep4 = getelementptr i16, i16* %base, <8 x i32> %indzext4 -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %indtrunc = trunc <8 x i32> %ind32 to <8 x i16> -; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.v8i16.v8p0i16(<8 x i16> %indtrunc, <8 x i16*> %gep4, i32 2, <8 x i1> %mask) -; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %res = call <8 x i16> @llvm.masked.gather.v8i16.v8p0i16(<8 x i16*> %gep4, i32 2, <8 x i1> %mask, <8 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %ressext = sext <8 x i16> %res to <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %restrunc = trunc <8 x i32> %ressext to <8 x i16> -; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.v8i16.v8p0i16(<8 x i16> %restrunc, <8 x i16*> %gep4, i32 4, <8 x i1> %mask) -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void -; ; no offset ext %gep1 = getelementptr i16, i16* %base, <8 x i32> %ind32 %res1 = call <8 x i16> @llvm.masked.gather.v8i16.v8p0i16(<8 x i16*> %gep1, i32 2, <8 x i1> %mask, <8 x i16> undef) @@ -428,13 +426,13 @@ %gep4 = getelementptr i16, i16* %base, <8 x i32> %indzext4 %indtrunc = trunc <8 x i32> %ind32 to <8 x i16> call void @llvm.masked.scatter.v8i16.v8p0i16(<8 x i16> %indtrunc, <8 x i16*> %gep4, i32 2, <8 x i1> %mask) - + ; ext result to <8 x i32> %res = call <8 x i16> @llvm.masked.gather.v8i16.v8p0i16(<8 x i16*> %gep4, i32 2, <8 x i1> %mask, <8 x i16> undef) %ressext = sext <8 x i16> %res to <8 x i32> %restrunc = trunc <8 x i32> %ressext to <8 x i16> call void @llvm.masked.scatter.v8i16.v8p0i16(<8 x i16> %restrunc, <8 x i16*> %gep4, i32 4, <8 x i1> %mask) - + ret void } @@ -443,32 +441,32 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %gep1 = getelementptr half, half* %base, <8 x i32> %ind32 ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: %res1 = call <8 x half> @llvm.masked.gather.v8f16.v8p0f16(<8 x half*> %gep1, i32 2, <8 x i1> %mask, <8 x half> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: call void @llvm.masked.scatter.v8f16.v8p0f16(<8 x half> %res1, <8 x half*> %gep1, i32 2, <8 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %indzext = zext <8 x i16> %ind16 to <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %gep2 = getelementptr half, half* %base, <8 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %res2 = call <8 x half> @llvm.masked.gather.v8f16.v8p0f16(<8 x half*> %gep2, i32 2, <8 x i1> %mask, <8 x half> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.v8f16.v8p0f16(<8 x half> %res2, <8 x half*> %gep2, i32 2, <8 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %indsext = sext <8 x i16> %ind16 to <8 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %gep3 = getelementptr half, half* %base, <8 x i32> %indsext ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: %res3 = call <8 x half> @llvm.masked.gather.v8f16.v8p0f16(<8 x half*> %gep3, i32 2, <8 x i1> %mask, <8 x half> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: call void @llvm.masked.scatter.v8f16.v8p0f16(<8 x half> %res3, <8 x half*> %gep3, i32 2, <8 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: %resu = call <8 x half> @llvm.masked.gather.v8f16.v8p0f16(<8 x half*> %gep2, i32 1, <8 x i1> %mask, <8 x half> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: call void @llvm.masked.scatter.v8f16.v8p0f16(<8 x half> %resu, <8 x half*> %gep2, i32 1, <8 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepos = getelementptr i8, i8* %base8, <8 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %geposb = bitcast <8 x i8*> %gepos to <8 x half*> ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %resos = call <8 x half> @llvm.masked.gather.v8f16.v8p0f16(<8 x half*> %geposb, i32 2, <8 x i1> %mask, <8 x half> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.v8f16.v8p0f16(<8 x half> %resos, <8 x half*> %geposb, i32 2, <8 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepbs = getelementptr i32, i32* %base32, <8 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepbsb = bitcast <8 x i32*> %gepbs to <8 x half*> ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: %resbs = call <8 x half> @llvm.masked.gather.v8f16.v8p0f16(<8 x half*> %gepbsb, i32 2, <8 x i1> %mask, <8 x half> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 136 for instruction: call void @llvm.masked.scatter.v8f16.v8p0f16(<8 x half> %resbs, <8 x half*> %gepbsb, i32 2, <8 x i1> %mask) -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; + + + + + ; no offset ext %gep1 = getelementptr half, half* %base, <8 x i32> %ind32 %res1 = call <8 x half> @llvm.masked.gather.v8f16.v8p0f16(<8 x half*> %gep1, i32 2, <8 x i1> %mask, <8 x half> undef) @@ -507,21 +505,21 @@ define void @gep_v8i8(i8* %base, <8 x i8> %ind8, <8 x i1> %mask) { ; CHECK-LABEL: 'gep_v8i8' +; CHECK-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %indzext = zext <8 x i8> %ind8 to <8 x i32> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep5 = getelementptr i8, i8* %base, <8 x i32> %indzext +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %res5 = call <8 x i8> @llvm.masked.gather.v8i8.v8p0i8(<8 x i8*> %gep5, i32 2, <8 x i1> %mask, <8 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %res5zext = zext <8 x i8> %res5 to <8 x i16> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res5trunc = trunc <8 x i16> %res5zext to <8 x i8> +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.v8i8.v8p0i8(<8 x i8> %res5trunc, <8 x i8*> %gep5, i32 4, <8 x i1> %mask) +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %res6 = call <8 x i8> @llvm.masked.gather.v8i8.v8p0i8(<8 x i8*> %gep5, i32 2, <8 x i1> %mask, <8 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %res6sext = sext <8 x i8> %res6 to <8 x i16> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res6trunc = trunc <8 x i16> %res6sext to <8 x i8> +; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.v8i8.v8p0i8(<8 x i8> %res6trunc, <8 x i8*> %gep5, i32 4, <8 x i1> %mask) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; -; CHECK-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %indzext = zext <8 x i8> %ind8 to <8 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep5 = getelementptr i8, i8* %base, <8 x i32> %indzext -; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %res5 = call <8 x i8> @llvm.masked.gather.v8i8.v8p0i8(<8 x i8*> %gep5, i32 2, <8 x i1> %mask, <8 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %res5zext = zext <8 x i8> %res5 to <8 x i16> -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res5trunc = trunc <8 x i16> %res5zext to <8 x i8> -; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.v8i8.v8p0i8(<8 x i8> %res5trunc, <8 x i8*> %gep5, i32 4, <8 x i1> %mask) -; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %res6 = call <8 x i8> @llvm.masked.gather.v8i8.v8p0i8(<8 x i8*> %gep5, i32 2, <8 x i1> %mask, <8 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %res6sext = sext <8 x i8> %res6 to <8 x i16> -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %res6trunc = trunc <8 x i16> %res6sext to <8 x i8> -; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.v8i8.v8p0i8(<8 x i8> %res6trunc, <8 x i8*> %gep5, i32 4, <8 x i1> %mask) -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void -; ; result zext %indzext = zext <8 x i8> %ind8 to <8 x i32> @@ -530,13 +528,13 @@ %res5zext = zext <8 x i8> %res5 to <8 x i16> %res5trunc = trunc <8 x i16> %res5zext to <8 x i8> call void @llvm.masked.scatter.v8i8.v8p0i8(<8 x i8> %res5trunc, <8 x i8*> %gep5, i32 4, <8 x i1> %mask) - + ; result sext %res6 = call <8 x i8> @llvm.masked.gather.v8i8.v8p0i8(<8 x i8*> %gep5, i32 2, <8 x i1> %mask, <8 x i8> undef) %res6sext = sext <8 x i8> %res6 to <8 x i16> %res6trunc = trunc <8 x i16> %res6sext to <8 x i8> call void @llvm.masked.scatter.v8i8.v8p0i8(<8 x i8> %res6trunc, <8 x i8*> %gep5, i32 4, <8 x i1> %mask) - + ret void } @@ -545,28 +543,28 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep1 = getelementptr i8, i8* %base, <16 x i32> %ind32 ; CHECK-NEXT: Cost Model: Found an estimated cost of 528 for instruction: %res1 = call <16 x i8> @llvm.masked.gather.v16i8.v16p0i8(<16 x i8*> %gep1, i32 1, <16 x i1> %mask, <16 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 528 for instruction: call void @llvm.masked.scatter.v16i8.v16p0i8(<16 x i8> %res1, <16 x i8*> %gep1, i32 2, <16 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 74 for instruction: %indzext = zext <16 x i8> %ind8 to <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep2 = getelementptr i8, i8* %base, <16 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %res2 = call <16 x i8> @llvm.masked.gather.v16i8.v16p0i8(<16 x i8*> %gep2, i32 2, <16 x i1> %mask, <16 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.v16i8.v16p0i8(<16 x i8> %res2, <16 x i8*> %gep2, i32 2, <16 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 74 for instruction: %indsext = sext <16 x i8> %ind8 to <16 x i32> ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep3 = getelementptr i8, i8* %base, <16 x i32> %indsext ; CHECK-NEXT: Cost Model: Found an estimated cost of 528 for instruction: %res3 = call <16 x i8> @llvm.masked.gather.v16i8.v16p0i8(<16 x i8*> %gep3, i32 2, <16 x i1> %mask, <16 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 528 for instruction: call void @llvm.masked.scatter.v16i8.v16p0i8(<16 x i8> %res3, <16 x i8*> %gep3, i32 2, <16 x i1> %mask) - ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepbs = getelementptr i16, i16* %base16, <16 x i32> %indzext ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepbsb = bitcast <16 x i16*> %gepbs to <16 x i8*> ; CHECK-NEXT: Cost Model: Found an estimated cost of 528 for instruction: %resbs = call <16 x i8> @llvm.masked.gather.v16i8.v16p0i8(<16 x i8*> %gepbsb, i32 2, <16 x i1> %mask, <16 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 528 for instruction: call void @llvm.masked.scatter.v16i8.v16p0i8(<16 x i8> %resbs, <16 x i8*> %gepbsb, i32 2, <16 x i1> %mask) - -; CHECK-NEXT: Cost Model: Found an estimated cost of 74 for instruction: %indzext4 = zext <16 x i8> %ind8 to <16 x i32> -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep4 = getelementptr i8, i8* %base, <16 x i32> %indzext -; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %indtrunc = trunc <16 x i32> %ind32 to <16 x i8> -; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.v16i8.v16p0i8(<16 x i8> %indtrunc, <16 x i8*> %gep4, i32 2, <16 x i1> %mask) -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 74 for instruction: %indzext4 = zext <16 x i8> %ind8 to <16 x i32> +; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep4 = getelementptr i8, i8* %base, <16 x i32> %indzext +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %indtrunc = trunc <16 x i32> %ind32 to <16 x i8> +; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.v16i8.v16p0i8(<16 x i8> %indtrunc, <16 x i8*> %gep4, i32 2, <16 x i1> %mask) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; + + + + ; no offset ext %gep1 = getelementptr i8, i8* %base, <16 x i32> %ind32 %res1 = call <16 x i8> @llvm.masked.gather.v16i8.v16p0i8(<16 x i8*> %gep1, i32 1, <16 x i1> %mask, <16 x i8> undef) @@ -595,7 +593,7 @@ %gep4 = getelementptr i8, i8* %base, <16 x i32> %indzext %indtrunc = trunc <16 x i32> %ind32 to <16 x i8> call void @llvm.masked.scatter.v16i8.v16p0i8(<16 x i8> %indtrunc, <16 x i8*> %gep4, i32 2, <16 x i1> %mask) - + ret void } @@ -604,7 +602,7 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gepbs = getelementptr i8, <16 x i8*> %base, i32 %off ; CHECK-NEXT: Cost Model: Found an estimated cost of 528 for instruction: %resbs = call <16 x i8> @llvm.masked.gather.v16i8.v16p0i8(<16 x i8*> %gepbs, i32 2, <16 x i1> %mask, <16 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 528 for instruction: call void @llvm.masked.scatter.v16i8.v16p0i8(<16 x i8> %resbs, <16 x i8*> %gepbs, i32 2, <16 x i1> %mask) -; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %gepbs = getelementptr i8, <16 x i8*> %base, i32 %off %resbs = call <16 x i8> @llvm.masked.gather.v16i8.v16p0i8(<16 x i8*> %gepbs, i32 2, <16 x i1> %mask, <16 x i8> undef) Index: llvm/test/Analysis/CostModel/ARM/select.ll =================================================================== --- llvm/test/Analysis/CostModel/ARM/select.ll +++ llvm/test/Analysis/CostModel/ARM/select.ll @@ -34,7 +34,7 @@ ; 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 2 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 60 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-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-NEON-LABEL: 'selects' ; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v1 = select i1 undef, i8 undef, i8 undef @@ -65,7 +65,7 @@ ; 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 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-THUMB1-LABEL: 'selects' ; CHECK-THUMB1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v1 = select i1 undef, i8 undef, i8 undef @@ -96,7 +96,7 @@ ; CHECK-THUMB1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v20 = select <1 x i1> undef, <1 x i32> undef, <1 x i32> undef ; CHECK-THUMB1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v21 = select <3 x i1> undef, <3 x float> undef, <3 x float> undef ; CHECK-THUMB1-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %v22 = select <5 x i1> undef, <5 x double> undef, <5 x double> undef -; CHECK-THUMB1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-THUMB1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; CHECK-THUMB2-LABEL: 'selects' ; CHECK-THUMB2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v1 = select i1 undef, i8 undef, i8 undef @@ -127,7 +127,7 @@ ; CHECK-THUMB2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v20 = select <1 x i1> undef, <1 x i32> undef, <1 x i32> undef ; CHECK-THUMB2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v21 = select <3 x i1> undef, <3 x float> undef, <3 x float> undef ; CHECK-THUMB2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %v22 = select <5 x i1> undef, <5 x double> undef, <5 x double> undef -; CHECK-THUMB2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK-THUMB2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; Scalar values %v1 = select i1 undef, i8 undef, i8 undef Index: llvm/test/Analysis/CostModel/ARM/shuffle.ll =================================================================== --- llvm/test/Analysis/CostModel/ARM/shuffle.ll +++ llvm/test/Analysis/CostModel/ARM/shuffle.ll @@ -16,7 +16,7 @@ ; 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> zeroinitializer ; 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> 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 +; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; 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 @@ -31,7 +31,7 @@ ; 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 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 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 @@ -67,7 +67,7 @@ ; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 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 64 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 256 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-MVE-NEXT: Cost Model: Found an estimated cost of 1 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> @@ -82,7 +82,7 @@ ; 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 +; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 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> Index: llvm/test/Analysis/CostModel/RISCV/gep.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/gep.ll +++ llvm/test/Analysis/CostModel/RISCV/gep.ll @@ -14,7 +14,7 @@ ; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a5 = getelementptr inbounds i8, i8* %a, i32 -2048 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a6 = getelementptr inbounds i8, i8* %a, i32 -2049 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i8, i8* %a, i32 %i -; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds i8, i8* %a, i32 0 %a1 = getelementptr inbounds i8, i8* %a, i32 1 @@ -37,7 +37,7 @@ ; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a5 = getelementptr inbounds i16, i16* %a, i32 -1024 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a6 = getelementptr inbounds i16, i16* %a, i32 -1025 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i16, i16* %a, i32 %i -; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds i16, i16* %a, i32 0 %a1 = getelementptr inbounds i16, i16* %a, i32 1 @@ -60,7 +60,7 @@ ; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a5 = getelementptr inbounds i32, i32* %a, i32 -512 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a6 = getelementptr inbounds i32, i32* %a, i32 -513 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i32, i32* %a, i32 %i -; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds i32, i32* %a, i32 0 %a1 = getelementptr inbounds i32, i32* %a, i32 1 @@ -83,7 +83,7 @@ ; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a5 = getelementptr inbounds i64, i64* %a, i32 -256 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a6 = getelementptr inbounds i64, i64* %a, i32 -257 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds i64, i64* %a, i32 %i -; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds i64, i64* %a, i32 0 %a1 = getelementptr inbounds i64, i64* %a, i32 1 @@ -106,7 +106,7 @@ ; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a5 = getelementptr inbounds float, float* %a, i32 -512 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a6 = getelementptr inbounds float, float* %a, i32 -513 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds float, float* %a, i32 %i -; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds float, float* %a, i32 0 %a1 = getelementptr inbounds float, float* %a, i32 1 @@ -129,7 +129,7 @@ ; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %a5 = getelementptr inbounds double, double* %a, i32 -256 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a6 = getelementptr inbounds double, double* %a, i32 -257 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ai = getelementptr inbounds double, double* %a, i32 %i -; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds double, double* %a, i32 0 %a1 = getelementptr inbounds double, double* %a, i32 1 @@ -162,7 +162,7 @@ ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c4 = getelementptr inbounds <4 x i64>, <4 x i64>* undef, i32 128 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c5 = getelementptr inbounds <4 x float>, <4 x float>* undef, i32 128 ; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c6 = getelementptr inbounds <4 x double>, <4 x double>* undef, i32 128 -; RVI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void +; RVI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %a0 = getelementptr inbounds <4 x i8>, <4 x i8>* undef, i32 0 %a1 = getelementptr inbounds <4 x i16>, <4 x i16>* undef, i32 0 Index: llvm/test/Analysis/CostModel/SystemZ/cmp-mem.ll =================================================================== --- llvm/test/Analysis/CostModel/SystemZ/cmp-mem.ll +++ llvm/test/Analysis/CostModel/SystemZ/cmp-mem.ll @@ -7,7 +7,7 @@ ; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %Ld = load i8, i8* %Src ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %Cmp = icmp eq i8 %Ld, 123 ; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %Ret = zext i1 %Cmp to i32 -; CHECK: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %Ret +; CHECK: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %Ret %Ld = load i8, i8* %Src %Cmp = icmp eq i8 %Ld, 123 %Ret = zext i1 %Cmp to i32 @@ -19,7 +19,7 @@ ; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %Ld = load i16, i16* %Src ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %Cmp = icmp eq i16 ; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %Ret = zext i1 %Cmp to i32 -; CHECK: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %Ret +; CHECK: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %Ret %Ld = load i16, i16* %Src %Cmp = icmp eq i16 %Ld, 1234 %Ret = zext i1 %Cmp to i32 Index: llvm/test/Analysis/CostModel/SystemZ/int-operands-extcost.ll =================================================================== --- llvm/test/Analysis/CostModel/SystemZ/int-operands-extcost.ll +++ llvm/test/Analysis/CostModel/SystemZ/int-operands-extcost.ll @@ -41,5 +41,5 @@ ; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %a3 = add i16 %li16_1, 1 ; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %5 = icmp slt i16 %a2, %a3 ; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %6 = icmp slt i16 %a2, 123 -; CHECK: Cost Model: Found an estimated cost of 0 for instruction: ret void +; CHECK: Cost Model: Found an estimated cost of 1 for instruction: ret void } Index: llvm/test/Transforms/LoopVectorize/AArch64/aarch64-predication.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/AArch64/aarch64-predication.ll +++ llvm/test/Transforms/LoopVectorize/AArch64/aarch64-predication.ll @@ -12,7 +12,7 @@ ; %tmp4 a lower scalarization overhead. ; ; COST-LABEL: predicated_udiv_scalarized_operand -; COST: LV: Found an estimated cost of 4 for VF 2 For instruction: %tmp4 = udiv i64 %tmp2, %tmp3 +; COST: LV: Found an estimated cost of 5 for VF 2 For instruction: %tmp4 = udiv i64 %tmp2, %tmp3 ; ; CHECK-LABEL: @predicated_udiv_scalarized_operand( ; CHECK: vector.body: Index: llvm/test/Transforms/LoopVectorize/AArch64/extractvalue-no-scalarization-required.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/AArch64/extractvalue-no-scalarization-required.ll +++ llvm/test/Transforms/LoopVectorize/AArch64/extractvalue-no-scalarization-required.ll @@ -8,7 +8,7 @@ ; Check scalar cost for extractvalue. The constant and loop invariant operands are free, ; leaving cost 3 for scalarizing the result + 2 for executing the op with VF 2. -; CM: LV: Scalar loop costs: 7. +; CM: LV: Scalar loop costs: 9. ; CM: LV: Found an estimated cost of 5 for VF 2 For instruction: %a = extractvalue { i64, i64 } %sv, 0 ; CM-NEXT: LV: Found an estimated cost of 5 for VF 2 For instruction: %b = extractvalue { i64, i64 } %sv, 1 @@ -60,7 +60,7 @@ ; Similar to the test case above, but checks getVectorCallCost as well. declare float @pow(float, float) readnone nounwind -; CM: LV: Scalar loop costs: 16. +; CM: LV: Scalar loop costs: 18. ; CM: LV: Found an estimated cost of 5 for VF 2 For instruction: %a = extractvalue { float, float } %sv, 0 ; CM-NEXT: LV: Found an estimated cost of 5 for VF 2 For instruction: %b = extractvalue { float, float } %sv, 1 Index: llvm/test/Transforms/LoopVectorize/AArch64/predication_costs.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/AArch64/predication_costs.ll +++ llvm/test/Transforms/LoopVectorize/AArch64/predication_costs.ll @@ -19,7 +19,7 @@ ; (udiv(2) + extractelement(6) + insertelement(3)) / 2 = 5 ; ; CHECK: Scalarizing and predicating: %tmp4 = udiv i32 %tmp2, %tmp3 -; CHECK: Found an estimated cost of 5 for VF 2 For instruction: %tmp4 = udiv i32 %tmp2, %tmp3 +; CHECK: Found an estimated cost of 6 for VF 2 For instruction: %tmp4 = udiv i32 %tmp2, %tmp3 ; define i32 @predicated_udiv(i32* %a, i32* %b, i1 %c, i64 %n) { entry: @@ -101,7 +101,7 @@ ; CHECK: Scalarizing: %tmp3 = add nsw i32 %tmp2, %x ; CHECK: Scalarizing and predicating: %tmp4 = udiv i32 %tmp2, %tmp3 ; CHECK: Found an estimated cost of 2 for VF 2 For instruction: %tmp3 = add nsw i32 %tmp2, %x -; CHECK: Found an estimated cost of 4 for VF 2 For instruction: %tmp4 = udiv i32 %tmp2, %tmp3 +; CHECK: Found an estimated cost of 5 for VF 2 For instruction: %tmp4 = udiv i32 %tmp2, %tmp3 ; define i32 @predicated_udiv_scalarized_operand(i32* %a, i1 %c, i32 %x, i64 %n) { entry: @@ -198,8 +198,8 @@ ; CHECK: Scalarizing: %tmp5 = sub i32 %tmp4, %x ; CHECK: Scalarizing and predicating: store i32 %tmp5, i32* %tmp0, align 4 ; CHECK: Found an estimated cost of 1 for VF 2 For instruction: %tmp2 = add i32 %tmp1, %x -; CHECK: Found an estimated cost of 5 for VF 2 For instruction: %tmp3 = sdiv i32 %tmp1, %tmp2 -; CHECK: Found an estimated cost of 5 for VF 2 For instruction: %tmp4 = udiv i32 %tmp3, %tmp2 +; CHECK: Found an estimated cost of 6 for VF 2 For instruction: %tmp3 = sdiv i32 %tmp1, %tmp2 +; CHECK: Found an estimated cost of 6 for VF 2 For instruction: %tmp4 = udiv i32 %tmp3, %tmp2 ; CHECK: Found an estimated cost of 2 for VF 2 For instruction: %tmp5 = sub i32 %tmp4, %x ; CHECK: Found an estimated cost of 2 for VF 2 For instruction: store i32 %tmp5, i32* %tmp0, align 4 ; Index: llvm/test/Transforms/LoopVectorize/SystemZ/branch-for-predicated-block.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/SystemZ/branch-for-predicated-block.ll +++ llvm/test/Transforms/LoopVectorize/SystemZ/branch-for-predicated-block.ll @@ -32,7 +32,7 @@ for.end.loopexit: ret void -; CHECK: LV: Found an estimated cost of 5 for VF 2 For instruction: br i1 %cmp55, label %if.then, label %for.inc +; CHECK: LV: Found an estimated cost of 7 for VF 2 For instruction: br i1 %cmp55, label %if.then, label %for.inc ; CHECK: LV: Found an estimated cost of 0 for VF 2 For instruction: br label %for.inc -; CHECK: LV: Found an estimated cost of 0 for VF 2 For instruction: br i1 %exitcond, label %for.end.loopexit, label %for.body +; CHECK: LV: Found an estimated cost of 1 for VF 2 For instruction: br i1 %exitcond, label %for.end.loopexit, label %for.body }