[llvm-commits] [llvm] r173453 - /llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Evgeniy Stepanov eugeni.stepanov at gmail.com
Fri Jan 25 07:35:29 PST 2013


Author: eugenis
Date: Fri Jan 25 09:35:29 2013
New Revision: 173453

URL: http://llvm.org/viewvc/llvm-project?rev=173453&view=rev
Log:
[msan] A comment on ICmp handling logic.

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp?rev=173453&r1=173452&r2=173453&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp Fri Jan 25 09:35:29 2013
@@ -1211,6 +1211,9 @@
     A = IRB.CreatePointerCast(A, Sa->getType());
     B = IRB.CreatePointerCast(B, Sb->getType());
 
+    // Let [a0, a1] be the interval of possible values of A, taking into account
+    // its undefined bits. Let [b0, b1] be the interval of possible values of B.
+    // Then (A cmp B) is defined iff (a0 cmp b1) == (a1 cmp b0).
     bool IsSigned = I.isSigned();
     Value *S1 = IRB.CreateICmp(I.getPredicate(),
                                getLowestPossibleValue(IRB, A, Sa, IsSigned),





More information about the llvm-commits mailing list