diff options
author | Tim Northover <tnorthover@apple.com> | 2016-01-29 19:18:46 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-01-29 19:18:46 +0000 |
commit | c4093c3cede79f3f123af4154d69ed0614fc6568 (patch) | |
tree | 5522c25d571984dfa1e91495c83568aa884817c7 /clang/lib/Basic/Module.cpp | |
parent | dfef4069e3a02b8e1461434971ff0060afa89a4e (diff) | |
download | llvm-c4093c3cede79f3f123af4154d69ed0614fc6568.zip llvm-c4093c3cede79f3f123af4154d69ed0614fc6568.tar.gz llvm-c4093c3cede79f3f123af4154d69ed0614fc6568.tar.bz2 |
ARM: don't mangle DAG constant if it has more than one use
The basic optimisation was to convert (mul $LHS, $complex_constant) into
roughly "(shl (mul $LHS, $simple_constant), $simple_amt)" when it was expected
to be cheaper. The original logic checks that the mul only has one use (since
we're mangling $complex_constant), but when used in even more complex
addressing modes there may be an outer addition that can pick up the wrong
value too.
I *think* the ARM addressing-mode problem is actually unreachable at the
moment, but that depends on complex assessments of the profitability of
pre-increment addressing modes so I've put a real check in there instead of an
assertion.
llvm-svn: 259228
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
0 files changed, 0 insertions, 0 deletions