[PATCH] D59442: Enable Operand Reordering for Commutative Instructions in the FunctionComparator/MergeFunctions
JF Bastien via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 10:32:49 PDT 2019
jfb added a comment.
In D59442#1435093 <https://reviews.llvm.org/D59442#1435093>, @xbolva00 wrote:
> Cannot we canonicalize to have a smaller index as lhs ?
>
> v[0] + v[1] - ok
> v[1] + v[0] - swap to indexes
For arrays that have constant indices sure, but in general no: it could be arrays with variable indices or just straight up variables and then we've got no truly natural ordering.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59442/new/
https://reviews.llvm.org/D59442
More information about the llvm-commits
mailing list