summaryrefslogtreecommitdiffstats
path: root/llvm/test/Instrumentation/AddressSanitizer
diff options
context:
space:
mode:
authorFilipe Cabecinhas <me@filcab.net>2017-02-23 17:10:28 +0000
committerFilipe Cabecinhas <me@filcab.net>2017-02-23 17:10:28 +0000
commit33dd486f1d8b2ee1a2db20ef66a26a9fe29f4dd4 (patch)
tree849c9e299b03edf9cfaa07d4424a5fba6cfcd1e7 /llvm/test/Instrumentation/AddressSanitizer
parent774ea7d0a945cd328ac31526d3daa212116131bb (diff)
downloadbcm5719-llvm-33dd486f1d8b2ee1a2db20ef66a26a9fe29f4dd4.tar.gz
bcm5719-llvm-33dd486f1d8b2ee1a2db20ef66a26a9fe29f4dd4.zip
[AddressSanitizer] Add PS4 offset
llvm-svn: 295994
Diffstat (limited to 'llvm/test/Instrumentation/AddressSanitizer')
-rw-r--r--llvm/test/Instrumentation/AddressSanitizer/ps4.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Instrumentation/AddressSanitizer/ps4.ll b/llvm/test/Instrumentation/AddressSanitizer/ps4.ll
new file mode 100644
index 00000000000..e160996866b
--- /dev/null
+++ b/llvm/test/Instrumentation/AddressSanitizer/ps4.ll
@@ -0,0 +1,14 @@
+; RUN: opt < %s -asan -asan-module -S -mtriple=x86_64-scei-ps4 | FileCheck %s
+
+define i32 @read_4_bytes(i32* %a) sanitize_address {
+entry:
+ %tmp1 = load i32, i32* %a, align 4
+ ret i32 %tmp1
+}
+
+; CHECK: @read_4_bytes
+; CHECK-NOT: ret
+; Check for ASAN's Offset on the PS4 (2^40 or 0x10000000000)
+; CHECK: lshr {{.*}} 3
+; CHECK-NEXT: {{1099511627776}}
+; CHECK: ret
OpenPOWER on IntegriCloud