1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test
Craig Topper bae7415b04 [X86] Add X86ISD::VSHLV and X86ISD::VSRLV nodes for psllv and psrlv
Previously we used ISD::SHL and ISD::SRL to represent these in SelectionDAG. ISD::SHL/SRL interpret an out of range shift amount as undefined behavior and will constant fold to undef. While the intrinsics are defined to return 0 for out of range shift amounts. A previous patch added a special node for VPSRAV to produce all sign bits.

This was previously believed safe because undefs frequently get turned into 0 either from the constant pool or a desire to not have a false register dependency. But undef is treated specially in some optimizations. For example, its ignored in detection of vector splats. So if the ISD::SHL/SRL can be constant folded and all of the elements with in bounds shift amounts are the same, we might fold it to single element broadcast from the constant pool. This would not put 0s in the elements with out of bounds shift amounts.

We do have an existing InstCombine optimization to use shl/lshr when the shift amounts are all constant and in bounds. That should prevent some loss of constant folding from this change.

Patch by zhutianyang and Craig Topper

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

llvm-svn: 351381
2019-01-16 21:46:32 +00:00
..
Analysis Reapply "[CodeGen][X86] Expand USUBSAT to UMAX+SUB, also for vectors" 2019-01-15 18:43:41 +00:00
Assembler Rename DIFlagFixedEnum to DIFlagEnumClass. NFC 2019-01-08 17:52:29 +00:00
Bindings
Bitcode Remove irrelevant references to legacy git repositories from 2019-01-15 16:18:52 +00:00
BugPoint
CodeGen [X86] Add X86ISD::VSHLV and X86ISD::VSRLV nodes for psllv and psrlv 2019-01-16 21:46:32 +00:00
DebugInfo [DebugInfo] Allow creation of DBG_VALUEs in blocks where the operand is not used 2019-01-16 17:25:27 +00:00
Demangle [llvm-undname] Add support for demangling msvc's noexcept types. 2019-01-08 21:05:51 +00:00
Examples
ExecutionEngine
Feature
FileCheck Fix defines.txt 2019-01-14 10:10:48 +00:00
Instrumentation [MSan] Apply the ctor creation scheme of TSan 2019-01-16 11:14:07 +00:00
Integer
JitListener
Linker Remove irrelevant references to legacy git repositories from 2019-01-15 16:18:52 +00:00
LTO [LTO] Record whether LTOUnit splitting is enabled in index 2019-01-11 18:31:57 +00:00
MC [WebAssembly] Store section alignment as a power of 2 2019-01-16 01:34:48 +00:00
Object [WebAssembly] Store section alignment as a power of 2 2019-01-16 01:34:48 +00:00
ObjectYAML [WebAssembly] Store section alignment as a power of 2 2019-01-16 01:34:48 +00:00
Other
SafepointIRVerifier
SymbolRewriter
TableGen
ThinLTO/X86 [LTO] Record whether LTOUnit splitting is enabled in index 2019-01-11 18:31:57 +00:00
tools [X86][BtVer2] Update latency of horizontal operations. 2019-01-16 18:18:01 +00:00
Transforms [SLP] Fix PR40310: The reduction nodes should stay scalar. 2019-01-16 15:39:52 +00:00
Unit
Verifier [Verifier] Reject invalid type for DILocalVariable. 2019-01-07 23:09:09 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg.py
lit.site.cfg.py.in
TestRunner.sh