summaryrefslogtreecommitdiffstats
path: root/llvm/test/Assembler
diff options
context:
space:
mode:
authorArtur Pilipenko <apilipenko@azulsystems.com>2016-06-28 18:27:25 +0000
committerArtur Pilipenko <apilipenko@azulsystems.com>2016-06-28 18:27:25 +0000
commit7ad95ec22d17573d5a1c2edcd47b6510fdc65e18 (patch)
treef674828205e3f48cbbde2f1157c3042a3d055a1c /llvm/test/Assembler
parentf43266b86850ac0b2505d02b6565ee65d3eaf513 (diff)
downloadbcm5719-llvm-7ad95ec22d17573d5a1c2edcd47b6510fdc65e18.tar.gz
bcm5719-llvm-7ad95ec22d17573d5a1c2edcd47b6510fdc65e18.zip
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 llvm-svn: 274043
Diffstat (limited to 'llvm/test/Assembler')
-rw-r--r--llvm/test/Assembler/auto_upgrade_intrinsics.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/Assembler/auto_upgrade_intrinsics.ll b/llvm/test/Assembler/auto_upgrade_intrinsics.ll
index fe41f28d59c..af211721107 100644
--- a/llvm/test/Assembler/auto_upgrade_intrinsics.ll
+++ b/llvm/test/Assembler/auto_upgrade_intrinsics.ll
@@ -58,6 +58,24 @@ define i32 @test.objectsize() {
ret i32 %s
}
+declare <2 x double> @llvm.masked.load.v2f64(<2 x double>* %ptrs, i32, <2 x i1> %mask, <2 x double> %src0)
+
+define <2 x double> @tests.masked.load(<2 x double>* %ptr, <2 x i1> %mask, <2 x double> %passthru) {
+; CHECK-LABEL: @tests.masked.load(
+; CHECK: @llvm.masked.load.v2f64.p0v2f64
+ %res = call <2 x double> @llvm.masked.load.v2f64(<2 x double>* %ptr, i32 1, <2 x i1> %mask, <2 x double> %passthru)
+ ret <2 x double> %res
+}
+
+declare void @llvm.masked.store.v2f64(<2 x double> %val, <2 x double>* %ptrs, i32, <2 x i1> %mask)
+
+define void @tests.masked.store(<2 x double>* %ptr, <2 x i1> %mask, <2 x double> %val) {
+; CHECK-LABEL: @tests.masked.store(
+; CHECK: @llvm.masked.store.v2f64.p0v2f64
+ call void @llvm.masked.store.v2f64(<2 x double> %val, <2 x double>* %ptr, i32 3, <2 x i1> %mask)
+ ret void
+}
+
@__stack_chk_guard = external global i8*
declare void @llvm.stackprotectorcheck(i8**)
OpenPOWER on IntegriCloud