Skip to content

Commit

Permalink
Fix register order when generating SELECT instruction (#4334)
Browse files Browse the repository at this point in the history
Fix register order when generating SELECT instruction
  • Loading branch information
fjeremic authored Sep 19, 2019
2 parents db5cf9d + bfb09be commit 640f1df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/z/codegen/ControlFlowEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3035,7 +3035,7 @@ OMR::Z::TreeEvaluator::ternaryEvaluator(TR::Node *node, TR::CodeGenerator *cg)
generateRRInstruction(cg, compareOp, node, firstReg, secondReg);

auto mnemonic = trueVal->getOpCode().is8Byte() ? TR::InstOpCode::SELGR : TR::InstOpCode::SELR;
generateRRFInstruction(cg, mnemonic, node, trueReg, trueReg, falseReg, getMaskForBranchCondition(TR::TreeEvaluator::mapBranchConditionToLOCRCondition(bc)));
generateRRFInstruction(cg, mnemonic, node, trueReg, falseReg, trueReg, getMaskForBranchCondition(TR::TreeEvaluator::mapBranchConditionToLOCRCondition(bc)));
}
else if (TR::Compiler->target.cpu.getSupportsArch(TR::CPU::z196))
{
Expand Down Expand Up @@ -3101,7 +3101,7 @@ OMR::Z::TreeEvaluator::ternaryEvaluator(TR::Node *node, TR::CodeGenerator *cg)
if (TR::Compiler->target.cpu.getSupportsArch(TR::CPU::z15))
{
auto mnemonic = trueVal->getOpCode().is8Byte() ? TR::InstOpCode::SELGR : TR::InstOpCode::SELR;
generateRRFInstruction(cg, mnemonic, node, trueReg, trueReg, falseReg, getMaskForBranchCondition(TR::InstOpCode::COND_BER));
generateRRFInstruction(cg, mnemonic, node, trueReg, falseReg, trueReg, getMaskForBranchCondition(TR::InstOpCode::COND_BER));
}
else if (TR::Compiler->target.cpu.getSupportsArch(TR::CPU::z196))
{
Expand Down

0 comments on commit 640f1df

Please sign in to comment.