[llvm] [LICM] Drop nsw/nuw flags on affected instructions in hoistMulAddAssociation. (PR #85486)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 18 09:28:50 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();
----------------
topperc wrote:
Aren't they covered by the NOT_CONSTRAINED-NEXT lines? On the test case where I added `nsw nuw` to adds?
https://github.com/llvm/llvm-project/pull/85486
More information about the llvm-commits
mailing list