aboutsummaryrefslogtreecommitdiffstats
path: root/test/Instrumentation/MemorySanitizer/msan_basic.ll
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-12-05 14:39:55 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-12-05 14:39:55 +0000
commit1e3b656be52e94c523d5fdb5a586a62ec59c3c51 (patch)
tree175995872d336c2e246de066c6d10149bf2800be /test/Instrumentation/MemorySanitizer/msan_basic.ll
parent1b3fcf94a49fbbf0b1d0fb6086c3349c2092bd75 (diff)
downloadexternal_llvm-1e3b656be52e94c523d5fdb5a586a62ec59c3c51.zip
external_llvm-1e3b656be52e94c523d5fdb5a586a62ec59c3c51.tar.gz
external_llvm-1e3b656be52e94c523d5fdb5a586a62ec59c3c51.tar.bz2
[msan] Instrument bswap intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169383 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation/MemorySanitizer/msan_basic.ll')
-rw-r--r--test/Instrumentation/MemorySanitizer/msan_basic.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Instrumentation/MemorySanitizer/msan_basic.ll b/test/Instrumentation/MemorySanitizer/msan_basic.ll
index 05cdaa7..a62b600 100644
--- a/test/Instrumentation/MemorySanitizer/msan_basic.ll
+++ b/test/Instrumentation/MemorySanitizer/msan_basic.ll
@@ -351,3 +351,19 @@ define <4 x i32> @ShuffleVector(<4 x i32> %vec, <4 x i32> %vec1) {
; CHECK-NOT: call void @__msan_warning
; CHECK: shufflevector
; CHECK: ret <4 x i32>
+
+; Test bswap intrinsic instrumentation
+define i32 @BSwap(i32 %x) nounwind uwtable readnone {
+ %y = tail call i32 @llvm.bswap.i32(i32 %x)
+ ret i32 %y
+}
+
+declare i32 @llvm.bswap.i32(i32) nounwind readnone
+
+; CHECK: @BSwap
+; CHECK-NOT: call void @__msan_warning
+; CHECK: @llvm.bswap.i32
+; CHECK-NOT: call void @__msan_warning
+; CHECK: @llvm.bswap.i32
+; CHECK-NOT: call void @__msan_warning
+; CHECK: ret i32