diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2024-05-04 10:19:32 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2024-05-04 15:44:49 +0000 |
commit | 5678d1d98a348f315453555377ccb28821a2ffcd (patch) | |
tree | 9dda9eea3f362a43cae6ec4fa369567efa7002fa /contrib/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 0ad9b235e1eaef36e07247c8c7635a8eac98f4b1 (diff) | |
parent | 9a7cb8417a2a13bcb7a300c65c43960389b85456 (diff) |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp b/contrib/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp index 8ee1f19e083e..1cca56fc19cf 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -8154,6 +8154,7 @@ static bool optimizeBranch(BranchInst *Branch, const TargetLowering &TLI, IRBuilder<> Builder(Branch); if (UI->getParent() != Branch->getParent()) UI->moveBefore(Branch); + UI->dropPoisonGeneratingFlags(); Value *NewCmp = Builder.CreateCmp(ICmpInst::ICMP_EQ, UI, ConstantInt::get(UI->getType(), 0)); LLVM_DEBUG(dbgs() << "Converting " << *Cmp << "\n"); @@ -8167,6 +8168,7 @@ static bool optimizeBranch(BranchInst *Branch, const TargetLowering &TLI, IRBuilder<> Builder(Branch); if (UI->getParent() != Branch->getParent()) UI->moveBefore(Branch); + UI->dropPoisonGeneratingFlags(); Value *NewCmp = Builder.CreateCmp(Cmp->getPredicate(), UI, ConstantInt::get(UI->getType(), 0)); LLVM_DEBUG(dbgs() << "Converting " << *Cmp << "\n"); |