[PATCH] D111968: [TTI] Add OperandValueProperties::OP_NegatedPowerOf2 enum
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 23 06:05:20 PDT 2022
spatel added a comment.
Side note - we partly inverted canonicalization towards mul back to shl, so this pattern might come up less often after these patches:
0f32a5dea0e9 <https://reviews.llvm.org/rG0f32a5dea0e9ef5a52865f9fd285b394d46babaf>
ee0bf6472291 <https://reviews.llvm.org/rGee0bf6472291bd40687046ab2990f987a022a940>
We still change `-(X << C)` to `X * -2**C` for now since that replaces 2 IR instructions with 1.
If one form or the other is easier to deal with from the cost model perspective, that would help decide if we should change the canonicalization further.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111968/new/
https://reviews.llvm.org/D111968
More information about the llvm-commits
mailing list