llvm-project/llvm/lib
Sanjay Patel d31220e0de [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
2018-11-26 15:22:30 +00:00
..
Analysis Revert unapproved commit 2018-11-24 07:26:55 +00:00
AsmParser Attempt to fix buildbot after r347489 2018-11-23 11:28:58 +00:00
BinaryFormat Revert r347490 as it breaks address sanitizer builds 2018-11-23 17:13:06 +00:00
Bitcode [DebugInfo] DISubprogram flags get their own flags word. NFC. 2018-11-19 18:29:28 +00:00
CodeGen [ARM GlobalISel] Support G_CTLZ and G_CTLZ_ZERO_UNDEF 2018-11-26 11:07:02 +00:00
DebugInfo Revert r347490 as it breaks address sanitizer builds 2018-11-23 17:13:06 +00:00
Demangle [MS Demangler] Print public:, protected:, private: if set in FunctionClass or a variable's StorageClass. 2018-11-13 20:18:26 +00:00
ExecutionEngine [ExecutionEngine][Interpreter] Fix out-of-bounds array access. 2018-11-20 01:01:26 +00:00
FuzzMutate
Fuzzer
IR [ThinLTO] Assembly representation of ReadOnly attribute 2018-11-23 10:54:51 +00:00
IRReader
LTO [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
LineEditor
Linker [ThinLTO] Internalize readonly globals 2018-11-16 07:08:00 +00:00
MC Revert r347490 as it breaks address sanitizer builds 2018-11-23 17:13:06 +00:00
Object Use llvm::copy. NFC 2018-11-17 01:44:25 +00:00
ObjectYAML [WebAssembly] Add support for dylink section in object format 2018-11-14 18:36:24 +00:00
OptRemarks Reland: [OptRemarks] Add library for parsing optimization remarks 2018-10-10 18:43:42 +00:00
Option [opt] Change the parameter of OptTable::PrintHelp from Name to Usage and don't append "[options] <inputs>" 2018-10-10 00:15:31 +00:00
Passes [PM] Port Scalarizer to the new pass manager. 2018-11-21 14:00:17 +00:00
ProfileData Support for remapping profile data when symbols change, for sample-based 2018-10-10 21:31:01 +00:00
Support [Support/FileSystem] Add sub-second precision for atime/mtime of sys::fs::file_status on unix platforms 2018-11-26 00:03:39 +00:00
TableGen Reverted r347092 due to the following build fails: 2018-11-17 02:26:34 +00:00
Target [x86] promote all multiply i8 by constant to i32 2018-11-26 15:22:30 +00:00
Testing
ToolDrivers [opt] Change the parameter of OptTable::PrintHelp from Name to Usage and don't append "[options] <inputs>" 2018-10-10 00:15:31 +00:00
Transforms [IPSCCP] Use input operand instead of OriginalOp for ssa_copy. 2018-11-25 16:32:02 +00:00
WindowsManifest
XRay [XRay] Improve FDR trace handling and error messaging 2018-11-09 06:26:48 +00:00
CMakeLists.txt Reland: [OptRemarks] Add library for parsing optimization remarks 2018-10-10 18:43:42 +00:00
LLVMBuild.txt Reland: [OptRemarks] Add library for parsing optimization remarks 2018-10-10 18:43:42 +00:00