[llvm] 8f70b84 - [CodeGen] Temporarily disable-lsr in HWASAN build

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 29 23:38:01 PST 2022


Author: Vitaly Buka
Date: 2022-12-29T23:37:49-08:00
New Revision: 8f70b848d339cabfaa8f1379d41dae11b9b75014

URL: https://github.com/llvm/llvm-project/commit/8f70b848d339cabfaa8f1379d41dae11b9b75014
DIFF: https://github.com/llvm/llvm-project/commit/8f70b848d339cabfaa8f1379d41dae11b9b75014.diff

LOG: [CodeGen] Temporarily disable-lsr in HWASAN build

HWASAN exposes some non-determinism in the pass and triggers:
ScalarEvolution.cpp:11540: bool llvm::ScalarEvolution::isLoopEntryGuardedByCond(const Loop *, ICmpInst::Predicate, const SCEV *, const SCEV *): Assertion `isAvailableAtLoopEntry(LHS, L) && "LHS is not available at Loop Entry"' failed.

E.g.
https://lab.llvm.org/buildbot/#/builders/236/builds/1629/steps/16/logs/stdio
is broken after D137838. I tried to split D137838 into smaller patches
and the one which reproduced was just a move of cpp from one dir to another.

Maybe it has something do to with comparison of tagged pointeres and
PtrSets used in pass.

Issues is hard to reproduce, even slight changes in path, or preprocessing
cpp file hide it.

Added: 
    

Modified: 
    llvm/lib/CodeGen/TargetPassConfig.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index 115f266a71506..9bf3215c21287 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -89,8 +89,12 @@ static cl::opt<bool> DisableMachineSink("disable-machine-sink", cl::Hidden,
 static cl::opt<bool> DisablePostRAMachineSink("disable-postra-machine-sink",
     cl::Hidden,
     cl::desc("Disable PostRA Machine Sinking"));
-static cl::opt<bool> DisableLSR("disable-lsr", cl::Hidden,
-    cl::desc("Disable Loop Strength Reduction Pass"));
+static cl::opt<bool>
+    DisableLSR("disable-lsr", cl::Hidden,
+               cl::desc("Disable Loop Strength Reduction Pass"),
+               // FIXME: Investigate and re-enable. HWASAN exposes some
+               // non-determinism in the pass.
+               cl::init(LLVM_HWADDRESS_SANITIZER_BUILD));
 static cl::opt<bool> DisableConstantHoisting("disable-constant-hoisting",
     cl::Hidden, cl::desc("Disable ConstantHoisting"));
 static cl::opt<bool> DisableCGP("disable-cgp", cl::Hidden,


        


More information about the llvm-commits mailing list