-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[NFC][msan] Workaround arg evaluation order diff GCC vs Clang #113378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFC][msan] Workaround arg evaluation order diff GCC vs Clang #113378
Conversation
Created using spr 1.3.4
@llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-compiler-rt-sanitizer Author: Vitaly Buka (vitalybuka) ChangesFull diff: https://github.com/llvm/llvm-project/pull/113378.diff 1 Files Affected:
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
index 9e174e2415e719..63810e875ae0a2 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -2750,12 +2750,12 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
// 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),
- getHighestPossibleValue(IRB, B, Sb, IsSigned));
- Value *S2 = IRB.CreateICmp(I.getPredicate(),
- getHighestPossibleValue(IRB, A, Sa, IsSigned),
- getLowestPossibleValue(IRB, B, Sb, IsSigned));
+ Value *Amin = getLowestPossibleValue(IRB, A, Sa, IsSigned);
+ Value *Bmax = getHighestPossibleValue(IRB, B, Sb, IsSigned);
+ Value *S1 = IRB.CreateICmp(I.getPredicate(), Amin, Bmax);
+ Value *Amax = getHighestPossibleValue(IRB, A, Sa, IsSigned);
+ Value *Bmin = getLowestPossibleValue(IRB, B, Sb, IsSigned);
+ Value *S2 = IRB.CreateICmp(I.getPredicate(), Amax, Bmin);
Value *Si = IRB.CreateXor(S1, S2);
setShadow(&I, Si);
setOriginForNaryOp(I);
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/134/builds/7333 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/8734 Here is the relevant piece of the build log for the reference
|
No description provided.