diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-11-30 12:12:20 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-11-30 12:12:20 +0000 |
commit | 98c63d0e1c38942257e12c658f58ddc2a15d75a1 (patch) | |
tree | 9123341a3954e875df599cb3fa8ebd606219121a /test/Instrumentation | |
parent | 4334dd96a9e622fdcf2825a8f73a2d941d67be72 (diff) |
[msan] Tests for vector manipulation instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168997 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation')
-rw-r--r-- | test/Instrumentation/MemorySanitizer/msan_basic.ll | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/Instrumentation/MemorySanitizer/msan_basic.ll b/test/Instrumentation/MemorySanitizer/msan_basic.ll index 8d729d6d41..99a44d583b 100644 --- a/test/Instrumentation/MemorySanitizer/msan_basic.ll +++ b/test/Instrumentation/MemorySanitizer/msan_basic.ll @@ -305,3 +305,40 @@ define i32 @ShadowLoadAlignmentSmall() nounwind uwtable { ; CHECK: load i32* {{.*}} align 2 ; CHECK: load volatile i32* {{.*}} align 2 ; CHECK: } + + +; Test vector manipulation instructions. + +define i32 @ExtractElement(<4 x i32> %vec, i32 %idx) { + %x = extractelement <4 x i32> %vec, i32 %idx + ret i32 %x +} + +; CHECK: define i32 @ExtractElement +; CHECK: extractelement +; CHECK: br +; CHECK: extractelement +; CHECK: } + +define <4 x i32> @InsertElement(<4 x i32> %vec, i32 %idx, i32 %x) { + %vec1 = insertelement <4 x i32> %vec, i32 %x, i32 %idx + ret <4 x i32> %vec1 +} + +; CHECK: define <4 x i32> @InsertElement +; CHECK: insertelement +; CHECK: br +; CHECK: insertelement +; CHECK: } + +define <4 x i32> @ShuffleVector(<4 x i32> %vec, <4 x i32> %vec1) { + %vec2 = shufflevector <4 x i32> %vec, <4 x i32> %vec1, + <4 x i32> <i32 0, i32 4, i32 1, i32 5> + ret <4 x i32> %vec2 +} + +; CHECK: define <4 x i32> @ShuffleVector +; CHECK: shufflevector +; CHECK-NOT: br +; CHECK: shufflevector +; CHECK: } |