[PATCH] D23464: [PR28367][Reassociation] Avoid iterator invalidation when negating value.
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 16 12:59:43 PDT 2016
efriedma added a subscriber: efriedma.
efriedma added a comment.
I'm not really happy with this patch... you're basically disabling the CSE optimization for what seems like the most important case.
That said, I'm not sure the CSE optimization is actually necessary given the current state of reassociate. The "look for an existing negation" code was added in r92373 to fix test/Transforms/Reassociate/basictest.ll `@test12`... and that test apparently still passes with this patch. Maybe it would make sense to just delete the whole loop to look for an existing negate?
Another way to fix the iterator invalidation problem would be to revert r258830, I think.
FYI, this is basically my first time reading the reassociate code, so I might be missing something.
https://reviews.llvm.org/D23464
More information about the llvm-commits
mailing list