1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/lib
Sanjay Patel 8ded996357 [VectorCombine] try to form vector compare and binop to eliminate scalar ops
binop i1 (cmp Pred (ext X, Index0), C0), (cmp Pred (ext X, Index1), C1)
-->
vcmp = cmp Pred X, VecC
ext (binop vNi1 vcmp, (shuffle vcmp, Index1)), Index0

This is a larger pattern than the existing extractelement folds because we can't
reasonably vectorize the sub-patterns with constants based on cost model calcs
(it doesn't usually make sense to replace a single extracted scalar op with
constant operand with a vector op).

I salvaged as much of the existing logic as I could, but there might be better
ways to share and reduce code.

The motivating case from PR43745:
https://bugs.llvm.org/show_bug.cgi?id=43745
...is the special case of a 2-way reduction. We tried to get SLP to handle that
particular pattern in D59710, but that caused crashing and regressions.
This patch is more general, but hopefully safer.

The v2f64 test with SSE2 surprised me - the cost model accounting looks like this:
OldCost = 0 (free extract of f64 at index 0) + 1 (extract of f64 at index 1) + 2 (scalar fcmps) + 1 (and of bools) = 4
NewCost = 2 (vector fcmp) + 1 (shuffle) + 1 (vector 'and') + 1 (extract of bool) = 5

Differential Revision: https://reviews.llvm.org/D82474
2020-06-29 10:38:52 -04:00
..
Analysis [NFC] CallGraph related cleanup 2020-06-28 15:27:39 -07:00
AsmParser LLParser: Accept align(N) as new syntax for parameter attribute 2020-06-26 18:10:21 -04:00
BinaryFormat [WebAssembly] Adding 64-bit version of R_WASM_MEMORY_ADDR_* relocs 2020-06-15 10:07:42 -07:00
Bitcode Remove references to the 4.0 release as a major breaking (NFC) 2020-06-25 23:49:07 +00:00
Bitstream
CodeGen [Alignment][NFC] migrate DataLayout::getPreferredAlignment 2020-06-29 11:24:36 +00:00
DebugInfo [DebugInfo/DWARF] - Do not hang when CFI are truncated. 2020-06-23 14:39:24 +03:00
Demangle
DWARFLinker
ExecutionEngine [Alignment][NFC] migrate DataLayout::getPreferredAlignment 2020-06-29 11:24:36 +00:00
Extensions
Frontend [OpenMP][OMPBuilder] Adding privatization related createXXXX to OMPBuilder 2020-06-27 01:54:41 -04:00
Fuzzer
FuzzMutate [SVE] Remove calls to VectorType::getNumElements from FuzzMutate 2020-06-23 11:02:20 -07:00
IR Add intrinsic helper function 2020-06-29 14:47:46 +02:00
IRReader
LineEditor
Linker
LTO Remove GlobalValue::getAlignment(). 2020-06-23 19:13:42 -07:00
MC MCSectionWasm.h - reduce includes to forward declarations. NFC. 2020-06-27 10:03:34 +01:00
MCA
Object Error.h - GenericBinaryError - pass Twine arg by reference not value. 2020-06-27 10:12:20 +01:00
ObjectYAML [ObjectYAML][DWARF] Collect diagnostic message when YAMLParser fails. 2020-06-29 16:13:53 +08:00
Option
Passes [MemorySSA] Update comment in PassBuilder 2020-06-26 14:55:31 -07:00
ProfileData Revert "[PGO] Extend the value profile buckets for mem op sizes." 2020-06-25 11:13:49 -07:00
Remarks
Support [Driver] When forcing a crash print the bug report message 2020-06-29 13:13:12 +01:00
TableGen Fix ubsan error in tblgen with signed left shift 2020-06-16 11:15:09 -07:00
Target AMDGPU: Use IsSSA property check instead of asserting on isSSA 2020-06-29 10:05:23 -04:00
Testing
TextAPI [TextAPI/MachO] Fix style issues. NFC 2020-06-24 14:43:45 -07:00
ToolDrivers
Transforms [VectorCombine] try to form vector compare and binop to eliminate scalar ops 2020-06-29 10:38:52 -04:00
WindowsManifest
XRay
CMakeLists.txt
LLVMBuild.txt