[PATCH] D94065: [NFC] Make remaining cost functions in LoopVectorize.cpp use InstructionCost
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 11 09:44:05 PST 2021
ctetreau added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:3751
}
+ assert(Cost.isValid() && "Invalid vector call cost");
return Cost;
----------------
This assert should be removed. This function returns `InstructionCost`. Anybody who gets an `InstructionCost` has to be prepared to handle the invalid case.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7322
+ InstructionCost IntrinsicCost = getVectorIntrinsicCost(CI, VF);
+ assert(CallCost.isValid() && IntrinsicCost.isValid() &&
+ "Invalid vector call or intrinsic cost");
----------------
This assert should be removed. This function returns `InstructionCost`, so any caller already has to handle the invalid case.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94065/new/
https://reviews.llvm.org/D94065
More information about the llvm-commits
mailing list