diff options
author | Sanjay Patel <spatel@rotateright.com> | 2020-11-30 10:13:38 -0500 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2020-11-30 10:15:42 -0500 |
commit | 355aee3dcd441461a6da6e56c43dc1bd81c79f31 (patch) | |
tree | 913dd89c02e723d833715693da5a6ca68153595c /llvm/lib/IR/BasicBlock.cpp | |
parent | 78c71187465a8e877d2e07d462b45a19363fb782 (diff) | |
download | llvm-355aee3dcd441461a6da6e56c43dc1bd81c79f31.zip llvm-355aee3dcd441461a6da6e56c43dc1bd81c79f31.tar.gz llvm-355aee3dcd441461a6da6e56c43dc1bd81c79f31.tar.bz2 |
Revert "[IR][LoopRotate] avoid leaving phi with no operands (PR48296)"
This reverts commit bfd2c216ea8ef09f8fb1f755ca2b89f86f74acbb.
This appears to be causing stage2 msan failures on buildbots:
FAIL: LLVM :: Transforms/SimplifyCFG/X86/bug-25299.ll (65872 of 71835)
******************** TEST 'LLVM :: Transforms/SimplifyCFG/X86/bug-25299.ll' FAILED ********************
Script:
--
: 'RUN: at line 1'; /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/opt < /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/Transforms/SimplifyCFG/X86/bug-25299.ll -simplifycfg -S | /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/Transforms/SimplifyCFG/X86/bug-25299.ll
--
Exit Code: 2
Command Output (stderr):
--
==87374==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x9de47b6 in getBasicBlockIndex /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/IR/Instructions.h:2749:5
#1 0x9de47b6 in simplifyCommonResume /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp:4112:23
#2 0x9de47b6 in simplifyResume /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp:4039:12
#3 0x9de47b6 in (anonymous namespace)::SimplifyCFGOpt::simplifyOnce(llvm::BasicBlock*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6330:16
#4 0x9dcca13 in run /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6358:16
#5 0x9dcca13 in llvm::simplifyCFG(llvm::BasicBlock*, llvm::TargetTransformInfo const&, llvm::SimplifyCFGOptions const&, llvm::SmallPtrSetImpl<llvm::BasicBlock*>*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6369:8
#6 0x974643d in iterativelySimplifyCFG(
Diffstat (limited to 'llvm/lib/IR/BasicBlock.cpp')
-rw-r--r-- | llvm/lib/IR/BasicBlock.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp index aee769a..3268641 100644 --- a/llvm/lib/IR/BasicBlock.cpp +++ b/llvm/lib/IR/BasicBlock.cpp @@ -330,7 +330,7 @@ void BasicBlock::removePredecessor(BasicBlock *Pred, unsigned NumPreds = cast<PHINode>(front()).getNumIncomingValues(); for (PHINode &Phi : make_early_inc_range(phis())) { - Phi.removeIncomingValue(Pred); + Phi.removeIncomingValue(Pred, !KeepOneInputPHIs); if (KeepOneInputPHIs) continue; // If we have a single predecessor, removeIncomingValue erased the PHI |