mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
[msan] A comment on ICmp handling logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173453 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1211,6 +1211,9 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
|
|||||||
A = IRB.CreatePointerCast(A, Sa->getType());
|
A = IRB.CreatePointerCast(A, Sa->getType());
|
||||||
B = IRB.CreatePointerCast(B, Sb->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();
|
bool IsSigned = I.isSigned();
|
||||||
Value *S1 = IRB.CreateICmp(I.getPredicate(),
|
Value *S1 = IRB.CreateICmp(I.getPredicate(),
|
||||||
getLowestPossibleValue(IRB, A, Sa, IsSigned),
|
getLowestPossibleValue(IRB, A, Sa, IsSigned),
|
||||||
|
Reference in New Issue
Block a user