llvm-project/llvm/lib
Craig Topper b51dc64063 [X86] Add DAG combine to fold any_extend_vector_inreg+truncstore to an extractelement+store
We have custom code that ignores the normal promoting type legalization on less than 128-bit vector types like v4i8 to emit pavgb, paddusb, psubusb since we don't have the equivalent instruction on a larger element type like v4i32. If this operation appears before a store, we can be left with an any_extend_vector_inreg followed by a truncstore after type legalization. When truncstore isn't legal, this will normally be decomposed into shuffles and a non-truncating store. This will then combine away the any_extend_vector_inreg and shuffle leaving just the store. On avx512, truncstore is legal so we don't decompose it and we had no combines to fix it.

This patch adds a new DAG combine to detect this case and emit either an extract_store for 64-bit stoers or a extractelement+store for 32 and 16 bit stores. This makes the avx512 codegen match the avx2 codegen for these situations. I'm restricting to only when -x86-experimental-vector-widening-legalization is false. When we're widening we're not likely to create this any_extend_inreg+truncstore combination. This means we should be able to remove this code when we flip the default. I would like to flip the default soon, but I need to investigate some performance regressions its causing in our branch that I wasn't seeing on trunk.

Differential Revision: https://reviews.llvm.org/D65538

llvm-svn: 367488
2019-07-31 22:43:08 +00:00
..
Analysis [SCCP] Update condition to avoid overflow. 2019-07-31 18:22:22 +00:00
AsmParser ARM MTE stack sanitizer. 2019-07-15 20:02:23 +00:00
BinaryFormat [Object][XCOFF] Add support for 64-bit file header and section header dumping. 2019-07-09 18:09:11 +00:00
Bitcode Reland: [Remarks] Add an LLVM-bitstream-based remark serializer 2019-07-31 00:13:51 +00:00
Bitstream [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00
CodeGen Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize NoSignedZerosFPMath options control 2019-07-31 21:57:28 +00:00
DebugInfo Reland "[DwarfDebug] Dump call site debug info" 2019-07-31 16:51:28 +00:00
Demangle llvm-undname: Correctly demangle vararg parameters 2019-06-04 19:10:08 +00:00
ExecutionEngine [ORC] Suppress an ORCv1 deprecation warning. 2019-07-18 19:55:42 +00:00
FuzzMutate
Fuzzer
IR Reland "[DwarfDebug] Dump call site debug info" 2019-07-31 16:51:28 +00:00
IRReader [IRReader] Expose getLazyIRModule 2019-02-11 22:01:13 +00:00
LTO Open native file handles to avoid converting from FDs, NFC 2019-07-11 20:29:32 +00:00
LineEditor [CMake] Delete redundant DEPENDS/LINK_LIBS from LineEditor/XRay 2019-06-22 01:50:21 +00:00
Linker Reapply: IR: add optional type to 'byval' function parameters 2019-05-30 18:48:23 +00:00
MC Address post commit review comments on revision 366727. 2019-07-30 15:37:01 +00:00
MCA [MCA] Ignore invalid processor resource writes of zero cycles. NFCI 2019-06-14 13:31:21 +00:00
Object [Object] Add public MaxSectionAlignment to MachOUniversal 2019-07-25 00:29:13 +00:00
ObjectYAML [yaml2obj] - Allow overriding the sh_size field. 2019-07-11 12:59:29 +00:00
Option Let unaliased Args track which Alias they were created from, and use that in Arg::getAsString() for diagnostics 2019-07-09 00:34:08 +00:00
Passes Reland the "[NewPM] Port Sancov" patch from rL365838. No functional 2019-07-25 20:53:15 +00:00
ProfileData [Profile] Support raw/indexed profiles larger than 4GB 2019-07-09 22:01:04 +00:00
Remarks Reland: [Remarks] Add an LLVM-bitstream-based remark serializer 2019-07-31 00:13:51 +00:00
Support [FileCollector] Add a VFS that records FS accesses using the FileCollector 2019-07-29 23:38:30 +00:00
TableGen TableGen: Handle nontrivial foreach range bounds 2019-05-22 21:28:20 +00:00
Target [X86] Add DAG combine to fold any_extend_vector_inreg+truncstore to an extractelement+store 2019-07-31 22:43:08 +00:00
Testing [Testing] Move clangd::Annotations to llvm testing support 2019-04-25 10:08:31 +00:00
TextAPI Cleanup: llvm::bsearch -> llvm::partition_point after r364719 2019-06-30 11:19:56 +00:00
ToolDrivers [llvm-lib] Add a dependency to intrinsics_gen to the LLVMLibDriver build 2019-07-15 18:15:12 +00:00
Transforms [IndVars, RLEV] Support rewriting exit values in loops without known exits (prep work) 2019-07-31 21:15:21 +00:00
WindowsManifest
XRay Open native file handles to avoid converting from FDs, NFC 2019-07-11 20:29:32 +00:00
CMakeLists.txt Fix build errors LLVM tests are disabled. 2019-07-11 22:08:35 +00:00
LLVMBuild.txt [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00