Previous attempt to fix infinite recursion in min/max reassociation was not fully successful (D100170). Newly discovered failing case is due to not properly handled when there is a single use. It should be processed separately from 2 uses case.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Scalar/NaryReassociate.cpp | ||
---|---|---|
617 | How is this even possible? I could not find explaining comment here, but intuitively LHS and RHS are expected to be arguments of I. If LHS has the only user then it must be I. no? Could you please add a method comment about what I, LHS and RHS actually are? |
llvm/lib/Transforms/Scalar/NaryReassociate.cpp | ||
---|---|---|
617 | Yes, your understanding is correct. LHS & RHS simply left and right operands of I (which is min/max or select). I will updated the code shortly |
llvm/lib/Transforms/Scalar/NaryReassociate.cpp | ||
---|---|---|
616 | Ah it's a user of LHS and not I. Makes sense then. |
clang-tidy: warning: invalid case style for variable 'hasExternalUser' [readability-identifier-naming]
not useful