1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/test
Craig Topper c6a7e261b5 [SelectionDAG][X86][ARM][AArch64] Add ISD opcode for __builtin_parity. Expand it to shifts and xors.
Clang emits (and (ctpop X), 1) for __builtin_parity. If ctpop
isn't natively supported by the target, this leads to poor codegen
due to the expansion of ctpop being more complex than what is needed
for parity.

This adds a DAG combine to convert the pattern to ISD::PARITY
before operation legalization. Type legalization is updated
to handled Expanding and Promoting this operation. If after type
legalization, CTPOP is supported for this type, LegalizeDAG will
turn it back into CTPOP+AND. Otherwise LegalizeDAG will emit a
series of shifts and xors followed by an AND with 1.

I've avoided vectors in this patch to avoid more legalization
complexity for this patch.

X86 previously had a custom DAG combiner for this. This is now
moved to Custom lowering for the new opcode. There is a minor
regression in vector-reduce-xor-bool.ll, but a follow up patch
can easily fix that.

Fixes PR47433

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D87209
2020-09-12 11:42:18 -07:00
..
Analysis [DSE] Switch to MemorySSA-backed DSE by default. 2020-09-10 22:24:32 +01:00
Assembler [ConstantFold] Make areGlobalsPotentiallyEqual less aggressive. 2020-09-11 17:23:08 -07:00
Bindings
Bitcode
BugPoint
CodeGen [SelectionDAG][X86][ARM][AArch64] Add ISD opcode for __builtin_parity. Expand it to shifts and xors. 2020-09-12 11:42:18 -07:00
DebugInfo [LiveDebugValues][NFC] Add additional tests 2020-09-11 15:34:37 +01:00
Demangle
Examples
ExecutionEngine
Feature [EarlyCSE] Verify hash code in regression tests 2020-09-04 10:40:35 -04:00
FileCheck
Instrumentation
Integer
JitListener
Linker
LTO [ThinLTO] Make -lto-embed-bitcode an enum 2020-09-11 13:24:54 -07:00
MachineVerifier
MC [MC] Allow .org directives in SHT_NOBITS sections 2020-09-11 15:12:42 -07:00
Object
ObjectYAML [obj2yaml][test] Test generating and dumping a broken debug_ranges section. 2020-09-09 08:48:39 +08:00
Other [DSE] Switch to MemorySSA-backed DSE by default. 2020-09-10 22:24:32 +01:00
Reduce
SafepointIRVerifier
Support
SymbolRewriter
TableGen
ThinLTO/X86 [ThinLTO] Fix a metadata lost issue with DICompileUnit import. 2020-09-02 14:40:41 -07:00
tools [MachineScheduler] Fix operand scheduling for pre/post-increment loads 2020-09-12 16:53:12 +03:00
Transforms [DSE] Adjust coroutines test after e082dee2b588. 2020-09-12 19:23:13 +01:00
Unit
Verifier Reland [AssumeBundles] Use operand bundles to encode alignment assumptions 2020-09-12 15:36:06 +02:00
YAMLParser
.clang-format
CMakeLists.txt [CMake] Simplify CMake handling for libxml2 2020-09-09 21:44:44 -07:00
lit.cfg.py [CMake] Simplify CMake handling for libxml2 2020-09-09 21:44:44 -07:00
lit.site.cfg.py.in [CMake] Simplify CMake handling for libxml2 2020-09-09 21:44:44 -07:00
TestRunner.sh