OSDN Git Service

Support arbitrary addrspace pointers in masked load/store intrinsics
authorArtur Pilipenko <apilipenko@azulsystems.com>
Tue, 28 Jun 2016 18:27:25 +0000 (18:27 +0000)
committerArtur Pilipenko <apilipenko@azulsystems.com>
Tue, 28 Jun 2016 18:27:25 +0000 (18:27 +0000)
commit48917c9e442f632f6bfc9dcc593ea4253df81d5e
treeafaaf183313841aa440a856c94e2345e88d4052f
parent041fc266abc76b93284ace7d22359c9ba40ef9cc
Support arbitrary addrspace pointers in masked load/store intrinsics

This is a resubmittion of 263158 change after fixing the existing problem with intrinsics mangling (see LTO and intrinsics mangling llvm-dev thread for details).

This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace.

The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics.

Reviewed By: reames

Differential Revision: http://reviews.llvm.org/D17270

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274043 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
docs/LangRef.rst
include/llvm/IR/IRBuilder.h
include/llvm/IR/Intrinsics.td
lib/IR/AutoUpgrade.cpp
lib/IR/IRBuilder.cpp
test/Analysis/CostModel/X86/masked-intrinsic-cost.ll
test/Assembler/auto_upgrade_intrinsics.ll
test/CodeGen/X86/avx512-bugfix-26264.ll
test/CodeGen/X86/masked_memop.ll
test/Transforms/InstCombine/masked_intrinsics.ll
test/Transforms/InstCombine/x86-masked-memops.ll
test/Transforms/LoopVectorize/X86/masked_load_store.ll