summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/USRGeneration.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2018-11-26 15:22:30 +0000
committerSanjay Patel <spatel@rotateright.com>2018-11-26 15:22:30 +0000
commitd31220e0de0d8924e7c1f54d08d4515cfabb1aeb (patch)
treeaf6020d43e16d902f8b483a5d0a5b94dc2ea150e /clang/lib/Index/USRGeneration.cpp
parent2447baff848ec8bcb74575ed686a776fbfd1b8cc (diff)
downloadbcm5719-llvm-d31220e0de0d8924e7c1f54d08d4515cfabb1aeb.tar.gz
bcm5719-llvm-d31220e0de0d8924e7c1f54d08d4515cfabb1aeb.zip
[x86] promote all multiply i8 by constant to i32
We have these 2 "isDesirable" promotion hooks (I'm not sure why we need both of them, but that's independent of this patch), and we can adjust them to promote "mul i8 X, C" to i32. Then, all of our existing LEA and other multiply expansion magic happens as it would for i32 ops. Some of the test diffs show that we could end up with an actual 32-bit mul instruction here because we choose not to expand to simpler ops. That instruction could be slower depending on the subtarget. On the plus side, this means we don't need a separate instruction to load the constant operand and possibly an extra instruction to move the result. If we need to tune mul i32 further, we could add a later transform that tries to shrink it back to i8 based on subtarget timing. I did not bother to duplicate all of the 32-bit test file RUNs and target settings that exist to test whether LEA expansion is cheap or not. The diffs here assume a default target, so that means LEA is generally cheap. Differential Revision: https://reviews.llvm.org/D54803 llvm-svn: 347557
Diffstat (limited to 'clang/lib/Index/USRGeneration.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud