diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2024-02-29 16:49:40 +0000 |
---|---|---|
committer | Jeremy Morse <jeremy.morse@sony.com> | 2024-02-29 16:50:22 +0000 |
commit | 6c7805d5d186a6d1263f90b8033ad85e2d2633d7 (patch) | |
tree | b92631db6d02079abecde78b3d1adab85f1bfed9 /llvm/lib/Transforms/Utils/LowerSwitch.cpp | |
parent | c4c35d9522d19a0a511ee2cc011a21661e69f3c0 (diff) | |
download | llvm-6c7805d5d186a6d1263f90b8033ad85e2d2633d7.zip llvm-6c7805d5d186a6d1263f90b8033ad85e2d2633d7.tar.gz llvm-6c7805d5d186a6d1263f90b8033ad85e2d2633d7.tar.bz2 |
Revert "[NFC][RemoveDIs] Bulk update utilities to insert with iterators"
This reverts commit 3fda50d3915b2163a54a37b602be7783a89dd808.
Apparently I've missed a hunk while staging this; will back out for now.
Picked up here: https://lab.llvm.org/buildbot/#/builders/139/builds/60429/steps/6/logs/stdio
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerSwitch.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LowerSwitch.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerSwitch.cpp b/llvm/lib/Transforms/Utils/LowerSwitch.cpp index f5921e5..4131d36 100644 --- a/llvm/lib/Transforms/Utils/LowerSwitch.cpp +++ b/llvm/lib/Transforms/Utils/LowerSwitch.cpp @@ -165,20 +165,20 @@ BasicBlock *NewLeafBlock(CaseRange &Leaf, Value *Val, ConstantInt *LowerBound, if (Leaf.Low == Leaf.High) { // Make the seteq instruction... Comp = - new ICmpInst(NewLeaf, ICmpInst::ICMP_EQ, Val, Leaf.Low, "SwitchLeaf"); + new ICmpInst(*NewLeaf, ICmpInst::ICMP_EQ, Val, Leaf.Low, "SwitchLeaf"); } else { // Make range comparison if (Leaf.Low == LowerBound) { // Val >= Min && Val <= Hi --> Val <= Hi - Comp = new ICmpInst(NewLeaf, ICmpInst::ICMP_SLE, Val, Leaf.High, + Comp = new ICmpInst(*NewLeaf, ICmpInst::ICMP_SLE, Val, Leaf.High, "SwitchLeaf"); } else if (Leaf.High == UpperBound) { // Val <= Max && Val >= Lo --> Val >= Lo - Comp = new ICmpInst(NewLeaf, ICmpInst::ICMP_SGE, Val, Leaf.Low, + Comp = new ICmpInst(*NewLeaf, ICmpInst::ICMP_SGE, Val, Leaf.Low, "SwitchLeaf"); } else if (Leaf.Low->isZero()) { // Val >= 0 && Val <= Hi --> Val <=u Hi - Comp = new ICmpInst(NewLeaf, ICmpInst::ICMP_ULE, Val, Leaf.High, + Comp = new ICmpInst(*NewLeaf, ICmpInst::ICMP_ULE, Val, Leaf.High, "SwitchLeaf"); } else { // Emit V-Lo <=u Hi-Lo @@ -186,7 +186,7 @@ BasicBlock *NewLeafBlock(CaseRange &Leaf, Value *Val, ConstantInt *LowerBound, Instruction *Add = BinaryOperator::CreateAdd( Val, NegLo, Val->getName() + ".off", NewLeaf); Constant *UpperBound = ConstantExpr::getAdd(NegLo, Leaf.High); - Comp = new ICmpInst(NewLeaf, ICmpInst::ICMP_ULE, Add, UpperBound, + Comp = new ICmpInst(*NewLeaf, ICmpInst::ICMP_ULE, Add, UpperBound, "SwitchLeaf"); } } |