diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-12-25 14:56:21 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-12-25 14:56:21 +0000 |
commit | 6607716368ba04454ff9ad62ac25936357d67c51 (patch) | |
tree | cd08a448ef8066db3fb3235e350885849923783b /test | |
parent | 50ec431c9fafaf06a6dcfa8d9d298eda8cda6092 (diff) | |
download | external_llvm-6607716368ba04454ff9ad62ac25936357d67c51.zip external_llvm-6607716368ba04454ff9ad62ac25936357d67c51.tar.gz external_llvm-6607716368ba04454ff9ad62ac25936357d67c51.tar.bz2 |
[msan] Fix handling of select with vector condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171069 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Instrumentation/MemorySanitizer/msan_basic.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Instrumentation/MemorySanitizer/msan_basic.ll b/test/Instrumentation/MemorySanitizer/msan_basic.ll index 1e2be00..3237e91 100644 --- a/test/Instrumentation/MemorySanitizer/msan_basic.ll +++ b/test/Instrumentation/MemorySanitizer/msan_basic.ll @@ -251,6 +251,23 @@ entry: ; CHECK: ret i32 +; Check that we propagate origin for "select" with vector condition. +; Select condition is flattened to i1, which is then used to select one of the +; argument origins. + +define <8 x i16> @SelectVector(<8 x i16> %a, <8 x i16> %b, <8 x i1> %c) nounwind uwtable readnone { +entry: + %cond = select <8 x i1> %c, <8 x i16> %a, <8 x i16> %b + ret <8 x i16> %cond +} + +; CHECK-ORIGINS: @SelectVector +; CHECK-ORIGINS: bitcast <8 x i1> {{.*}} to i8 +; CHECK-ORIGINS: icmp ne i8 +; CHECK-ORIGINS: select i1 +; CHECK-ORIGINS: ret <8 x i16> + + define i8* @IntToPtr(i64 %x) nounwind uwtable readnone { entry: %0 = inttoptr i64 %x to i8* |