summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2019-04-12 18:11:58 +0000
committerPhilip Reames <listmail@philipreames.com>2019-04-12 18:11:58 +0000
commit7a60cd38af5563ebe4efa6f1544dca5a5ebebbee (patch)
treef9a885c09ae5579ab9932f810e70e9b72dfff82d /llvm
parentc7c1f21525f88d8efd13a01ece50504d10d012fa (diff)
downloadbcm5719-llvm-7a60cd38af5563ebe4efa6f1544dca5a5ebebbee.tar.gz
bcm5719-llvm-7a60cd38af5563ebe4efa6f1544dca5a5ebebbee.zip
[Tests] Checkin a test demonstrating a miscompile so that patch which fixes it shows a clear diff
llvm-svn: 358296
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/Transforms/InstCombine/masked_intrinsics.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/masked_intrinsics.ll b/llvm/test/Transforms/InstCombine/masked_intrinsics.ll
index 22d3f11d8a5..48c8f78f990 100644
--- a/llvm/test/Transforms/InstCombine/masked_intrinsics.ll
+++ b/llvm/test/Transforms/InstCombine/masked_intrinsics.ll
@@ -4,6 +4,7 @@
declare <2 x double> @llvm.masked.load.v2f64.p0v2f64(<2 x double>* %ptrs, i32, <2 x i1> %mask, <2 x double> %src0)
declare void @llvm.masked.store.v2f64.p0v2f64(<2 x double> %val, <2 x double>* %ptrs, i32, <2 x i1> %mask)
declare <2 x double> @llvm.masked.gather.v2f64.v2p0f64(<2 x double*> %ptrs, i32, <2 x i1> %mask, <2 x double> %passthru)
+declare <4 x double> @llvm.masked.gather.v4f64.p0v4f64(<4 x double*> %ptrs, i32, <4 x i1> %mask, <4 x double> %passthru)
declare void @llvm.masked.scatter.v2f64.v2p0f64(<2 x double> %val, <2 x double*> %ptrs, i32, <2 x i1> %mask)
define <2 x double> @load_zeromask(<2 x double>* %ptr, <2 x double> %passthru) {
@@ -55,6 +56,20 @@ define <2 x double> @load_lane0(<2 x double>* %ptr, double %pt) {
ret <2 x double> %res
}
+; FIXME: the output here demonstrates a miscompile!
+define double @load_all(double* %base, double %pt) {
+; CHECK-LABEL: @load_all(
+; CHECK-NEXT: [[PTRS:%.*]] = getelementptr double, double* [[BASE:%.*]], <4 x i64> <i64 undef, i64 undef, i64 2, i64 undef>
+; CHECK-NEXT: [[RES:%.*]] = call <4 x double> @llvm.masked.gather.v4f64.v4p0f64(<4 x double*> [[PTRS]], i32 4, <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x double> undef)
+; CHECK-NEXT: [[ELT:%.*]] = extractelement <4 x double> [[RES]], i64 2
+; CHECK-NEXT: ret double [[ELT]]
+;
+ %ptrs = getelementptr double, double* %base, <4 x i64> <i64 0, i64 1, i64 2, i64 3>
+ %res = call <4 x double> @llvm.masked.gather.v4f64.p0v4f64(<4 x double*> %ptrs, i32 4, <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x double> undef)
+ %elt = extractelement <4 x double> %res, i64 2
+ ret double %elt
+}
+
define <2 x double> @load_generic(<2 x double>* %ptr, double %pt,
; CHECK-LABEL: @load_generic(
; CHECK-NEXT: [[PTV1:%.*]] = insertelement <2 x double> undef, double [[PT:%.*]], i64 0
OpenPOWER on IntegriCloud