diff options
author | Sanjay Patel <spatel@rotateright.com> | 2022-10-02 12:22:25 -0400 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2022-10-02 12:22:25 -0400 |
commit | 2e87333bfe7e226533fb66c84015c4523e352d3f (patch) | |
tree | d33c9203ee43de9cdbc2d5546894ebebf9a750ea /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 4490cfbaf4591febc784592fa11a9d418e6c8d5a (diff) | |
download | llvm-2e87333bfe7e226533fb66c84015c4523e352d3f.zip llvm-2e87333bfe7e226533fb66c84015c4523e352d3f.tar.gz llvm-2e87333bfe7e226533fb66c84015c4523e352d3f.tar.bz2 |
[InstCombine] convert mul by negative-pow2 to negate and shift
This is an unusual canonicalization because we create an extra instruction,
but it's likely better for analysis and codegen (similar reasoning as D133399).
InstCombine::Negator may create this kind of multiply from negate and shift,
but this should not conflict because of the narrow negation.
I don't know how to create a fully general proof for this kind of transform in
Alive2, but here's an example with bitwidths similar to one of the regression
tests:
https://alive2.llvm.org/ce/z/J3jTjR
Differential Revision: https://reviews.llvm.org/D133667
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions