Revert f7381a795ab235d34c94eaf01dc880eb5b89619d
authorAlina Sbirlea <asbirlea@google.com>
Tue, 29 Mar 2022 23:05:08 +0000 (16:05 -0700)
committerAlina Sbirlea <asbirlea@google.com>
Wed, 6 Apr 2022 23:06:14 +0000 (16:06 -0700)
Roll-forward 29fada4a3d3db309f11f7fa7a0c61cd4021e9947.
Issue triggered was due to UB.

Differential Revision: https://reviews.llvm.org/D121987

llvm/lib/Transforms/Scalar/EarlyCSE.cpp

index ac0cc95..331e9b4 100644 (file)
@@ -598,10 +598,7 @@ public:
            const TargetTransformInfo &TTI, DominatorTree &DT,
            AssumptionCache &AC, MemorySSA *MSSA)
       : TLI(TLI), TTI(TTI), DT(DT), AC(AC), SQ(DL, &TLI, &DT, &AC), MSSA(MSSA),
-        MSSAUpdater(std::make_unique<MemorySSAUpdater>(MSSA)) {
-    if (MSSA)
-      MSSA->ensureOptimizedUses();
-  }
+        MSSAUpdater(std::make_unique<MemorySSAUpdater>(MSSA)) {}
 
   bool run();