[PATCH] D112060: [NARY-REASSOCIATE] Fix infinite recursion optimizing min\max
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 19 06:17:47 PDT 2021
spatel added reviewers: lebedev.ri, nikic.
spatel added a comment.
I've never looked at this pass closely before, so another reviewer should comment too.
It may be independent of this patch, but I find the use of PatternMatch internals ("bind_ty", "smax_pred_ty", etc) confusing - why is that necessary?
Is this code is going to stop being useful when we canonicalize to min/max intrinsics ( D98152 <https://reviews.llvm.org/D98152> ) - it is specifically matching cmp/sel idioms only?
================
Comment at: llvm/lib/Transforms/Scalar/NaryReassociate.cpp:615
continue;
- // Transform 'I = (A op RHS) op B' 'I = (B op RHS) op A' on the second
+ // Transform 'I = (A op C) op B' to 'I = (B op C) op A' on the second
// iteration.
----------------
This code comment doesn't match the code?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112060/new/
https://reviews.llvm.org/D112060
More information about the llvm-commits
mailing list