1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/unittests/IR
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
..
AbstractCallSiteTest.cpp
AsmWriterTest.cpp
AttributesTest.cpp [IR] Short-circuit comparison with itself for Attributes 2020-07-03 16:07:14 +03:00
BasicBlockTest.cpp [RGT] Recode more unreachable assertions and tautologies 2021-03-19 09:17:22 -07:00
CFGBuilder.cpp Switch from llvm::is_trivially_copyable to std::is_trivially_copyable 2020-12-02 22:02:48 -08:00
CFGBuilder.h
CMakeLists.txt [NFC] Add missing dependency in the IR unittests 2020-11-18 10:10:44 +00:00
ConstantRangeTest.cpp [ConstantRange] Handle wrapping ranges in min/max (PR48643) 2021-02-20 22:52:09 +01:00
ConstantsTest.cpp Add ConstantDataVector::getRaw() to create a constant data vector from raw data. 2021-03-16 11:57:53 -07:00
DataLayoutTest.cpp Add a default address space for globals to DataLayout 2020-11-20 15:46:52 +00:00
DebugInfoTest.cpp Reapply "[DebugInfo] Handle multiple variable location operands in IR" 2021-03-17 16:45:25 +00:00
DebugTypeODRUniquingTest.cpp [DebugInfo] Support for DWARF attribute DW_AT_rank 2020-10-10 17:51:12 +05:30
DemandedBitsTest.cpp [DemandedBits] Improve accuracy of Add propagator 2020-08-17 12:54:09 +01:00
DominatorTreeBatchUpdatesTest.cpp
DominatorTreeTest.cpp [DomTree] Accept Value as Def (NFC) 2020-10-22 18:32:03 +02:00
FunctionTest.cpp
InstructionsTest.cpp [CallBase] Add hasRetAttr version that takes StringRef. 2020-12-10 17:00:16 +00:00
IntrinsicsTest.cpp
IRBuilderTest.cpp [IR][SVE] Add new llvm.experimental.stepvector intrinsic 2021-03-23 10:43:35 +00:00
LegacyPassManagerTest.cpp [CallGraph] Preserve call records vector when replacing call edge 2020-07-27 06:02:55 -07:00
ManglerTest.cpp [XCOFF][AIX] Use 'L..' instead of '.L' for getPrivateGlobalPrefix in DataLayout 2020-07-03 18:25:14 +00:00
MDBuilderTest.cpp
MetadataTest.cpp [DebugInfo] Add replaceArg function to simplify DBG_VALUE_LIST expressions 2021-03-09 17:41:04 +00:00
ModuleTest.cpp [llvm][NFC] Add missing 'override's in unittests/ 2020-07-17 17:35:59 -07:00
PassBuilderCallbacksTest.cpp [LoopNest] Handle loop-nest passes in LoopPassManager 2020-12-16 17:07:14 +00:00
PassManagerTest.cpp [IR] PassManagerTest: Register DominatorTreeAnalysis before running SimplifyCFGPass 2021-01-02 01:01:18 +03:00
PatternMatch.cpp Use unary CreateShuffleVector if possible 2020-12-30 22:36:08 +09:00
TimePassesTest.cpp [NewPM][PassInstrumentation] Add PreservedAnalyses parameter to AfterPass* callbacks 2020-08-21 16:10:42 +07:00
TypesTest.cpp
UserTest.cpp [NFC] Edit the comment in User::replaceUsesOfWith 2020-07-29 10:02:04 +08:00
UseTest.cpp
ValueHandleTest.cpp Fixup Asserts+!AbiBreakingChecks fallout from db33f85c7124 2021-01-07 14:18:19 -08:00
ValueMapTest.cpp
ValueTest.cpp
VectorTypesTest.cpp [SVE] Remove reliance on TypeSize comparison operators in unit tests 2020-10-21 08:05:55 +01:00
VerifierTest.cpp Revert "Revert "[NFC][llvm] Make the contructors of ElementCount private."" 2020-08-19 17:26:36 +00:00
VPIntrinsicTest.cpp [VP][Fix] canIgnoreVectorLength for scalable types 2020-06-04 14:17:42 +02:00