[llvm] [LICM] Drop nsw/nuw flags on affected instructions in hoistMulAddAssociation. (PR #85486)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 18 10:46:56 PDT 2024
================
@@ -2735,6 +2737,12 @@ static bool hoistMulAddAssociation(Instruction &I, Loop &L,
if (Changes.empty())
return false;
+ // Drop the poison flags for any adds we looked through.
+ if (I.getType()->isIntOrIntVectorTy()) {
+ for (auto *Add : Adds)
+ Add->dropPoisonGeneratingFlags();
----------------
nikic wrote:
Sorry, I got confused by the two sets of check lines.
https://github.com/llvm/llvm-project/pull/85486
More information about the llvm-commits
mailing list