diff options
author | Zia Ansari <zia.ansari@intel.com> | 2015-10-22 16:14:45 +0000 |
---|---|---|
committer | Zia Ansari <zia.ansari@intel.com> | 2015-10-22 16:14:45 +0000 |
commit | 8f509a7044e588bc74ed6d1b3256dab3915c550f (patch) | |
tree | 4ded8ba513857b39586f5377f0782ea3b871f4d1 /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | de1dc9c98f9ce74d38aceb44e00d258370d1bb34 (diff) | |
download | llvm-8f509a7044e588bc74ed6d1b3256dab3915c550f.zip llvm-8f509a7044e588bc74ed6d1b3256dab3915c550f.tar.gz llvm-8f509a7044e588bc74ed6d1b3256dab3915c550f.tar.bz2 |
[X86] - Catch extra combine opportunities for redundant imuls.
When we fold "mul ((add x, c1), c1)" -> "add ((mul x, c2), c1*c2)", we bail if (add x, c1) has multiple
users which would result in an extra add instruction.
In such cases, this patch adds a check to see if we can eliminate a multiply instruction in exchange for the extra add.
I also added the capability of doing the existing optimization with non-splatted vectors (splatted also works).
Differential Revision: http://reviews.llvm.org/D13740
llvm-svn: 251028
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions