From: Krzysztof Parzyszek Date: Fri, 19 Aug 2016 14:14:09 +0000 (+0000) Subject: [Hexagon] Handle J2_jumptpt and J2_jumpfpt instructions X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a243adfd270c1f55410f059bf2a703f08825b3ca;p=platform%2Fupstream%2Fllvm.git [Hexagon] Handle J2_jumptpt and J2_jumpfpt instructions llvm-svn: 279246 --- diff --git a/llvm/lib/Target/Hexagon/HexagonBitTracker.cpp b/llvm/lib/Target/Hexagon/HexagonBitTracker.cpp index 6833d7d..4ac2438 100644 --- a/llvm/lib/Target/Hexagon/HexagonBitTracker.cpp +++ b/llvm/lib/Target/Hexagon/HexagonBitTracker.cpp @@ -902,10 +902,12 @@ bool HexagonEvaluator::evaluate(const MachineInstr &BI, bool Negated = false; switch (Opc) { case Hexagon::J2_jumpf: + case Hexagon::J2_jumpfpt: case Hexagon::J2_jumpfnew: case Hexagon::J2_jumpfnewpt: Negated = true; case Hexagon::J2_jumpt: + case Hexagon::J2_jumptpt: case Hexagon::J2_jumptnew: case Hexagon::J2_jumptnewpt: // Simple branch: if([!]Pn) jump ... diff --git a/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp b/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp index 559bdfb..63af9cb 100644 --- a/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp +++ b/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp @@ -59,8 +59,18 @@ public: char HexagonCFGOptimizer::ID = 0; static bool IsConditionalBranch(int Opc) { - return (Opc == Hexagon::J2_jumpt) || (Opc == Hexagon::J2_jumpf) - || (Opc == Hexagon::J2_jumptnewpt) || (Opc == Hexagon::J2_jumpfnewpt); + switch (Opc) { + case Hexagon::J2_jumpt: + case Hexagon::J2_jumptpt: + case Hexagon::J2_jumpf: + case Hexagon::J2_jumpfpt: + case Hexagon::J2_jumptnew: + case Hexagon::J2_jumpfnew: + case Hexagon::J2_jumptnewpt: + case Hexagon::J2_jumpfnewpt: + return true; + } + return false; } diff --git a/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp b/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp index 3ffb9cf..6b3f692 100644 --- a/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp +++ b/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp @@ -449,7 +449,9 @@ bool HexagonNewValueJump::runOnMachineFunction(MachineFunction &MF) { DEBUG(dbgs() << "Instr: "; MI.dump(); dbgs() << "\n"); if (!foundJump && (MI.getOpcode() == Hexagon::J2_jumpt || + MI.getOpcode() == Hexagon::J2_jumptpt || MI.getOpcode() == Hexagon::J2_jumpf || + MI.getOpcode() == Hexagon::J2_jumpfpt || MI.getOpcode() == Hexagon::J2_jumptnewpt || MI.getOpcode() == Hexagon::J2_jumptnew || MI.getOpcode() == Hexagon::J2_jumpfnewpt ||