aboutsummaryrefslogtreecommitdiffstats
path: root/test/Instrumentation
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2013-10-14 09:52:09 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2013-10-14 09:52:09 +0000
commita0f6d1651b08254982244e18afcdd513ca34a3ca (patch)
tree877837e5becf44ab7cde0f06a28da23243e70875 /test/Instrumentation
parent55240a5ddbaebc44c9acb0353c18a394b06f348f (diff)
downloadexternal_llvm-a0f6d1651b08254982244e18afcdd513ca34a3ca.zip
external_llvm-a0f6d1651b08254982244e18afcdd513ca34a3ca.tar.gz
external_llvm-a0f6d1651b08254982244e18afcdd513ca34a3ca.tar.bz2
[msan] Fix handling of scalar select of vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192575 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation')
-rw-r--r--test/Instrumentation/MemorySanitizer/msan_basic.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Instrumentation/MemorySanitizer/msan_basic.ll b/test/Instrumentation/MemorySanitizer/msan_basic.ll
index 02c03ef..ad9c5d7 100644
--- a/test/Instrumentation/MemorySanitizer/msan_basic.ll
+++ b/test/Instrumentation/MemorySanitizer/msan_basic.ll
@@ -290,6 +290,25 @@ entry:
; CHECK-ORIGINS: ret <8 x i16>
+; Check that we propagate origin for "select" with scalar condition and vector
+; arguments. Select condition shadow is sign-extended to the vector type and
+; mixed into the result shadow.
+
+define <8 x i16> @SelectVector2(<8 x i16> %a, <8 x i16> %b, i1 %c) nounwind uwtable readnone sanitize_memory {
+entry:
+ %cond = select i1 %c, <8 x i16> %a, <8 x i16> %b
+ ret <8 x i16> %cond
+}
+
+; CHECK: @SelectVector2
+; CHECK: select i1
+; CHECK: sext i1 {{.*}} to i128
+; CHECK: bitcast i128 {{.*}} to <8 x i16>
+; CHECK: or <8 x i16>
+; CHECK: select i1
+; CHECK: ret <8 x i16>
+
+
define { i64, i64 } @SelectStruct(i1 zeroext %x, { i64, i64 } %a, { i64, i64 } %b) readnone sanitize_memory {
entry:
%c = select i1 %x, { i64, i64 } %a, { i64, i64 } %b