[llvm] [InstCombine] Fix the correctness of missing check reassoc attribute (PR #71277)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 28 23:02:57 PST 2024
================
@@ -781,7 +781,7 @@ Instruction *InstCombinerImpl::visitFMul(BinaryOperator &I) {
if (Value *V = SimplifySelectsFeedingBinaryOp(I, Op0, Op1))
return replaceInstUsesWith(I, V);
- if (I.hasAllowReassoc())
+ if (I.hasAllowReassoc() && I.hasAllowReassocOfAllOperand())
----------------
arsenm wrote:
I think this is a bit too specific of a query to add to Instruction. It will also be imprecise in cases where the source is a constant / load /argument or other non-instruction source
https://github.com/llvm/llvm-project/pull/71277
More information about the llvm-commits
mailing list