llvm-project/llvm/test
David Sherwood 3fd96e1b2e [LoopVectorize] Improve vectorisation of some intrinsics by treating them as uniform
This patch adds more instructions to the Uniforms list, for example certain
intrinsics that are uniform by definition or whose operands are loop invariant.
This list includes:

  1. The intrinsics 'experimental.noalias.scope.decl' and 'sideeffect', which
  are always uniform by definition.
  2. If intrinsics 'lifetime.start', 'lifetime.end' and 'assume' have
  loop invariant input operands then these are also uniform too.

Also, in VPRecipeBuilder::handleReplication we check if an instruction is
uniform based purely on whether or not the instruction lives in the Uniforms
list. However, there are certain cases where calls to some intrinsics can
be effectively treated as uniform too. Therefore, we now also treat the
following cases as uniform for scalable vectors:

  1. If the 'assume' intrinsic's operand is not loop invariant, then we
  are free to treat this as uniform anyway since it's only a performance
  hint. We will get the benefit for the first lane.
  2. When the input pointers for 'lifetime.start' and 'lifetime.end' are loop
  variant then for scalable vectors we assume these still ultimately come
  from the broadcast of an alloca. We do not support scalable vectorisation
  of loops containing alloca instructions, hence the alloca itself would
  be invariant. If the pointer does not come from an alloca then the
  intrinsic itself has no effect.

I have updated the assume test for fixed width, since we now treat it
as uniform:

  Transforms/LoopVectorize/assume.ll

I've also added new scalable vectorisation tests for other intriniscs:

  Transforms/LoopVectorize/scalable-assume.ll
  Transforms/LoopVectorize/scalable-lifetime.ll
  Transforms/LoopVectorize/scalable-noalias-scope-decl.ll

Differential Revision: https://reviews.llvm.org/D107284
2021-08-06 10:13:15 +01:00
..
Analysis [AArch64] Expand the SVE min/max reduction costs to NEON 2021-08-05 23:23:24 +01:00
Assembler Replace "CHECK-NOT: #{{.*}}" with same-line positive checks. NFC. 2021-08-05 21:55:23 -07:00
Bindings
Bitcode [IR] Rename `comdat noduplicates` to `comdat nodeduplicate` 2021-07-20 12:47:10 -07:00
BugPoint
CodeGen [AMDGPU][GlobalISel] Better legalization of 32-bit ctlz/cttz 2021-08-06 09:40:48 +01:00
DebugInfo Add a DIExpression const-folder to prevent silly expressions. 2021-08-05 06:14:40 -07:00
Demangle Demangle: correct swift_async demangling for Microsoft scheme 2021-07-14 11:43:44 -07:00
Examples [Orc][examples] Adopt ExecutorProcessControl API and re-enable LLJITWithRemoteDebugging 2021-07-29 14:40:42 +02:00
ExecutionEngine [JITLink][RISCV] Add relocation fixup test 2021-08-06 14:35:59 +08:00
Feature
FileCheck
Instrumentation [InstrProfiling] Emit bias variable eagerly 2021-08-04 10:17:08 -07:00
Integer
JitListener
LTO [LTO] Add SelectionKind to IRSymtab and use it in ld.lld/LLVMgold 2021-07-20 13:22:00 -07:00
Linker [IR] Rename `comdat noduplicates` to `comdat nodeduplicate` 2021-07-20 12:47:10 -07:00
MC [llvm][MC] Disable cfi-version test for Windows on Arm 2021-08-04 11:18:05 +00:00
MachineVerifier [MachineVerifier] Make INSERT_SUBREG diagnostic respect operand 2 subregs 2021-07-21 08:47:17 -07:00
Object [llvm-ar] Fix for handling thin archive with SYM64 and a test case for it 2021-08-05 10:06:34 -07:00
ObjectYAML [yaml2obj][MachO] Rename PayloadString to Content 2021-07-26 09:04:51 -07:00
Other [ConstantFold] Get rid of special cases for sizeof etc. 2021-07-31 13:20:47 -07:00
SafepointIRVerifier
Support
SymbolRewriter [IR] Rename `comdat noduplicates` to `comdat nodeduplicate` 2021-07-20 12:47:10 -07:00
TableGen
ThinLTO/X86 ThinLTO: Fix inline assembly references to static functions with CFI 2021-08-03 11:35:30 -07:00
Transforms [LoopVectorize] Improve vectorisation of some intrinsics by treating them as uniform 2021-08-06 10:13:15 +01:00
Unit
Verifier [Verifier] Check byval/etc type when comparing ABI attributes 2021-07-20 20:19:47 +02:00
YAMLParser
tools [llvm-rc] Allow specifying language with a leading 0x prefix 2021-08-05 10:19:55 +03:00
.clang-format
CMakeLists.txt [test] Add llvm-stress to LLVM_TEST_DEPENDS and lit substitutions 2021-07-22 09:37:01 -07:00
TestRunner.sh
lit.cfg.py [llvm][MC] Disable cfi-version test for Windows on Arm 2021-08-04 11:18:05 +00:00
lit.site.cfg.py.in