1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/unittests/CodeGen
David Sherwood 42a72164a2 [IR][SVE] Add new llvm.experimental.stepvector intrinsic
This patch adds a new llvm.experimental.stepvector intrinsic,
which takes no arguments and returns a linear integer sequence of
values of the form <0, 1, ...>. It is primarily intended for
scalable vectors, although it will work for fixed width vectors
too. It is intended that later patches will make use of this
new intrinsic when vectorising induction variables, currently only
supported for fixed width. I've added a new CreateStepVector
method to the IRBuilder, which will generate a call to this
intrinsic for scalable vectors and fall back on creating a
ConstantVector for fixed width.

For scalable vectors this intrinsic is lowered to a new ISD node
called STEP_VECTOR, which takes a single constant integer argument
as the step. During lowering this argument is set to a value of 1.
The reason for this additional argument at the codegen level is
because in future patches we will introduce various generic DAG
combines such as

  mul step_vector(1), 2 -> step_vector(2)
  add step_vector(1), step_vector(1) -> step_vector(2)
  shl step_vector(1), 1 -> step_vector(2)
  etc.

that encourage a canonical format for all targets. This hopefully
means all other targets supporting scalable vectors can benefit
from this too.

I've added cost model tests for both fixed width and scalable
vectors:

  llvm/test/Analysis/CostModel/AArch64/neon-stepvector.ll
  llvm/test/Analysis/CostModel/AArch64/sve-stepvector.ll

as well as codegen lowering tests for fixed width and scalable
vectors:

  llvm/test/CodeGen/AArch64/neon-stepvector.ll
  llvm/test/CodeGen/AArch64/sve-stepvector.ll

See this thread for discussion of the intrinsic:
https://lists.llvm.org/pipermail/llvm-dev/2021-January/147943.html
2021-03-23 10:43:35 +00:00
..
GlobalISel [GlobalISel] Add G_SBFX + G_UBFX (bitfield extraction opcodes) 2021-03-19 14:37:19 -07:00
AArch64SelectionDAGTest.cpp [IR][SVE] Add new llvm.experimental.stepvector intrinsic 2021-03-23 10:43:35 +00:00
AllocationOrderTest.cpp [NFC][regalloc] Separate iteration from AllocationOrder 2020-10-05 16:13:18 -07:00
AsmPrinterDwarfTest.cpp [debug-info] refactor emitDwarfUnitLength 2021-02-25 21:00:25 -05:00
CMakeLists.txt [SelectionDAG] Avoid aliasing analysis if the object size is unknown. 2020-11-25 06:13:37 +08:00
DIEHashTest.cpp [DebugInfo] Simplify DIEInteger::SizeOf(). 2020-09-17 12:47:38 +07:00
DIETest.cpp [DebugInfo] Use a common method to determine a suitable form for section offsts (6/19). 2020-09-15 11:30:38 +07:00
LexicalScopesTest.cpp [docs][unittest][Go][StackProtector] Migrate deprecated DebugInfo::get to DILocation::get 2020-12-15 14:17:04 -08:00
LowLevelTypeTest.cpp Revert "GlobalISel: Make LLT constructors constexpr" 2020-06-17 15:31:12 +02:00
MachineInstrBundleIteratorTest.cpp
MachineInstrTest.cpp Switch from llvm::is_trivially_copyable to std::is_trivially_copyable 2020-12-02 22:02:48 -08:00
MachineOperandTest.cpp Revert "Revert "[MIR] Target specific MIR formating and parsing"" 2020-01-08 20:03:29 -08:00
MFCommon.inc [X86][MC][Target] Initial backend support a tune CPU to support -mtune 2020-08-14 15:31:50 -07:00
PassManagerTest.cpp Reland "Revert "[NewPM][CodeGen] Introduce machine pass and machine pass manager"" 2020-08-07 16:40:49 -07:00
ScalableVectorMVTsTest.cpp [SVE] Remove reliance on TypeSize comparison operators in unit tests 2020-10-21 08:05:55 +01:00
SelectionDAGAddressAnalysisTest.cpp [SelectionDAG] Don't pass a scalable vector to MachinePointerInfo::getWithOffset in a unit test. 2021-03-18 15:19:22 -07:00
TargetOptionsTest.cpp [unittests] Add InitializePasses.h includes 2019-11-13 19:42:58 -08:00
TestAsmPrinter.cpp [DebugInfo] Fix methods of AsmPrinter to emit values corresponding to the DWARF format (1/19). 2020-09-15 11:29:48 +07:00
TestAsmPrinter.h [debug-info] refactor emitDwarfUnitLength 2021-02-25 21:00:25 -05:00
TypeTraitsTest.cpp Switch from llvm::is_trivially_copyable to std::is_trivially_copyable 2020-12-02 22:02:48 -08:00