summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstSimplify/call.ll
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-07-14 06:58:37 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-07-14 06:58:37 +0000
commit17a95aaa7b63bb7f41be61dc5327c9ea46765c6a (patch)
treea88f3470c69433de0bba5e755afaefbae784856a /llvm/test/Transforms/InstSimplify/call.ll
parent6840f1150f5c550d62aececfa8e061465574deb6 (diff)
downloadbcm5719-llvm-17a95aaa7b63bb7f41be61dc5327c9ea46765c6a.tar.gz
bcm5719-llvm-17a95aaa7b63bb7f41be61dc5327c9ea46765c6a.zip
Simplify llvm.masked.load w/ undef masks
We can always pick the passthru value if the mask is undef: we are permitted to treat the mask as-if it were filled with zeros. llvm-svn: 275379
Diffstat (limited to 'llvm/test/Transforms/InstSimplify/call.ll')
-rw-r--r--llvm/test/Transforms/InstSimplify/call.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstSimplify/call.ll b/llvm/test/Transforms/InstSimplify/call.ll
index e0a071a3bb1..988ec2b71c5 100644
--- a/llvm/test/Transforms/InstSimplify/call.ll
+++ b/llvm/test/Transforms/InstSimplify/call.ll
@@ -213,6 +213,13 @@ define <8 x i32> @partial_masked_load() {
ret <8 x i32> %masked.load
}
+define <8 x i32> @masked_load_undef_mask(<8 x i32>* %V) {
+; CHECK-LABEL: @masked_load_undef_mask(
+; CHECK: ret <8 x i32> <i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0>
+ %masked.load = call <8 x i32> @llvm.masked.load.v8i32.p0v8i32(<8 x i32>* %V, i32 4, <8 x i1> undef, <8 x i32> <i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0>)
+ ret <8 x i32> %masked.load
+}
+
declare noalias i8* @malloc(i64)
declare <8 x i32> @llvm.masked.load.v8i32.p0v8i32(<8 x i32>*, i32, <8 x i1>, <8 x i32>)
OpenPOWER on IntegriCloud