1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[VecotrCombine] Fix unused variable for assertion disabled builds

This commit is contained in:
Kadir Cetinkaya 2020-02-14 09:29:56 +01:00
parent cba126d98f
commit 0b9c6d5bd5

View File

@ -107,8 +107,6 @@ static bool foldExtractBinop(Instruction &I, const TargetTransformInfo &TTI) {
int VecBOCost = TTI.getArithmeticInstrCost(BOpcode, VecTy);
int Extract0Cost = TTI.getVectorInstrCost(Instruction::ExtractElement,
VecTy, C0);
int Extract1Cost = TTI.getVectorInstrCost(Instruction::ExtractElement,
VecTy, C1);
// Handle a special case - if the extract indexes are the same, the
// replacement sequence does not require a shuffle. Unless the vector binop is
@ -116,7 +114,9 @@ static bool foldExtractBinop(Instruction &I, const TargetTransformInfo &TTI) {
// Extra uses of the extracts mean that we include those costs in the
// vector total because those instructions will not be eliminated.
if (C0 == C1) {
assert(Extract0Cost == Extract1Cost && "Different costs for same extract?");
assert(Extract0Cost ==
TTI.getVectorInstrCost(Instruction::ExtractElement, VecTy, C1) &&
"Different costs for same extract?");
int ExtractCost = Extract0Cost;
if (X != Y) {
int ScalarCost = ExtractCost + ExtractCost + ScalarBOCost;