forked from OSchip/llvm-project
[Hexagon] Handle J2_jumptpt and J2_jumpfpt instructions
llvm-svn: 279246
This commit is contained in:
parent
067debe0a0
commit
a243adfd27
|
@ -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 ...
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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 ||
|
||||
|
|
Loading…
Reference in New Issue