llvm-6502/utils
Elena Demikhovsky 8be39c81b0 Masked Gather and Scatter Intrinsics.
Gather and Scatter are new introduced intrinsics, comming after recently implemented masked load and store.
This is the first patch for Gather and Scatter intrinsics. It includes only the syntax, parsing and verification.

Gather and Scatter intrinsics allow to perform multiple memory accesses (read/write) in one vector instruction.
The intrinsics are not target specific and will have the following syntax:
Gather:
declare <16 x i32> @llvm.masked.gather.v16i32(<16 x i32*> <vector of ptrs>, i32 <alignment>, <16 x i1> <mask>, <16 x i32> <passthru>)
declare <8 x float> @llvm.masked.gather.v8f32(<8 x float*><vector of ptrs>, i32 <alignment>, <8 x i1> <mask>, <8 x float><passthru>)

Scatter:
declare void @llvm.masked.scatter.v8i32(<8 x i32><vector value to be stored> , <8 x i32*><vector of ptrs> , i32 <alignment>, <8 x i1> <mask>)
declare void @llvm.masked.scatter.v16i32(<16 x i32> <vector value to be stored> , <16 x i32*> <vector of ptrs>, i32 <alignment>, <16 x i1><mask> )

Vector of ptrs - a set of source/destination addresses, to load/store the value. 
Mask - switches on/off vector lanes to prevent memory access for switched-off lanes
vector of ptrs, value and mask should have the same vector width.

These are code examples where gather / scatter should be used and will allow function vectorization
;void foo1(int * restrict A, int * restrict B, int * restrict C) {
; for (int i=0; i<SIZE; i++) {
; A[i] = B[C[i]];
; }
;}

;void foo3(int * restrict A, int * restrict B) {
; for (int i=0; i<SIZE; i++) {
; A[B[i]] = i+5;
; }
;}

Tests will come in the following patches, with CodeGen and Vectorizer.

http://reviews.llvm.org/D7433



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228521 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 08:27:19 +00:00
..
bugpoint
buildit
count
crosstool
emacs Correcting keyword highlighting in llvm-mode.el. 2015-02-06 13:57:58 +00:00
FileCheck Make StringSet::insert return pair<iterator, bool> like other self-associative containers 2014-11-19 02:56:00 +00:00
fpcmp
git
git-svn Update git-svnrevert to accept git and svn revisions 2014-10-08 09:32:47 +00:00
jedit
kate
KillTheDoctor
lint
lit Don't warn or note if bash is missing 2015-02-04 22:36:52 +00:00
llvm-build Teach llvm-build to avoid touching LibraryDependencies.inc unless the contents 2014-11-19 03:34:20 +00:00
llvm-lit
Misc
not Add a small "usage:" comment at the top of not.cpp 2014-11-26 22:53:46 +00:00
PerfectShuffle
release utils/release/tag.sh: fix -revision vs. -rc check 2015-01-15 04:36:20 +00:00
TableGen Masked Gather and Scatter Intrinsics. 2015-02-08 08:27:19 +00:00
Target/ARM
testgen
textmate
unittest Use -Wl,defs when linking. 2015-01-20 21:23:15 +00:00
valgrind valgrind/x86_64-pc-linux-gnu.supp: Suppress also /bin/bash. 2014-09-24 04:38:20 +00:00
vim AsmParser: Recognize DW_TAG_* constants 2015-02-03 21:56:01 +00:00
yaml-bench
bisect
check-each-file
clang-parse-diagnostics-file
codegen-diff
countloc.sh
DSAclean.py
DSAextract.py
findmisopt Delete -std-compile-opts. 2014-10-16 20:00:02 +00:00
findoptdiff
findsym.pl
GenLibDeps.pl
GetRepositoryPath
GetSourceVersion
getsrcs.sh
lldbDataFormatters.py utils: Teach lldbDataFormatters how to format ArrayRefs 2014-09-11 01:47:38 +00:00
llvm-compilers-check
llvm-native-gxx
llvm.grm
llvm.natvis
LLVMBuild.txt
llvmdo
llvmgrep
Makefile
makellvm
shuffle_fuzz.py
sort_includes.py
test_debuginfo.pl
update_llc_test_checks.py [x86] Teach the test update script to strip trailing whitespace. 2015-02-04 10:46:48 +00:00
UpdateCMakeLists.pl
wciia.py