Author: David Spickett Date: 2026-10-14T09:06:17+01:00 New Revision: d57779b53ee89bf109e133e45eca2bc55cec8032
URL: https://github.com/llvm/llvm-project/commit/d57779b53ee89bf109e133e45eca2bc55cec8032 DIFF: https://github.com/llvm/llvm-project/commit/d57779b53ee89bf109e133e45eca2bc55cec8032.diff LOG: Revert "[LoongArch] Add arithmetic instruction costs (#231094)" This reverts commit a0944bb8d04f7be9189dba342923f1e8ca327472. Added: Modified: llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.cpp llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.h Removed: llvm/test/Analysis/CostModel/LoongArch/arith-fp.ll llvm/test/Analysis/CostModel/LoongArch/arith-int.ll ################################################################################ diff --git a/llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.cpp b/llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.cpp index fd5638d440de8..6646841b93215 100644 --- a/llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.cpp +++ b/llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.cpp @@ -14,49 +14,11 @@ //===----------------------------------------------------------------------===// #include "LoongArchTargetTransformInfo.h" -#include "llvm/Analysis/TargetTransformInfo.h" -#include "llvm/CodeGen/CostTable.h" -#include "llvm/CodeGen/ISDOpcodes.h" -#include "llvm/CodeGenTypes/MachineValueType.h" -#include "llvm/IR/InstrTypes.h" -#include "llvm/IR/Intrinsics.h" -#include "llvm/Support/InstructionCost.h" -#include <optional> using namespace llvm; #define DEBUG_TYPE "loongarchtti" -struct CostKindCosts { - unsigned LatencyCost = ~0U; - unsigned RecipThroughputCost = ~0U; - unsigned CodeSizeCost = ~0U; - unsigned SizeAndLatencyCost = ~0U; - - std::optional<unsigned> - operator[](TargetTransformInfo::TargetCostKind Kind) const { - unsigned Cost = ~0U; - switch (Kind) { - case llvm::TargetTransformInfo::TCK_Latency: - Cost = LatencyCost; - break; - case TargetTransformInfo::TCK_RecipThroughput: - Cost = RecipThroughputCost; - break; - case TargetTransformInfo::TCK_CodeSize: - Cost = CodeSizeCost; - break; - case TargetTransformInfo::TCK_SizeAndLatency: - Cost = SizeAndLatencyCost; - break; - } - if (Cost == ~0U) - return std::nullopt; - return Cost; - } -}; -using CostKindTblEntry = CostTblEntryT<CostKindCosts>; - TypeSize LoongArchTTIImpl::getRegisterBitWidth( TargetTransformInfo::RegisterKind K) const { TypeSize DefSize = TargetTransformInfoImplBase::getRegisterBitWidth(K); @@ -173,294 +135,3 @@ LoongArchTTIImpl::enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const { return Options; } - -InstructionCost LoongArchTTIImpl::getArithmeticInstrCost( - unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind, - TTI::OperandValueInfo Op1Info, TTI::OperandValueInfo Op2Info, - ArrayRef<const Value *> Args, const Instruction *CxtI) const { - - std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(Ty); - int ISD = TLI->InstructionOpcodeToISD(Opcode); - - // Vector multiply by pow2 will be simplified to shifts. - // Vector multiply by -pow2 will be simplified to shifts/negates. - if (ISD == ISD::MUL && Op2Info.isConstant() && - (Op2Info.isPowerOf2() || Op2Info.isNegatedPowerOf2())) { - InstructionCost Cost = - getArithmeticInstrCost(Instruction::Shl, Ty, CostKind, - Op1Info.getNoProps(), Op2Info.getNoProps()); - if (Op2Info.isNegatedPowerOf2()) - Cost += getArithmeticInstrCost(Instruction::Sub, Ty, CostKind); - return Cost; - } - - // On LoongArch, vector signed division by constants power-of-two are - // normally expanded to the sequence SRA + SRL + ADD + SRA. - // The OperandValue properties may not be the same as that of the previous - // operation; conservatively assume OP_None. - if ((ISD == ISD::SDIV || ISD == ISD::SREM) && Op2Info.isConstant() && - Op2Info.isPowerOf2()) { - InstructionCost Cost = - 2 * getArithmeticInstrCost(Instruction::AShr, Ty, CostKind, - Op1Info.getNoProps(), Op2Info.getNoProps()); - Cost += getArithmeticInstrCost(Instruction::LShr, Ty, CostKind, - Op1Info.getNoProps(), Op2Info.getNoProps()); - Cost += getArithmeticInstrCost(Instruction::Add, Ty, CostKind, - Op1Info.getNoProps(), Op2Info.getNoProps()); - - if (ISD == ISD::SREM) { - // For SREM: (X % C) is the equivalent of (X - (X/C)*C) - Cost += - getArithmeticInstrCost(Instruction::Mul, Ty, CostKind, - Op1Info.getNoProps(), Op2Info.getNoProps()); - Cost += - getArithmeticInstrCost(Instruction::Sub, Ty, CostKind, - Op1Info.getNoProps(), Op2Info.getNoProps()); - } - - return Cost; - } - // Vector unsigned division/remainder will be simplified to shifts/masks. - if ((ISD == ISD::UDIV || ISD == ISD::UREM) && Op2Info.isConstant() && - Op2Info.isPowerOf2()) { - if (ISD == ISD::UDIV) - return getArithmeticInstrCost(Instruction::LShr, Ty, CostKind, - Op1Info.getNoProps(), Op2Info.getNoProps()); - // UREM - return getArithmeticInstrCost(Instruction::And, Ty, CostKind, - Op1Info.getNoProps(), Op2Info.getNoProps()); - } - - static const CostKindTblEntry LSXCostTable[]{ - {ISD::ADD, MVT::v16i8, {1, 1}}, // vaddi.b/vadd.b - {ISD::ADD, MVT::v8i16, {1, 1}}, // vaddi.h/vadd.h - {ISD::ADD, MVT::v4i32, {1, 1}}, // vaddi.w/vadd.w - {ISD::ADD, MVT::v2i64, {1, 1}}, // vaddi.d/vadd.d - - {ISD::SUB, MVT::v16i8, {1, 1}}, // vsubi.b/vsub.b - {ISD::SUB, MVT::v8i16, {1, 1}}, // vsubi.h/vsub.h - {ISD::SUB, MVT::v4i32, {1, 1}}, // vsubi.w/vsub.w - {ISD::SUB, MVT::v2i64, {1, 1}}, // vsubi.d/vsub.d - - {ISD::MUL, MVT::v16i8, {4, 2}}, // vmul.b - {ISD::MUL, MVT::v8i16, {4, 2}}, // vmul.h - {ISD::MUL, MVT::v4i32, {4, 2}}, // vmul.w - {ISD::MUL, MVT::v2i64, {4, 2}}, // vmul.d - - {ISD::SDIV, MVT::v16i8, {29, 62}}, // vdiv.b - {ISD::SDIV, MVT::v8i16, {17, 34}}, // vdiv.h - {ISD::SDIV, MVT::v4i32, {11, 22}}, // vdiv.w - {ISD::SDIV, MVT::v2i64, {8, 16}}, // vdiv.d - - {ISD::UDIV, MVT::v16i8, {29, 66}}, // vdiv.bu - {ISD::UDIV, MVT::v8i16, {17, 36}}, // vdiv.hu - {ISD::UDIV, MVT::v4i32, {11, 22}}, // vdiv.wu - {ISD::UDIV, MVT::v2i64, {8, 16}}, // vdiv.du - - {ISD::SREM, MVT::v16i8, {38, 76}}, // vmod.b - {ISD::SREM, MVT::v8i16, {24, 44}}, // vmod.h - {ISD::SREM, MVT::v4i32, {17, 27}}, // vmod.w - {ISD::SREM, MVT::v2i64, {14, 19}}, // vmod.d - - {ISD::UREM, MVT::v16i8, {38, 80}}, // vmod.bu - {ISD::UREM, MVT::v8i16, {24, 44}}, // vmod.hu - {ISD::UREM, MVT::v4i32, {17, 28}}, // vmod.wu - {ISD::UREM, MVT::v2i64, {14, 19}}, // vmod.du - - {ISD::SHL, MVT::v16i8, {1, 1}}, // vslli.b/vsll.b - {ISD::SHL, MVT::v8i16, {1, 1}}, // vslli.h/vsll.h - {ISD::SHL, MVT::v4i32, {1, 1}}, // vslli.w/vsll.w - {ISD::SHL, MVT::v2i64, {1, 1}}, // vslli.d/vsll.d - - {ISD::SRL, MVT::v16i8, {1, 1}}, // vsrli.b/vsrl.b - {ISD::SRL, MVT::v8i16, {1, 1}}, // vsrli.h/vsrl.h - {ISD::SRL, MVT::v4i32, {1, 1}}, // vsrli.w/vsrl.w - {ISD::SRL, MVT::v2i64, {1, 1}}, // vsrli.d/vsrl.d - - {ISD::SRA, MVT::v16i8, {1, 1}}, // vsrai.b/vsra.b - {ISD::SRA, MVT::v8i16, {1, 1}}, // vsrai.h/vsra.h - {ISD::SRA, MVT::v4i32, {1, 1}}, // vsrai.w/vsra.w - {ISD::SRA, MVT::v2i64, {1, 1}}, // vsrai.d/vsra.d - - {ISD::AND, MVT::v16i8, {1, 1}}, // vand.b/vand.v - {ISD::AND, MVT::v8i16, {1, 1}}, // vand.v - {ISD::AND, MVT::v4i32, {1, 1}}, // vand.v - {ISD::AND, MVT::v2i64, {1, 1}}, // vand.v - - {ISD::OR, MVT::v16i8, {1, 1}}, // vori.b/vor.v - {ISD::OR, MVT::v8i16, {1, 1}}, // vor.v - {ISD::OR, MVT::v4i32, {1, 1}}, // vor.v - {ISD::OR, MVT::v2i64, {1, 1}}, // vor.v - - {ISD::XOR, MVT::v16i8, {1, 1}}, // vxori.b/vxor.v - {ISD::XOR, MVT::v8i16, {1, 1}}, // vxor.v - {ISD::XOR, MVT::v4i32, {1, 1}}, // vxor.v - {ISD::XOR, MVT::v2i64, {1, 1}}, // vxor.v - - {ISD::FADD, MVT::v4f32, {3, 1}}, // vfadd.s - {ISD::FADD, MVT::v2f64, {3, 1}}, // vfadd.d - - {ISD::FSUB, MVT::v4f32, {3, 1}}, // vfsub.s - {ISD::FSUB, MVT::v2f64, {3, 1}}, // vfsub.d - - {ISD::FMUL, MVT::v4f32, {5, 2}}, // vfmul.s - {ISD::FMUL, MVT::v2f64, {5, 2}}, // vfmul.d - - {ISD::FDIV, MVT::v4f32, {11, 22}}, // vfdiv.s - {ISD::FDIV, MVT::v2f64, {8, 16}}, // vfdiv.d - }; - - if (ST->hasExtLSX()) { - if (const auto *Entry = CostTableLookup(LSXCostTable, ISD, LT.second)) - if (auto KindCost = Entry->Cost[CostKind]) - return LT.first * *KindCost; - } - - static const CostKindTblEntry LASXUniformConstCostTable[]{ - {ISD::ADD, MVT::v32i8, {1, 1}}, // xvaddi.b/xvadd.b - {ISD::ADD, MVT::v16i16, {1, 1}}, // xvaddi.h/xvadd.h - {ISD::ADD, MVT::v8i32, {1, 1}}, // xvaddi.w/xvadd.w - {ISD::ADD, MVT::v4i64, {1, 1}}, // xvaddi.d/xvadd.d - - {ISD::SUB, MVT::v32i8, {1, 1}}, // xvsubi.b/xvsub.b - {ISD::SUB, MVT::v16i16, {1, 1}}, // xvsubi.h/xvsub.h - {ISD::SUB, MVT::v8i32, {1, 1}}, // xvsubi.w/xvsub.w - {ISD::SUB, MVT::v4i64, {1, 1}}, // xvsubi.d/xvsub.d - - {ISD::MUL, MVT::v32i8, {4, 2}}, // xvmul.b - {ISD::MUL, MVT::v16i16, {4, 2}}, // xvmul.h - {ISD::MUL, MVT::v8i32, {4, 2}}, // xvmul.w - {ISD::MUL, MVT::v4i64, {4, 2}}, // xvmul.d - - {ISD::SDIV, MVT::v32i8, {29, 62}}, // xvdiv.b - {ISD::SDIV, MVT::v16i16, {17, 34}}, // xvdiv.h - {ISD::SDIV, MVT::v8i32, {11, 22}}, // xvdiv.w - {ISD::SDIV, MVT::v4i64, {8, 16}}, // xvdiv.d - - {ISD::UDIV, MVT::v32i8, {29, 66}}, // xvdiv.bu - {ISD::UDIV, MVT::v16i16, {17, 36}}, // xvdiv.hu - {ISD::UDIV, MVT::v8i32, {11, 22}}, // xvdiv.wu - {ISD::UDIV, MVT::v4i64, {8, 16}}, // xvdiv.du - - {ISD::SREM, MVT::v32i8, {38, 76}}, // xvmod.b - {ISD::SREM, MVT::v16i16, {24, 44}}, // xvmod.h - {ISD::SREM, MVT::v8i32, {17, 28}}, // xvmod.w - {ISD::SREM, MVT::v4i64, {14, 19}}, // xvmod.d - - {ISD::UREM, MVT::v32i8, {38, 76}}, // xvmod.bu - {ISD::UREM, MVT::v16i16, {24, 43}}, // xvmod.hu - {ISD::UREM, MVT::v8i32, {17, 28}}, // xvmod.wu - {ISD::UREM, MVT::v4i64, {14, 19}}, // xvmod.du - - {ISD::SHL, MVT::v32i8, {1, 1}}, // xvslli.b/xvsll.b - {ISD::SHL, MVT::v16i16, {1, 1}}, // xvslli.h/xvsll.h - {ISD::SHL, MVT::v8i32, {1, 1}}, // xvslli.w/xvsll.w - {ISD::SHL, MVT::v4i64, {1, 1}}, // xvslli.d/xvsll.d - - {ISD::SRL, MVT::v32i8, {1, 1}}, // xvsrli.b/xvsrl.b - {ISD::SRL, MVT::v16i16, {1, 1}}, // xvsrli.h/xvsrl.h - {ISD::SRL, MVT::v8i32, {1, 1}}, // xvsrli.w/xvsrl.w - {ISD::SRL, MVT::v4i64, {1, 1}}, // xvsrli.d/xvsrl.d - - {ISD::SRA, MVT::v32i8, {1, 1}}, // xvsrai.b/xvsra.b - {ISD::SRA, MVT::v16i16, {1, 1}}, // xvsrai.h/xvsra.h - {ISD::SRA, MVT::v8i32, {1, 1}}, // xvsrai.w/xvsra.w - {ISD::SRA, MVT::v4i64, {1, 1}}, // xvsrai.d/xvsra.d - - {ISD::AND, MVT::v32i8, {1, 1}}, // xvandi.b/xvand.v - {ISD::AND, MVT::v16i16, {1, 1}}, // xvand.v - {ISD::AND, MVT::v8i32, {1, 1}}, // xvand.v - {ISD::AND, MVT::v4i64, {1, 1}}, // xvand.v - - {ISD::OR, MVT::v32i8, {1, 1}}, // xvori.b/xvor.v - {ISD::OR, MVT::v16i16, {1, 1}}, // xvor.v - {ISD::OR, MVT::v8i32, {1, 1}}, // xvor.v - {ISD::OR, MVT::v4i64, {1, 1}}, // xvor.v - - {ISD::XOR, MVT::v32i8, {1, 1}}, // xvxori.b/xvxor.v - {ISD::XOR, MVT::v16i16, {1, 1}}, // xvxor.v - {ISD::XOR, MVT::v8i32, {1, 1}}, // xvxor.v - {ISD::XOR, MVT::v4i64, {1, 1}}, // xvxor.v - - {ISD::FADD, MVT::v8f32, {3, 1}}, // xvfadd.s - {ISD::FADD, MVT::v4f64, {3, 1}}, // xvfadd.d - - {ISD::FSUB, MVT::v8f32, {3, 1}}, // xvfsub.s - {ISD::FSUB, MVT::v4f64, {3, 1}}, // xvfsub.d - - {ISD::FMUL, MVT::v8f32, {5, 2}}, // xvfmul.s - {ISD::FMUL, MVT::v4f64, {5, 2}}, // xvfmul.d - - {ISD::FDIV, MVT::v8f32, {11, 22}}, // xvfdiv.s - {ISD::FDIV, MVT::v4f64, {8, 16}}, // xvfdiv.d - }; - - if (ST->hasExtLASX()) { - if (const auto *Entry = - CostTableLookup(LASXUniformConstCostTable, ISD, LT.second)) - if (auto KindCost = Entry->Cost[CostKind]) - return LT.first * *KindCost; - } - - static const CostKindTblEntry LA64CostTable[]{ - {ISD::ADD, MVT::i64, {1, 1}}, // addi.d/add.d - {ISD::SUB, MVT::i64, {1, 1}}, // subi.d/sub.d - {ISD::MUL, MVT::i64, {4, 2}}, // mul.d - - {ISD::SDIV, MVT::i64, {18, 26}}, // div.d - {ISD::UDIV, MVT::i64, {18, 26}}, // div.du - {ISD::SREM, MVT::i64, {18, 26}}, // mod.d - {ISD::UREM, MVT::i64, {18, 26}}, // mod.du - - {ISD::SHL, MVT::i64, {1, 1}}, // slli.d/sll.d - {ISD::SRL, MVT::i64, {1, 1}}, // srli.d/srl.d - {ISD::SRA, MVT::i64, {1, 1}}, // srai.d/sra.d - - {ISD::AND, MVT::i64, {1, 1}}, // andi.d/and.d - {ISD::OR, MVT::i64, {1, 1}}, // ori.d/or.d - {ISD::XOR, MVT::i64, {1, 1}}, // xori.d/xor.d - - {ISD::FADD, MVT::f64, {3, 1}}, // fadd.d - {ISD::FSUB, MVT::f64, {3, 1}}, // fsub.d - {ISD::FMUL, MVT::f64, {5, 2}}, // fmul.d - {ISD::FDIV, MVT::f64, {12, 9}}, // fdiv.d - }; - - if (ST->is64Bit()) { - if (const auto *Entry = CostTableLookup(LA64CostTable, ISD, LT.second)) - if (auto KindCost = Entry->Cost[CostKind]) - return LT.first * *KindCost; - } - - static const CostKindTblEntry LA32CostTable[]{ - {ISD::ADD, MVT::i32, {1, 1}}, // addi.w/add.w - {ISD::SUB, MVT::i32, {1, 1}}, // subi.w/sub.w - {ISD::MUL, MVT::i32, {4, 2}}, // mul.w - - {ISD::SDIV, MVT::i32, {11, 24}}, // div.w - {ISD::UDIV, MVT::i32, {12, 24}}, // div.wu - {ISD::SREM, MVT::i32, {11, 24}}, // mod.w - {ISD::UREM, MVT::i32, {12, 24}}, // mod.wu - - {ISD::SHL, MVT::i32, {1, 1}}, // slli.w/sll.w - {ISD::SRL, MVT::i32, {1, 1}}, // srli.w/srl.w - {ISD::SRA, MVT::i32, {1, 1}}, // srai.w/sra.w - - {ISD::AND, MVT::i32, {1, 1}}, // andi.w/and.w - {ISD::OR, MVT::i32, {1, 1}}, // ori.w/or.w - {ISD::XOR, MVT::i32, {1, 1}}, // xori.w/xor.w - - {ISD::FADD, MVT::f32, {3, 1}}, // fadd.s - {ISD::FSUB, MVT::f32, {3, 1}}, // fsub.s - {ISD::FMUL, MVT::f32, {5, 2}}, // fmul.s - {ISD::FDIV, MVT::f32, {9, 8}}, // fdiv.s - }; - - if (const auto *Entry = CostTableLookup(LA32CostTable, ISD, LT.second)) - if (auto KindCost = Entry->Cost[CostKind]) - return LT.first * *KindCost; - - // Fallback to the default implementation. - return BaseT::getArithmeticInstrCost(Opcode, Ty, CostKind, Op1Info, Op2Info, - Args, CxtI); -} diff --git a/llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.h b/llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.h index a7773b88bb193..2392b709767ee 100644 --- a/llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.h +++ b/llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.h @@ -56,13 +56,6 @@ class LoongArchTTIImpl : public BasicTTIImplBase<LoongArchTTIImpl> { bool shouldExpandReduction(const IntrinsicInst *II) const override; - InstructionCost getArithmeticInstrCost( - unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind, - TTI::OperandValueInfo Op1Info = {TTI::OK_AnyValue, TTI::OP_None}, - TTI::OperandValueInfo Op2Info = {TTI::OK_AnyValue, TTI::OP_None}, - ArrayRef<const Value *> Args = {}, - const Instruction *CxtI = nullptr) const override; - TTI::MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const override; diff --git a/llvm/test/Analysis/CostModel/LoongArch/arith-fp.ll b/llvm/test/Analysis/CostModel/LoongArch/arith-fp.ll deleted file mode 100644 index ca30f0e8fd7fa..0000000000000 --- a/llvm/test/Analysis/CostModel/LoongArch/arith-fp.ll +++ /dev/null @@ -1,135 +0,0 @@ -; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6 -; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all -mtriple=loongarch64 -mattr=+lsx 2>&1 -disable-output < %s | FileCheck %s --check-prefixes=LSX -; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all -mtriple=loongarch64 -mattr=+lasx 2>&1 -disable-output < %s | FileCheck %s --check-prefixes=LASX - -define void @fadd() { -; LSX-LABEL: 'fadd' -; LSX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V1F32 = fadd float poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V2F32 = fadd <2 x float> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V4F32 = fadd <4 x float> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:6 SizeLat:1 for: %V8F32 = fadd <8 x float> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V1F64 = fadd double poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V2F64 = fadd <2 x double> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:6 SizeLat:1 for: %V4F64 = fadd <4 x double> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret void -; -; LASX-LABEL: 'fadd' -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V1F32 = fadd float poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V2F32 = fadd <2 x float> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V4F32 = fadd <4 x float> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V8F32 = fadd <8 x float> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V1F64 = fadd double poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V2F64 = fadd <2 x double> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V4F64 = fadd <4 x double> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret void -; - %V1F32 = fadd float poison, poison - %V2F32 = fadd <2 x float> poison, poison - %V4F32 = fadd <4 x float> poison, poison - %V8F32 = fadd <8 x float> poison, poison - - %V1F64 = fadd double poison, poison - %V2F64 = fadd <2 x double> poison, poison - %V4F64 = fadd <4 x double> poison, poison - - ret void -} - -define void @fsub() { -; LSX-LABEL: 'fsub' -; LSX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V1F32 = fsub float poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V2F32 = fsub <2 x float> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V4F32 = fsub <4 x float> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:6 SizeLat:1 for: %V8F32 = fsub <8 x float> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V1F64 = fsub double poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V2F64 = fsub <2 x double> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:6 SizeLat:1 for: %V4F64 = fsub <4 x double> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret void -; -; LASX-LABEL: 'fsub' -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V1F32 = fsub float poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V2F32 = fsub <2 x float> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V4F32 = fsub <4 x float> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V8F32 = fsub <8 x float> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V1F64 = fsub double poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V2F64 = fsub <2 x double> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %V4F64 = fsub <4 x double> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret void -; - %V1F32 = fsub float poison, poison - %V2F32 = fsub <2 x float> poison, poison - %V4F32 = fsub <4 x float> poison, poison - %V8F32 = fsub <8 x float> poison, poison - - %V1F64 = fsub double poison, poison - %V2F64 = fsub <2 x double> poison, poison - %V4F64 = fsub <4 x double> poison, poison - - ret void -} - -define void @fmul() { -; LSX-LABEL: 'fmul' -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %V1F32 = fmul float poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %V2F32 = fmul <2 x float> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %V4F32 = fmul <4 x float> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:10 SizeLat:1 for: %V8F32 = fmul <8 x float> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %V1F64 = fmul double poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %V2F64 = fmul <2 x double> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:10 SizeLat:1 for: %V4F64 = fmul <4 x double> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret void -; -; LASX-LABEL: 'fmul' -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %V1F32 = fmul float poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %V2F32 = fmul <2 x float> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %V4F32 = fmul <4 x float> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %V8F32 = fmul <8 x float> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %V1F64 = fmul double poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %V2F64 = fmul <2 x double> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:5 SizeLat:1 for: %V4F64 = fmul <4 x double> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret void -; - %V1F32 = fmul float poison, poison - %V2F32 = fmul <2 x float> poison, poison - %V4F32 = fmul <4 x float> poison, poison - %V8F32 = fmul <8 x float> poison, poison - - %V1F64 = fmul double poison, poison - %V2F64 = fmul <2 x double> poison, poison - %V4F64 = fmul <4 x double> poison, poison - - ret void -} - -define void @fdiv() { -; LSX-LABEL: 'fdiv' -; LSX-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:9 SizeLat:4 for: %V1F32 = fdiv float poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V2F32 = fdiv <2 x float> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V4F32 = fdiv <4 x float> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:22 SizeLat:4 for: %V8F32 = fdiv <8 x float> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:9 CodeSize:4 Lat:12 SizeLat:4 for: %V1F64 = fdiv double poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:16 CodeSize:4 Lat:8 SizeLat:4 for: %V2F64 = fdiv <2 x double> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:32 CodeSize:4 Lat:16 SizeLat:4 for: %V4F64 = fdiv <4 x double> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret void -; -; LASX-LABEL: 'fdiv' -; LASX-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:9 SizeLat:4 for: %V1F32 = fdiv float poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V2F32 = fdiv <2 x float> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V4F32 = fdiv <4 x float> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V8F32 = fdiv <8 x float> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:9 CodeSize:4 Lat:12 SizeLat:4 for: %V1F64 = fdiv double poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:16 CodeSize:4 Lat:8 SizeLat:4 for: %V2F64 = fdiv <2 x double> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:16 CodeSize:4 Lat:8 SizeLat:4 for: %V4F64 = fdiv <4 x double> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret void -; - %V1F32 = fdiv float poison, poison - %V2F32 = fdiv <2 x float> poison, poison - %V4F32 = fdiv <4 x float> poison, poison - %V8F32 = fdiv <8 x float> poison, poison - - %V1F64 = fdiv double poison, poison - %V2F64 = fdiv <2 x double> poison, poison - %V4F64 = fdiv <4 x double> poison, poison - - ret void -} diff --git a/llvm/test/Analysis/CostModel/LoongArch/arith-int.ll b/llvm/test/Analysis/CostModel/LoongArch/arith-int.ll deleted file mode 100644 index 1cbf0287c32d6..0000000000000 --- a/llvm/test/Analysis/CostModel/LoongArch/arith-int.ll +++ /dev/null @@ -1,1161 +0,0 @@ -; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6 - -; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all -mtriple=loongarch64 -mattr=+lsx 2>&1 -disable-output < %s | FileCheck %s --check-prefixes=LSX -; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all -mtriple=loongarch64 -mattr=+lasx 2>&1 -disable-output < %s | FileCheck %s --check-prefixes=LASX - -define i32 @add() { -; LSX-LABEL: 'add' -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = add i8 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = add <2 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = add <4 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = add <8 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = add <16 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V32I8 = add <32 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = add i16 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = add <2 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = add <4 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = add <8 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V16I16 = add <16 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = add i32 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = add <2 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = add <4 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V8I32 = add <8 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = add i64 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = add <2 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V4I64 = add <4 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'add' -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = add i8 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = add <2 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = add <4 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = add <8 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = add <16 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V32I8 = add <32 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = add i16 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = add <2 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = add <4 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = add <8 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I16 = add <16 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = add i32 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = add <2 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = add <4 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I32 = add <8 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = add i64 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = add <2 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I64 = add <4 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = add i8 poison, poison - %V2I8 = add <2 x i8> poison, poison - %V4I8 = add <4 x i8> poison, poison - %V8I8 = add <8 x i8> poison, poison - %V16I8 = add <16 x i8> poison, poison - %V32I8 = add <32 x i8> poison, poison - - %V1I16 = add i16 poison, poison - %V2I16 = add <2 x i16> poison, poison - %V4I16 = add <4 x i16> poison, poison - %V8I16 = add <8 x i16> poison, poison - %V16I16 = add <16 x i16> poison, poison - - %V1I32 = add i32 poison, poison - %V2I32 = add <2 x i32> poison, poison - %V4I32 = add <4 x i32> poison, poison - %V8I32 = add <8 x i32> poison, poison - - %V1I64 = add i64 poison, poison - %V2I64 = add <2 x i64> poison, poison - %V4I64 = add <4 x i64> poison, poison - - ret i32 poison -} - -define i32 @sub() { -; LSX-LABEL: 'sub' -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = sub i8 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = sub <2 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = sub <4 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = sub <8 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = sub <16 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V32I8 = sub <32 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = sub i16 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = sub <2 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = sub <4 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = sub <8 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V16I16 = sub <16 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = sub i32 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = sub <2 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = sub <4 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V8I32 = sub <8 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = sub i64 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = sub <2 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V4I64 = sub <4 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'sub' -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = sub i8 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = sub <2 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = sub <4 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = sub <8 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = sub <16 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V32I8 = sub <32 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = sub i16 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = sub <2 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = sub <4 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = sub <8 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I16 = sub <16 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = sub i32 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = sub <2 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = sub <4 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I32 = sub <8 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = sub i64 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = sub <2 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I64 = sub <4 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = sub i8 poison, poison - %V2I8 = sub <2 x i8> poison, poison - %V4I8 = sub <4 x i8> poison, poison - %V8I8 = sub <8 x i8> poison, poison - %V16I8 = sub <16 x i8> poison, poison - %V32I8 = sub <32 x i8> poison, poison - - %V1I16 = sub i16 poison, poison - %V2I16 = sub <2 x i16> poison, poison - %V4I16 = sub <4 x i16> poison, poison - %V8I16 = sub <8 x i16> poison, poison - %V16I16 = sub <16 x i16> poison, poison - - %V1I32 = sub i32 poison, poison - %V2I32 = sub <2 x i32> poison, poison - %V4I32 = sub <4 x i32> poison, poison - %V8I32 = sub <8 x i32> poison, poison - - %V1I64 = sub i64 poison, poison - %V2I64 = sub <2 x i64> poison, poison - %V4I64 = sub <4 x i64> poison, poison - - ret i32 poison -} - -define i32 @mul() { -; LSX-LABEL: 'mul' -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V1I8 = mul i8 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V2I8 = mul <2 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V4I8 = mul <4 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V8I8 = mul <8 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V16I8 = mul <16 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:8 SizeLat:1 for: %V32I8 = mul <32 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V1I16 = mul i16 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V2I16 = mul <2 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V4I16 = mul <4 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V8I16 = mul <8 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:8 SizeLat:1 for: %V16I16 = mul <16 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V1I32 = mul i32 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V2I32 = mul <2 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V4I32 = mul <4 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:8 SizeLat:1 for: %V8I32 = mul <8 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V1I64 = mul i64 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V2I64 = mul <2 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:4 CodeSize:1 Lat:8 SizeLat:1 for: %V4I64 = mul <4 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'mul' -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V1I8 = mul i8 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V2I8 = mul <2 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V4I8 = mul <4 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V8I8 = mul <8 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V16I8 = mul <16 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V32I8 = mul <32 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V1I16 = mul i16 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V2I16 = mul <2 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V4I16 = mul <4 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V8I16 = mul <8 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V16I16 = mul <16 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V1I32 = mul i32 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V2I32 = mul <2 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V4I32 = mul <4 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V8I32 = mul <8 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V1I64 = mul i64 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V2I64 = mul <2 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:4 SizeLat:1 for: %V4I64 = mul <4 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = mul i8 poison, poison - %V2I8 = mul <2 x i8> poison, poison - %V4I8 = mul <4 x i8> poison, poison - %V8I8 = mul <8 x i8> poison, poison - %V16I8 = mul <16 x i8> poison, poison - %V32I8 = mul <32 x i8> poison, poison - - %V1I16 = mul i16 poison, poison - %V2I16 = mul <2 x i16> poison, poison - %V4I16 = mul <4 x i16> poison, poison - %V8I16 = mul <8 x i16> poison, poison - %V16I16 = mul <16 x i16> poison, poison - - %V1I32 = mul i32 poison, poison - %V2I32 = mul <2 x i32> poison, poison - %V4I32 = mul <4 x i32> poison, poison - %V8I32 = mul <8 x i32> poison, poison - - %V1I64 = mul i64 poison, poison - %V2I64 = mul <2 x i64> poison, poison - %V4I64 = mul <4 x i64> poison, poison - - ret i32 poison -} - -define i32 @sdiv() { -; LSX-LABEL: 'sdiv' -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I8 = sdiv i8 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:62 CodeSize:4 Lat:29 SizeLat:4 for: %V2I8 = sdiv <2 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:62 CodeSize:4 Lat:29 SizeLat:4 for: %V4I8 = sdiv <4 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:62 CodeSize:4 Lat:29 SizeLat:4 for: %V8I8 = sdiv <8 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:62 CodeSize:4 Lat:29 SizeLat:4 for: %V16I8 = sdiv <16 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:124 CodeSize:4 Lat:58 SizeLat:4 for: %V32I8 = sdiv <32 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I16 = sdiv i16 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:34 CodeSize:4 Lat:17 SizeLat:4 for: %V2I16 = sdiv <2 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:34 CodeSize:4 Lat:17 SizeLat:4 for: %V4I16 = sdiv <4 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:34 CodeSize:4 Lat:17 SizeLat:4 for: %V8I16 = sdiv <8 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:68 CodeSize:4 Lat:34 SizeLat:4 for: %V16I16 = sdiv <16 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I32 = sdiv i32 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V2I32 = sdiv <2 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V4I32 = sdiv <4 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:22 SizeLat:4 for: %V8I32 = sdiv <8 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I64 = sdiv i64 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:16 CodeSize:4 Lat:8 SizeLat:4 for: %V2I64 = sdiv <2 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:32 CodeSize:4 Lat:16 SizeLat:4 for: %V4I64 = sdiv <4 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'sdiv' -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I8 = sdiv i8 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:62 CodeSize:4 Lat:29 SizeLat:4 for: %V2I8 = sdiv <2 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:62 CodeSize:4 Lat:29 SizeLat:4 for: %V4I8 = sdiv <4 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:62 CodeSize:4 Lat:29 SizeLat:4 for: %V8I8 = sdiv <8 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:62 CodeSize:4 Lat:29 SizeLat:4 for: %V16I8 = sdiv <16 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:62 CodeSize:4 Lat:29 SizeLat:4 for: %V32I8 = sdiv <32 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I16 = sdiv i16 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:34 CodeSize:4 Lat:17 SizeLat:4 for: %V2I16 = sdiv <2 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:34 CodeSize:4 Lat:17 SizeLat:4 for: %V4I16 = sdiv <4 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:34 CodeSize:4 Lat:17 SizeLat:4 for: %V8I16 = sdiv <8 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:34 CodeSize:4 Lat:17 SizeLat:4 for: %V16I16 = sdiv <16 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I32 = sdiv i32 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V2I32 = sdiv <2 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V4I32 = sdiv <4 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V8I32 = sdiv <8 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I64 = sdiv i64 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:16 CodeSize:4 Lat:8 SizeLat:4 for: %V2I64 = sdiv <2 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:16 CodeSize:4 Lat:8 SizeLat:4 for: %V4I64 = sdiv <4 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = sdiv i8 poison, poison - %V2I8 = sdiv <2 x i8> poison, poison - %V4I8 = sdiv <4 x i8> poison, poison - %V8I8 = sdiv <8 x i8> poison, poison - %V16I8 = sdiv <16 x i8> poison, poison - %V32I8 = sdiv <32 x i8> poison, poison - - %V1I16 = sdiv i16 poison, poison - %V2I16 = sdiv <2 x i16> poison, poison - %V4I16 = sdiv <4 x i16> poison, poison - %V8I16 = sdiv <8 x i16> poison, poison - %V16I16 = sdiv <16 x i16> poison, poison - - %V1I32 = sdiv i32 poison, poison - %V2I32 = sdiv <2 x i32> poison, poison - %V4I32 = sdiv <4 x i32> poison, poison - %V8I32 = sdiv <8 x i32> poison, poison - - %V1I64 = sdiv i64 poison, poison - %V2I64 = sdiv <2 x i64> poison, poison - %V4I64 = sdiv <4 x i64> poison, poison - - ret i32 poison -} - -define i32 @udiv() { -; LSX-LABEL: 'udiv' -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I8 = udiv i8 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:66 CodeSize:4 Lat:29 SizeLat:4 for: %V2I8 = udiv <2 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:66 CodeSize:4 Lat:29 SizeLat:4 for: %V4I8 = udiv <4 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:66 CodeSize:4 Lat:29 SizeLat:4 for: %V8I8 = udiv <8 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:66 CodeSize:4 Lat:29 SizeLat:4 for: %V16I8 = udiv <16 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:132 CodeSize:4 Lat:58 SizeLat:4 for: %V32I8 = udiv <32 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I16 = udiv i16 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:36 CodeSize:4 Lat:17 SizeLat:4 for: %V2I16 = udiv <2 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:36 CodeSize:4 Lat:17 SizeLat:4 for: %V4I16 = udiv <4 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:36 CodeSize:4 Lat:17 SizeLat:4 for: %V8I16 = udiv <8 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:72 CodeSize:4 Lat:34 SizeLat:4 for: %V16I16 = udiv <16 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I32 = udiv i32 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V2I32 = udiv <2 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V4I32 = udiv <4 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:22 SizeLat:4 for: %V8I32 = udiv <8 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I64 = udiv i64 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:16 CodeSize:4 Lat:8 SizeLat:4 for: %V2I64 = udiv <2 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:32 CodeSize:4 Lat:16 SizeLat:4 for: %V4I64 = udiv <4 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'udiv' -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I8 = udiv i8 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:66 CodeSize:4 Lat:29 SizeLat:4 for: %V2I8 = udiv <2 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:66 CodeSize:4 Lat:29 SizeLat:4 for: %V4I8 = udiv <4 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:66 CodeSize:4 Lat:29 SizeLat:4 for: %V8I8 = udiv <8 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:66 CodeSize:4 Lat:29 SizeLat:4 for: %V16I8 = udiv <16 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:66 CodeSize:4 Lat:29 SizeLat:4 for: %V32I8 = udiv <32 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I16 = udiv i16 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:36 CodeSize:4 Lat:17 SizeLat:4 for: %V2I16 = udiv <2 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:36 CodeSize:4 Lat:17 SizeLat:4 for: %V4I16 = udiv <4 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:36 CodeSize:4 Lat:17 SizeLat:4 for: %V8I16 = udiv <8 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:36 CodeSize:4 Lat:17 SizeLat:4 for: %V16I16 = udiv <16 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I32 = udiv i32 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V2I32 = udiv <2 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V4I32 = udiv <4 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:22 CodeSize:4 Lat:11 SizeLat:4 for: %V8I32 = udiv <8 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I64 = udiv i64 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:16 CodeSize:4 Lat:8 SizeLat:4 for: %V2I64 = udiv <2 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:16 CodeSize:4 Lat:8 SizeLat:4 for: %V4I64 = udiv <4 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = udiv i8 poison, poison - %V2I8 = udiv <2 x i8> poison, poison - %V4I8 = udiv <4 x i8> poison, poison - %V8I8 = udiv <8 x i8> poison, poison - %V16I8 = udiv <16 x i8> poison, poison - %V32I8 = udiv <32 x i8> poison, poison - - %V1I16 = udiv i16 poison, poison - %V2I16 = udiv <2 x i16> poison, poison - %V4I16 = udiv <4 x i16> poison, poison - %V8I16 = udiv <8 x i16> poison, poison - %V16I16 = udiv <16 x i16> poison, poison - - %V1I32 = udiv i32 poison, poison - %V2I32 = udiv <2 x i32> poison, poison - %V4I32 = udiv <4 x i32> poison, poison - %V8I32 = udiv <8 x i32> poison, poison - - %V1I64 = udiv i64 poison, poison - %V2I64 = udiv <2 x i64> poison, poison - %V4I64 = udiv <4 x i64> poison, poison - - ret i32 poison -} - -define i32 @srem() { -; LSX-LABEL: 'srem' -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I8 = srem i8 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:76 CodeSize:4 Lat:38 SizeLat:4 for: %V2I8 = srem <2 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:76 CodeSize:4 Lat:38 SizeLat:4 for: %V4I8 = srem <4 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:76 CodeSize:4 Lat:38 SizeLat:4 for: %V8I8 = srem <8 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:76 CodeSize:4 Lat:38 SizeLat:4 for: %V16I8 = srem <16 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:152 CodeSize:4 Lat:76 SizeLat:4 for: %V32I8 = srem <32 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I16 = srem i16 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:24 SizeLat:4 for: %V2I16 = srem <2 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:24 SizeLat:4 for: %V4I16 = srem <4 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:24 SizeLat:4 for: %V8I16 = srem <8 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:88 CodeSize:4 Lat:48 SizeLat:4 for: %V16I16 = srem <16 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I32 = srem i32 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:27 CodeSize:4 Lat:17 SizeLat:4 for: %V2I32 = srem <2 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:27 CodeSize:4 Lat:17 SizeLat:4 for: %V4I32 = srem <4 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:54 CodeSize:4 Lat:34 SizeLat:4 for: %V8I32 = srem <8 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I64 = srem i64 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:19 CodeSize:4 Lat:14 SizeLat:4 for: %V2I64 = srem <2 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:38 CodeSize:4 Lat:28 SizeLat:4 for: %V4I64 = srem <4 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'srem' -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I8 = srem i8 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:76 CodeSize:4 Lat:38 SizeLat:4 for: %V2I8 = srem <2 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:76 CodeSize:4 Lat:38 SizeLat:4 for: %V4I8 = srem <4 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:76 CodeSize:4 Lat:38 SizeLat:4 for: %V8I8 = srem <8 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:76 CodeSize:4 Lat:38 SizeLat:4 for: %V16I8 = srem <16 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:76 CodeSize:4 Lat:38 SizeLat:4 for: %V32I8 = srem <32 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I16 = srem i16 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:24 SizeLat:4 for: %V2I16 = srem <2 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:24 SizeLat:4 for: %V4I16 = srem <4 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:24 SizeLat:4 for: %V8I16 = srem <8 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:24 SizeLat:4 for: %V16I16 = srem <16 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I32 = srem i32 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:27 CodeSize:4 Lat:17 SizeLat:4 for: %V2I32 = srem <2 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:27 CodeSize:4 Lat:17 SizeLat:4 for: %V4I32 = srem <4 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:28 CodeSize:4 Lat:17 SizeLat:4 for: %V8I32 = srem <8 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I64 = srem i64 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:19 CodeSize:4 Lat:14 SizeLat:4 for: %V2I64 = srem <2 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:19 CodeSize:4 Lat:14 SizeLat:4 for: %V4I64 = srem <4 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = srem i8 poison, poison - %V2I8 = srem <2 x i8> poison, poison - %V4I8 = srem <4 x i8> poison, poison - %V8I8 = srem <8 x i8> poison, poison - %V16I8 = srem <16 x i8> poison, poison - %V32I8 = srem <32 x i8> poison, poison - - %V1I16 = srem i16 poison, poison - %V2I16 = srem <2 x i16> poison, poison - %V4I16 = srem <4 x i16> poison, poison - %V8I16 = srem <8 x i16> poison, poison - %V16I16 = srem <16 x i16> poison, poison - - %V1I32 = srem i32 poison, poison - %V2I32 = srem <2 x i32> poison, poison - %V4I32 = srem <4 x i32> poison, poison - %V8I32 = srem <8 x i32> poison, poison - - %V1I64 = srem i64 poison, poison - %V2I64 = srem <2 x i64> poison, poison - %V4I64 = srem <4 x i64> poison, poison - - ret i32 poison -} - -define i32 @urem() { -; LSX-LABEL: 'urem' -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I8 = urem i8 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:80 CodeSize:4 Lat:38 SizeLat:4 for: %V2I8 = urem <2 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:80 CodeSize:4 Lat:38 SizeLat:4 for: %V4I8 = urem <4 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:80 CodeSize:4 Lat:38 SizeLat:4 for: %V8I8 = urem <8 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:80 CodeSize:4 Lat:38 SizeLat:4 for: %V16I8 = urem <16 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:160 CodeSize:4 Lat:76 SizeLat:4 for: %V32I8 = urem <32 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I16 = urem i16 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:24 SizeLat:4 for: %V2I16 = urem <2 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:24 SizeLat:4 for: %V4I16 = urem <4 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:24 SizeLat:4 for: %V8I16 = urem <8 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:88 CodeSize:4 Lat:48 SizeLat:4 for: %V16I16 = urem <16 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I32 = urem i32 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:28 CodeSize:4 Lat:17 SizeLat:4 for: %V2I32 = urem <2 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:28 CodeSize:4 Lat:17 SizeLat:4 for: %V4I32 = urem <4 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:56 CodeSize:4 Lat:34 SizeLat:4 for: %V8I32 = urem <8 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I64 = urem i64 poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:19 CodeSize:4 Lat:14 SizeLat:4 for: %V2I64 = urem <2 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:38 CodeSize:4 Lat:28 SizeLat:4 for: %V4I64 = urem <4 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'urem' -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I8 = urem i8 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:80 CodeSize:4 Lat:38 SizeLat:4 for: %V2I8 = urem <2 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:80 CodeSize:4 Lat:38 SizeLat:4 for: %V4I8 = urem <4 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:80 CodeSize:4 Lat:38 SizeLat:4 for: %V8I8 = urem <8 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:80 CodeSize:4 Lat:38 SizeLat:4 for: %V16I8 = urem <16 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:76 CodeSize:4 Lat:38 SizeLat:4 for: %V32I8 = urem <32 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I16 = urem i16 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:24 SizeLat:4 for: %V2I16 = urem <2 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:24 SizeLat:4 for: %V4I16 = urem <4 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:44 CodeSize:4 Lat:24 SizeLat:4 for: %V8I16 = urem <8 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:43 CodeSize:4 Lat:24 SizeLat:4 for: %V16I16 = urem <16 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I32 = urem i32 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:28 CodeSize:4 Lat:17 SizeLat:4 for: %V2I32 = urem <2 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:28 CodeSize:4 Lat:17 SizeLat:4 for: %V4I32 = urem <4 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:28 CodeSize:4 Lat:17 SizeLat:4 for: %V8I32 = urem <8 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:26 CodeSize:4 Lat:18 SizeLat:4 for: %V1I64 = urem i64 poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:19 CodeSize:4 Lat:14 SizeLat:4 for: %V2I64 = urem <2 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of RThru:19 CodeSize:4 Lat:14 SizeLat:4 for: %V4I64 = urem <4 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = urem i8 poison, poison - %V2I8 = urem <2 x i8> poison, poison - %V4I8 = urem <4 x i8> poison, poison - %V8I8 = urem <8 x i8> poison, poison - %V16I8 = urem <16 x i8> poison, poison - %V32I8 = urem <32 x i8> poison, poison - - %V1I16 = urem i16 poison, poison - %V2I16 = urem <2 x i16> poison, poison - %V4I16 = urem <4 x i16> poison, poison - %V8I16 = urem <8 x i16> poison, poison - %V16I16 = urem <16 x i16> poison, poison - - %V1I32 = urem i32 poison, poison - %V2I32 = urem <2 x i32> poison, poison - %V4I32 = urem <4 x i32> poison, poison - %V8I32 = urem <8 x i32> poison, poison - - %V1I64 = urem i64 poison, poison - %V2I64 = urem <2 x i64> poison, poison - %V4I64 = urem <4 x i64> poison, poison - - ret i32 poison -} - -define i32 @and() { -; LSX-LABEL: 'and' -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = and i8 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = and <2 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = and <4 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = and <8 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = and <16 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V32I8 = and <32 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = and i16 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = and <2 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = and <4 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = and <8 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V16I16 = and <16 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = and i32 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = and <2 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = and <4 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V8I32 = and <8 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = and i64 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = and <2 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V4I64 = and <4 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'and' -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = and i8 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = and <2 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = and <4 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = and <8 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = and <16 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V32I8 = and <32 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = and i16 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = and <2 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = and <4 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = and <8 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I16 = and <16 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = and i32 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = and <2 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = and <4 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I32 = and <8 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = and i64 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = and <2 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I64 = and <4 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = and i8 poison, poison - %V2I8 = and <2 x i8> poison, poison - %V4I8 = and <4 x i8> poison, poison - %V8I8 = and <8 x i8> poison, poison - %V16I8 = and <16 x i8> poison, poison - %V32I8 = and <32 x i8> poison, poison - - %V1I16 = and i16 poison, poison - %V2I16 = and <2 x i16> poison, poison - %V4I16 = and <4 x i16> poison, poison - %V8I16 = and <8 x i16> poison, poison - %V16I16 = and <16 x i16> poison, poison - - %V1I32 = and i32 poison, poison - %V2I32 = and <2 x i32> poison, poison - %V4I32 = and <4 x i32> poison, poison - %V8I32 = and <8 x i32> poison, poison - - %V1I64 = and i64 poison, poison - %V2I64 = and <2 x i64> poison, poison - %V4I64 = and <4 x i64> poison, poison - - ret i32 poison -} - -define i32 @or() { -; LSX-LABEL: 'or' -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = or i8 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = or <2 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = or <4 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = or <8 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = or <16 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V32I8 = or <32 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = or i16 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = or <2 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = or <4 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = or <8 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V16I16 = or <16 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = or i32 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = or <2 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = or <4 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V8I32 = or <8 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = or i64 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = or <2 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V4I64 = or <4 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'or' -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = or i8 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = or <2 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = or <4 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = or <8 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = or <16 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V32I8 = or <32 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = or i16 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = or <2 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = or <4 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = or <8 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I16 = or <16 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = or i32 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = or <2 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = or <4 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I32 = or <8 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = or i64 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = or <2 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I64 = or <4 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = or i8 poison, poison - %V2I8 = or <2 x i8> poison, poison - %V4I8 = or <4 x i8> poison, poison - %V8I8 = or <8 x i8> poison, poison - %V16I8 = or <16 x i8> poison, poison - %V32I8 = or <32 x i8> poison, poison - - %V1I16 = or i16 poison, poison - %V2I16 = or <2 x i16> poison, poison - %V4I16 = or <4 x i16> poison, poison - %V8I16 = or <8 x i16> poison, poison - %V16I16 = or <16 x i16> poison, poison - - %V1I32 = or i32 poison, poison - %V2I32 = or <2 x i32> poison, poison - %V4I32 = or <4 x i32> poison, poison - %V8I32 = or <8 x i32> poison, poison - - %V1I64 = or i64 poison, poison - %V2I64 = or <2 x i64> poison, poison - %V4I64 = or <4 x i64> poison, poison - - ret i32 poison -} - -define i32 @xor() { -; LSX-LABEL: 'xor' -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = xor i8 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = xor <2 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = xor <4 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = xor <8 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = xor <16 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V32I8 = xor <32 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = xor i16 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = xor <2 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = xor <4 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = xor <8 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V16I16 = xor <16 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = xor i32 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = xor <2 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = xor <4 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V8I32 = xor <8 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = xor i64 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = xor <2 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V4I64 = xor <4 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'xor' -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = xor i8 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = xor <2 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = xor <4 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = xor <8 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = xor <16 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V32I8 = xor <32 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = xor i16 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = xor <2 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = xor <4 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = xor <8 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I16 = xor <16 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = xor i32 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = xor <2 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = xor <4 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I32 = xor <8 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = xor i64 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = xor <2 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I64 = xor <4 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = xor i8 poison, poison - %V2I8 = xor <2 x i8> poison, poison - %V4I8 = xor <4 x i8> poison, poison - %V8I8 = xor <8 x i8> poison, poison - %V16I8 = xor <16 x i8> poison, poison - %V32I8 = xor <32 x i8> poison, poison - - %V1I16 = xor i16 poison, poison - %V2I16 = xor <2 x i16> poison, poison - %V4I16 = xor <4 x i16> poison, poison - %V8I16 = xor <8 x i16> poison, poison - %V16I16 = xor <16 x i16> poison, poison - - %V1I32 = xor i32 poison, poison - %V2I32 = xor <2 x i32> poison, poison - %V4I32 = xor <4 x i32> poison, poison - %V8I32 = xor <8 x i32> poison, poison - - %V1I64 = xor i64 poison, poison - %V2I64 = xor <2 x i64> poison, poison - %V4I64 = xor <4 x i64> poison, poison - - ret i32 poison -} - -define i32 @shl() { -; LSX-LABEL: 'shl' -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = shl i8 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = shl <2 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = shl <4 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = shl <8 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = shl <16 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V32I8 = shl <32 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = shl i16 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = shl <2 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = shl <4 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = shl <8 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V16I16 = shl <16 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = shl i32 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = shl <2 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = shl <4 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V8I32 = shl <8 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = shl i64 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = shl <2 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V4I64 = shl <4 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'shl' -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = shl i8 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = shl <2 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = shl <4 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = shl <8 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = shl <16 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V32I8 = shl <32 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = shl i16 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = shl <2 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = shl <4 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = shl <8 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I16 = shl <16 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = shl i32 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = shl <2 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = shl <4 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I32 = shl <8 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = shl i64 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = shl <2 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I64 = shl <4 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = shl i8 poison, poison - %V2I8 = shl <2 x i8> poison, poison - %V4I8 = shl <4 x i8> poison, poison - %V8I8 = shl <8 x i8> poison, poison - %V16I8 = shl <16 x i8> poison, poison - %V32I8 = shl <32 x i8> poison, poison - - %V1I16 = shl i16 poison, poison - %V2I16 = shl <2 x i16> poison, poison - %V4I16 = shl <4 x i16> poison, poison - %V8I16 = shl <8 x i16> poison, poison - %V16I16 = shl <16 x i16> poison, poison - - %V1I32 = shl i32 poison, poison - %V2I32 = shl <2 x i32> poison, poison - %V4I32 = shl <4 x i32> poison, poison - %V8I32 = shl <8 x i32> poison, poison - - %V1I64 = shl i64 poison, poison - %V2I64 = shl <2 x i64> poison, poison - %V4I64 = shl <4 x i64> poison, poison - - ret i32 poison -} - -define i32 @lshr() { -; LSX-LABEL: 'lshr' -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = lshr i8 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = lshr <2 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = lshr <4 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = lshr <8 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = lshr <16 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V32I8 = lshr <32 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = lshr i16 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = lshr <2 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = lshr <4 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = lshr <8 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V16I16 = lshr <16 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = lshr i32 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = lshr <2 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = lshr <4 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V8I32 = lshr <8 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = lshr i64 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = lshr <2 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V4I64 = lshr <4 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'lshr' -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = lshr i8 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = lshr <2 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = lshr <4 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = lshr <8 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = lshr <16 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V32I8 = lshr <32 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = lshr i16 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = lshr <2 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = lshr <4 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = lshr <8 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I16 = lshr <16 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = lshr i32 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = lshr <2 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = lshr <4 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I32 = lshr <8 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = lshr i64 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = lshr <2 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I64 = lshr <4 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = lshr i8 poison, poison - %V2I8 = lshr <2 x i8> poison, poison - %V4I8 = lshr <4 x i8> poison, poison - %V8I8 = lshr <8 x i8> poison, poison - %V16I8 = lshr <16 x i8> poison, poison - %V32I8 = lshr <32 x i8> poison, poison - - %V1I16 = lshr i16 poison, poison - %V2I16 = lshr <2 x i16> poison, poison - %V4I16 = lshr <4 x i16> poison, poison - %V8I16 = lshr <8 x i16> poison, poison - %V16I16 = lshr <16 x i16> poison, poison - - %V1I32 = lshr i32 poison, poison - %V2I32 = lshr <2 x i32> poison, poison - %V4I32 = lshr <4 x i32> poison, poison - %V8I32 = lshr <8 x i32> poison, poison - - %V1I64 = lshr i64 poison, poison - %V2I64 = lshr <2 x i64> poison, poison - %V4I64 = lshr <4 x i64> poison, poison - - ret i32 poison -} - -define i32 @ashr() { -; LSX-LABEL: 'ashr' -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = ashr i8 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = ashr <2 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = ashr <4 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = ashr <8 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = ashr <16 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V32I8 = ashr <32 x i8> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = ashr i16 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = ashr <2 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = ashr <4 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = ashr <8 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V16I16 = ashr <16 x i16> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = ashr i32 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = ashr <2 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = ashr <4 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V8I32 = ashr <8 x i32> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = ashr i64 poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = ashr <2 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V4I64 = ashr <4 x i64> poison, poison -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'ashr' -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = ashr i8 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = ashr <2 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = ashr <4 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = ashr <8 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = ashr <16 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V32I8 = ashr <32 x i8> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = ashr i16 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = ashr <2 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = ashr <4 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = ashr <8 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I16 = ashr <16 x i16> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = ashr i32 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = ashr <2 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = ashr <4 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I32 = ashr <8 x i32> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = ashr i64 poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = ashr <2 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I64 = ashr <4 x i64> poison, poison -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = ashr i8 poison, poison - %V2I8 = ashr <2 x i8> poison, poison - %V4I8 = ashr <4 x i8> poison, poison - %V8I8 = ashr <8 x i8> poison, poison - %V16I8 = ashr <16 x i8> poison, poison - %V32I8 = ashr <32 x i8> poison, poison - - %V1I16 = ashr i16 poison, poison - %V2I16 = ashr <2 x i16> poison, poison - %V4I16 = ashr <4 x i16> poison, poison - %V8I16 = ashr <8 x i16> poison, poison - %V16I16 = ashr <16 x i16> poison, poison - - %V1I32 = ashr i32 poison, poison - %V2I32 = ashr <2 x i32> poison, poison - %V4I32 = ashr <4 x i32> poison, poison - %V8I32 = ashr <8 x i32> poison, poison - - %V1I64 = ashr i64 poison, poison - %V2I64 = ashr <2 x i64> poison, poison - %V4I64 = ashr <4 x i64> poison, poison - - ret i32 poison -} - - -define i32 @sdiv_constant() { -; LSX-LABEL: 'sdiv_constant' -; LSX-NEXT: Cost Model: Found costs of 4 for: %V1I8 = sdiv i8 poison, 2 -; LSX-NEXT: Cost Model: Found costs of 4 for: %V2I8 = sdiv <2 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of 4 for: %V4I8 = sdiv <4 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of 4 for: %V8I8 = sdiv <8 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of 4 for: %V16I8 = sdiv <16 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:4 for: %V32I8 = sdiv <32 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of 4 for: %V1I16 = sdiv i16 poison, 2 -; LSX-NEXT: Cost Model: Found costs of 4 for: %V2I16 = sdiv <2 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of 4 for: %V4I16 = sdiv <4 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of 4 for: %V8I16 = sdiv <8 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:4 for: %V16I16 = sdiv <16 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of 4 for: %V1I32 = sdiv i32 poison, 2 -; LSX-NEXT: Cost Model: Found costs of 4 for: %V2I32 = sdiv <2 x i32> poison, splat (i32 2) -; LSX-NEXT: Cost Model: Found costs of 4 for: %V4I32 = sdiv <4 x i32> poison, splat (i32 2) -; LSX-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:4 for: %V8I32 = sdiv <8 x i32> poison, splat (i32 2) -; LSX-NEXT: Cost Model: Found costs of 4 for: %V1I64 = sdiv i64 poison, 2 -; LSX-NEXT: Cost Model: Found costs of 4 for: %V2I64 = sdiv <2 x i64> poison, splat (i64 2) -; LSX-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:4 for: %V4I64 = sdiv <4 x i64> poison, splat (i64 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'sdiv_constant' -; LASX-NEXT: Cost Model: Found costs of 4 for: %V1I8 = sdiv i8 poison, 2 -; LASX-NEXT: Cost Model: Found costs of 4 for: %V2I8 = sdiv <2 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 4 for: %V4I8 = sdiv <4 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 4 for: %V8I8 = sdiv <8 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 4 for: %V16I8 = sdiv <16 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 4 for: %V32I8 = sdiv <32 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 4 for: %V1I16 = sdiv i16 poison, 2 -; LASX-NEXT: Cost Model: Found costs of 4 for: %V2I16 = sdiv <2 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of 4 for: %V4I16 = sdiv <4 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of 4 for: %V8I16 = sdiv <8 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of 4 for: %V16I16 = sdiv <16 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of 4 for: %V1I32 = sdiv i32 poison, 2 -; LASX-NEXT: Cost Model: Found costs of 4 for: %V2I32 = sdiv <2 x i32> poison, splat (i32 2) -; LASX-NEXT: Cost Model: Found costs of 4 for: %V4I32 = sdiv <4 x i32> poison, splat (i32 2) -; LASX-NEXT: Cost Model: Found costs of 4 for: %V8I32 = sdiv <8 x i32> poison, splat (i32 2) -; LASX-NEXT: Cost Model: Found costs of 4 for: %V1I64 = sdiv i64 poison, 2 -; LASX-NEXT: Cost Model: Found costs of 4 for: %V2I64 = sdiv <2 x i64> poison, splat (i64 2) -; LASX-NEXT: Cost Model: Found costs of 4 for: %V4I64 = sdiv <4 x i64> poison, splat (i64 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = sdiv i8 poison, 2 - %V2I8 = sdiv <2 x i8> poison, splat (i8 2) - %V4I8 = sdiv <4 x i8> poison, splat (i8 2) - %V8I8 = sdiv <8 x i8> poison, splat (i8 2) - %V16I8 = sdiv <16 x i8> poison, splat (i8 2) - %V32I8 = sdiv <32 x i8> poison, splat (i8 2) - - %V1I16 = sdiv i16 poison, 2 - %V2I16 = sdiv <2 x i16> poison, splat (i16 2) - %V4I16 = sdiv <4 x i16> poison, splat (i16 2) - %V8I16 = sdiv <8 x i16> poison, splat (i16 2) - %V16I16 = sdiv <16 x i16> poison, splat (i16 2) - - %V1I32 = sdiv i32 poison, 2 - %V2I32 = sdiv <2 x i32> poison, splat (i32 2) - %V4I32 = sdiv <4 x i32> poison, splat (i32 2) - %V8I32 = sdiv <8 x i32> poison, splat (i32 2) - - %V1I64 = sdiv i64 poison, 2 - %V2I64 = sdiv <2 x i64> poison, splat (i64 2) - %V4I64 = sdiv <4 x i64> poison, splat (i64 2) - - ret i32 poison -} - -define i32 @udiv_constant() { -; LSX-LABEL: 'udiv_constant' -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = udiv i8 poison, 2 -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = udiv <2 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = udiv <4 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = udiv <8 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = udiv <16 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V32I8 = udiv <32 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = udiv i16 poison, 2 -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = udiv <2 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = udiv <4 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = udiv <8 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V16I16 = udiv <16 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = udiv i32 poison, 2 -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = udiv <2 x i32> poison, splat (i32 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = udiv <4 x i32> poison, splat (i32 2) -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V8I32 = udiv <8 x i32> poison, splat (i32 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = udiv i64 poison, 2 -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = udiv <2 x i64> poison, splat (i64 2) -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V4I64 = udiv <4 x i64> poison, splat (i64 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'udiv_constant' -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = udiv i8 poison, 2 -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = udiv <2 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = udiv <4 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = udiv <8 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = udiv <16 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V32I8 = udiv <32 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = udiv i16 poison, 2 -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = udiv <2 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = udiv <4 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = udiv <8 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I16 = udiv <16 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = udiv i32 poison, 2 -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = udiv <2 x i32> poison, splat (i32 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = udiv <4 x i32> poison, splat (i32 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I32 = udiv <8 x i32> poison, splat (i32 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = udiv i64 poison, 2 -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = udiv <2 x i64> poison, splat (i64 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I64 = udiv <4 x i64> poison, splat (i64 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = udiv i8 poison, 2 - %V2I8 = udiv <2 x i8> poison, splat (i8 2) - %V4I8 = udiv <4 x i8> poison, splat (i8 2) - %V8I8 = udiv <8 x i8> poison, splat (i8 2) - %V16I8 = udiv <16 x i8> poison, splat (i8 2) - %V32I8 = udiv <32 x i8> poison, splat (i8 2) - - %V1I16 = udiv i16 poison, 2 - %V2I16 = udiv <2 x i16> poison, splat (i16 2) - %V4I16 = udiv <4 x i16> poison, splat (i16 2) - %V8I16 = udiv <8 x i16> poison, splat (i16 2) - %V16I16 = udiv <16 x i16> poison, splat (i16 2) - - %V1I32 = udiv i32 poison, 2 - %V2I32 = udiv <2 x i32> poison, splat (i32 2) - %V4I32 = udiv <4 x i32> poison, splat (i32 2) - %V8I32 = udiv <8 x i32> poison, splat (i32 2) - - %V1I64 = udiv i64 poison, 2 - %V2I64 = udiv <2 x i64> poison, splat (i64 2) - %V4I64 = udiv <4 x i64> poison, splat (i64 2) - - ret i32 poison -} - -define i32 @srem_constant() { -; LSX-LABEL: 'srem_constant' -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V1I8 = srem i8 poison, 2 -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V2I8 = srem <2 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V4I8 = srem <4 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V8I8 = srem <8 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V16I8 = srem <16 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of RThru:14 CodeSize:6 Lat:18 SizeLat:6 for: %V32I8 = srem <32 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V1I16 = srem i16 poison, 2 -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V2I16 = srem <2 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V4I16 = srem <4 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V8I16 = srem <8 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of RThru:14 CodeSize:6 Lat:18 SizeLat:6 for: %V16I16 = srem <16 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V1I32 = srem i32 poison, 2 -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V2I32 = srem <2 x i32> poison, splat (i32 2) -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V4I32 = srem <4 x i32> poison, splat (i32 2) -; LSX-NEXT: Cost Model: Found costs of RThru:14 CodeSize:6 Lat:18 SizeLat:6 for: %V8I32 = srem <8 x i32> poison, splat (i32 2) -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V1I64 = srem i64 poison, 2 -; LSX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V2I64 = srem <2 x i64> poison, splat (i64 2) -; LSX-NEXT: Cost Model: Found costs of RThru:14 CodeSize:6 Lat:18 SizeLat:6 for: %V4I64 = srem <4 x i64> poison, splat (i64 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'srem_constant' -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V1I8 = srem i8 poison, 2 -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V2I8 = srem <2 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V4I8 = srem <4 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V8I8 = srem <8 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V16I8 = srem <16 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V32I8 = srem <32 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V1I16 = srem i16 poison, 2 -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V2I16 = srem <2 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V4I16 = srem <4 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V8I16 = srem <8 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V16I16 = srem <16 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V1I32 = srem i32 poison, 2 -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V2I32 = srem <2 x i32> poison, splat (i32 2) -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V4I32 = srem <4 x i32> poison, splat (i32 2) -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V8I32 = srem <8 x i32> poison, splat (i32 2) -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V1I64 = srem i64 poison, 2 -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V2I64 = srem <2 x i64> poison, splat (i64 2) -; LASX-NEXT: Cost Model: Found costs of RThru:7 CodeSize:6 Lat:9 SizeLat:6 for: %V4I64 = srem <4 x i64> poison, splat (i64 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = srem i8 poison, 2 - %V2I8 = srem <2 x i8> poison, splat (i8 2) - %V4I8 = srem <4 x i8> poison, splat (i8 2) - %V8I8 = srem <8 x i8> poison, splat (i8 2) - %V16I8 = srem <16 x i8> poison, splat (i8 2) - %V32I8 = srem <32 x i8> poison, splat (i8 2) - - %V1I16 = srem i16 poison, 2 - %V2I16 = srem <2 x i16> poison, splat (i16 2) - %V4I16 = srem <4 x i16> poison, splat (i16 2) - %V8I16 = srem <8 x i16> poison, splat (i16 2) - %V16I16 = srem <16 x i16> poison, splat (i16 2) - - %V1I32 = srem i32 poison, 2 - %V2I32 = srem <2 x i32> poison, splat (i32 2) - %V4I32 = srem <4 x i32> poison, splat (i32 2) - %V8I32 = srem <8 x i32> poison, splat (i32 2) - - %V1I64 = srem i64 poison, 2 - %V2I64 = srem <2 x i64> poison, splat (i64 2) - %V4I64 = srem <4 x i64> poison, splat (i64 2) - - ret i32 poison -} - -define i32 @urem_constant() { -; LSX-LABEL: 'urem_constant' -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = urem i8 poison, 2 -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = urem <2 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = urem <4 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = urem <8 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = urem <16 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V32I8 = urem <32 x i8> poison, splat (i8 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = urem i16 poison, 2 -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = urem <2 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = urem <4 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = urem <8 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V16I16 = urem <16 x i16> poison, splat (i16 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = urem i32 poison, 2 -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = urem <2 x i32> poison, splat (i32 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = urem <4 x i32> poison, splat (i32 2) -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V8I32 = urem <8 x i32> poison, splat (i32 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = urem i64 poison, 2 -; LSX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = urem <2 x i64> poison, splat (i64 2) -; LSX-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:1 for: %V4I64 = urem <4 x i64> poison, splat (i64 2) -; LSX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; -; LASX-LABEL: 'urem_constant' -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I8 = urem i8 poison, 2 -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I8 = urem <2 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I8 = urem <4 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I8 = urem <8 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I8 = urem <16 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V32I8 = urem <32 x i8> poison, splat (i8 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I16 = urem i16 poison, 2 -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I16 = urem <2 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I16 = urem <4 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I16 = urem <8 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V16I16 = urem <16 x i16> poison, splat (i16 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I32 = urem i32 poison, 2 -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I32 = urem <2 x i32> poison, splat (i32 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I32 = urem <4 x i32> poison, splat (i32 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V8I32 = urem <8 x i32> poison, splat (i32 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V1I64 = urem i64 poison, 2 -; LASX-NEXT: Cost Model: Found costs of 1 for: %V2I64 = urem <2 x i64> poison, splat (i64 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: %V4I64 = urem <4 x i64> poison, splat (i64 2) -; LASX-NEXT: Cost Model: Found costs of 1 for: ret i32 poison -; - %V1I8 = urem i8 poison, 2 - %V2I8 = urem <2 x i8> poison, splat (i8 2) - %V4I8 = urem <4 x i8> poison, splat (i8 2) - %V8I8 = urem <8 x i8> poison, splat (i8 2) - %V16I8 = urem <16 x i8> poison, splat (i8 2) - %V32I8 = urem <32 x i8> poison, splat (i8 2) - - %V1I16 = urem i16 poison, 2 - %V2I16 = urem <2 x i16> poison, splat (i16 2) - %V4I16 = urem <4 x i16> poison, splat (i16 2) - %V8I16 = urem <8 x i16> poison, splat (i16 2) - %V16I16 = urem <16 x i16> poison, splat (i16 2) - - %V1I32 = urem i32 poison, 2 - %V2I32 = urem <2 x i32> poison, splat (i32 2) - %V4I32 = urem <4 x i32> poison, splat (i32 2) - %V8I32 = urem <8 x i32> poison, splat (i32 2) - - %V1I64 = urem i64 poison, 2 - %V2I64 = urem <2 x i64> poison, splat (i64 2) - %V4I64 = urem <4 x i64> poison, splat (i64 2) - - ret i32 poison -} _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
