1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/CodeGen
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
..
AArch64 [COFF, ARM64] Implement support for SEH extensions __try/__except/__finally 2019-01-16 19:52:59 +00:00
AMDGPU AMDGPU: Adjust the chain for loads writing to the HI part of a register. 2019-01-16 21:32:53 +00:00
ARC
ARM [DAGCombine] Fix ReduceLoadWidth for shifted offsets 2019-01-16 08:40:12 +00:00
AVR [AVR] Update integration/blink.ll as we now generate sbi/cbi instructions. 2019-01-03 21:25:39 +00:00
BPF [BPF] Fix .BTF.ext reloc type assigment issue 2019-01-08 16:36:06 +00:00
Generic
Hexagon Remove irrelevant references to legacy git repositories from 2019-01-15 16:18:52 +00:00
Inputs
Lanai
Mips [MIPS GlobalISel] Fix release build make-check after r351046 2019-01-14 14:12:43 +00:00
MIR [Dwarf/AArch64] Return address signing B key dwarf support 2018-12-21 10:45:08 +00:00
MSP430 [MSP430] Emit a separate section for every interrupt vector 2019-01-16 14:03:41 +00:00
NVPTX Replace "no-frame-pointer-*" function attributes with "frame-pointer" 2019-01-14 10:55:55 +00:00
PowerPC Remove irrelevant references to legacy git repositories from 2019-01-15 16:18:52 +00:00
RISCV Replace "no-frame-pointer-*" function attributes with "frame-pointer" 2019-01-14 10:55:55 +00:00
SPARC Replace "no-frame-pointer-*" function attributes with "frame-pointer" 2019-01-14 10:55:55 +00:00
SystemZ Remove irrelevant references to legacy git repositories from 2019-01-15 16:18:52 +00:00
Thumb Replace "no-frame-pointer-*" function attributes with "frame-pointer" 2019-01-14 10:55:55 +00:00
Thumb2 Replace "no-frame-pointer-*" function attributes with "frame-pointer" 2019-01-14 10:55:55 +00:00
WebAssembly [WebAssembly] Expand SIMD shifts while V8's implementation disagrees 2019-01-15 02:16:03 +00:00
WinCFGuard
WinEH [EH] Rename llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfp 2019-01-16 00:37:13 +00:00
X86 [X86] Add X86ISD::VSHLV and X86ISD::VSRLV nodes for psllv and psrlv 2019-01-16 21:46:32 +00:00
XCore Replace "no-frame-pointer-*" function attributes with "frame-pointer" 2019-01-14 10:55:55 +00:00