Patch adds two new GICombinerRules, one for G_MUL(X, 1) and another for G_MUL(X, -1). G_MUL(X, 1) is an identity combine, and G_MUL(X, -1) gets replaced with G_SUB(0, X). Patch additionally adds new combiner tests for the AArch64 target to test these new combiner rules, as well as updates AMDGPU GISel tests.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
In the future, can you do a full-context diff? It lets reviewers see the full file.
e.g.
git show -U999999
llvm/include/llvm/Target/GlobalISel/Combine.td | ||
---|---|---|
441 | This could probably be a right_identity_one combine, similar to right_identity_zero. Then you can add any other operators where this is true to the wip_match_opcode list in a follow-up. | |
453 | Could this use matchConstantOp? |
Comment Actions
- Changed mul_by_one to right_identity_one
- Changed mul_by_neg_one to use matchConstantOp
Comment Actions
Thanks for the review. Still don't have commit access, will need someone to commit on my behalf. Thanks in advance!
Comment Actions
I can commit for you this time as well. Can you email Chris to request for access as mentioned here? - https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access
This could probably be a right_identity_one combine, similar to right_identity_zero. Then you can add any other operators where this is true to the wip_match_opcode list in a follow-up.