diff options
author | Derek Bruening <bruening@google.com> | 2016-07-06 20:13:53 +0000 |
---|---|---|
committer | Derek Bruening <bruening@google.com> | 2016-07-06 20:13:53 +0000 |
commit | d712a3c10eb9f57c86334423399f9a003a7da96b (patch) | |
tree | 45b35ccffa82b27efe3316af775bab61c8261d4d /llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp | |
parent | eaa85136a5d250fa39285c45abfd4979470ac09f (diff) | |
download | llvm-d712a3c10eb9f57c86334423399f9a003a7da96b.zip llvm-d712a3c10eb9f57c86334423399f9a003a7da96b.tar.gz llvm-d712a3c10eb9f57c86334423399f9a003a7da96b.tar.bz2 |
[esan|wset] Fix incorrect memory size assert
Summary:
Fixes an incorrect assert that fails on 128-bit-sized loads or stores.
Augments the wset tests to include this case.
Reviewers: aizatsky
Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits
Differential Revision: http://reviews.llvm.org/D22062
llvm-svn: 274666
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp index 6640e7b..111b087 100644 --- a/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp @@ -671,7 +671,7 @@ bool EfficiencySanitizer::instrumentLoadOrStore(Instruction *I, NumFastpaths++; return true; } - if (Alignment == 0 || Alignment >= 8 || (Alignment % TypeSizeBytes) == 0) + if (Alignment == 0 || (Alignment % TypeSizeBytes) == 0) OnAccessFunc = IsStore ? EsanAlignedStore[Idx] : EsanAlignedLoad[Idx]; else OnAccessFunc = IsStore ? EsanUnalignedStore[Idx] : EsanUnalignedLoad[Idx]; @@ -832,7 +832,7 @@ bool EfficiencySanitizer::instrumentFastpathWorkingSet( // getMemoryAccessFuncIndex has already ruled out a size larger than 16 // and thus larger than a cache line for platforms this tool targets // (and our shadow memory setup assumes 64-byte cache lines). - assert(TypeSize <= 64); + assert(TypeSize <= 128); if (!(TypeSize == 8 || (Alignment % (TypeSize / 8)) == 0)) { if (ClAssumeIntraCacheLine) |