[llvm] [AArch64] Guard against getRegisterBitWidth returning zero in vector instr cost. (PR #117749)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 05:13:13 PST 2024
================
@@ -3248,19 +3248,18 @@ InstructionCost AArch64TTIImpl::getVectorInstrCostHelper(
// Check if the extractelement user is scalar fmul.
auto IsUserFMulScalarTy = [](const Value *EEUser) {
// Check if the user is scalar fmul.
- const auto *BO = dyn_cast_if_present<BinaryOperator>(EEUser);
+ const auto *BO = dyn_cast<BinaryOperator>(EEUser);
----------------
davemgreen wrote:
This function is called from users() in two cases. Can you explain why it can be null? Do you have a test case that shows it?
https://github.com/llvm/llvm-project/pull/117749
More information about the llvm-commits
mailing list