[PATCH] D158181: [SCEVExpander] Fix incorrect reuse of more poisonous instructions (PR63763)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 21 02:56:35 PDT 2023


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp:1832
+  SmallVector<Instruction *> DropPoisonGeneratingInsts;
+  return FindValueInExprValueMap(S, At, DropPoisonGeneratingInsts);
 }
----------------
fhahn wrote:
> It's safe to ignore `DropPoisonGeneratingInsts` here, as the function is only used in isHighCostExpansionHelper, right? 
> 
> It might be good to lock down the API to return a bool for `getRelatedExistingExpansion` (`hasRelatedExistingExpansion`?) to make sure the return value isn't used elsewhere in the future without dropping the flags?
Good idea! I've renamed the method and changed the return value to bool.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158181/new/

https://reviews.llvm.org/D158181



More information about the llvm-commits mailing list