Skip to content

Commit

Permalink
Fix C4800
Browse files Browse the repository at this point in the history
```
warning C4800: 'uint32_t' : forcing value to bool 'true' or 'false' (performance warning)
```
  • Loading branch information
fjeremic committed Jun 7, 2021
1 parent 131c4a7 commit 0f3b2e6
Show file tree
Hide file tree
Showing 29 changed files with 53 additions and 52 deletions.
2 changes: 1 addition & 1 deletion compiler/compile/OMRCompilation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ OMR::Compilation::getOSRTransitionTarget()
bool
OMR::Compilation::isOSRTransitionTarget(TR::OSRTransitionTarget target)
{
return target & self()->getOSRTransitionTarget();
return (target & self()->getOSRTransitionTarget()) != 0;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion compiler/control/OMROptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4522,7 +4522,7 @@ OMR::Options::checkDisableFlagForAllMethods(OMR::Optimizations o, bool b)
char *
OMR::Options::setStaticBool(char *option, void *base, TR::OptionTable *entry)
{
*((bool*)entry->parm1) = (bool)entry->parm2;
*((bool*)entry->parm1) = (entry->parm2 != 0);
return option;
}

Expand Down
4 changes: 2 additions & 2 deletions compiler/cs2/bitvectr.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ class ABitVector : private Allocator {
wordIndex = fIndex / kBitWordSize;
bitIndex = fIndex % kBitWordSize;

bitValue = (fVector.WordAt(wordIndex) << bitIndex) >> (kBitWordSize - 1);
bitValue = ((fVector.WordAt(wordIndex) << bitIndex) >> (kBitWordSize - 1)) != 0;
return bitValue;
}

Expand Down Expand Up @@ -476,7 +476,7 @@ inline bool ABitVector<Allocator>::ValueAt (BitIndex bitIndex) const {
wordIndex = bitIndex / kBitWordSize;
bitIndex = bitIndex % kBitWordSize;

return (WordAt(wordIndex) << bitIndex) >> (kBitWordSize - 1);
return ((WordAt(wordIndex) << bitIndex) >> (kBitWordSize - 1)) != 0;
}

template <class Allocator>
Expand Down
2 changes: 1 addition & 1 deletion compiler/il/OMRResolvedMethodSymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2398,7 +2398,7 @@ OMR::ResolvedMethodSymbol::isParmVariant(TR::ParameterSymbol * parmSymbol)
"Parm %d (%p) cannot be owned by current method that only has %d parms", parmSymbol->getOrdinal(), parmSymbol, numberOfParameters);
TR_ASSERT_FATAL(self()->getParmSymRef(parmSymbol->getSlot())->getSymbol()->getParmSymbol() == parmSymbol,
"Parm %p is not owned by current method %s", parmSymbol, self()->signature(self()->comp()->trMemory()));
return _variantParms->get(parmSymbol->getOrdinal());
return _variantParms->get(parmSymbol->getOrdinal()) != 0;
}

void
Expand Down
4 changes: 2 additions & 2 deletions compiler/infra/Assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ namespace TR
{
if (!_node) return;

static bool printFullContext = feGetEnv("TR_AssertFullContext");
static bool printFullContext = feGetEnv("TR_AssertFullContext") != NULL;
TR::Compilation *comp = TR::comp();
TR_Debug *debug = comp->findOrCreateDebug();

Expand Down Expand Up @@ -250,7 +250,7 @@ namespace TR
{
if (!_instruction) return;

static bool printFullContext = feGetEnv("TR_AssertFullContext");
static bool printFullContext = feGetEnv("TR_AssertFullContext") != NULL;
static int numInstructionsInContext = feGetEnv("TR_AssertNumInstructionsInContext") ?
atoi(feGetEnv("TR_AssertNumInstructionsInContext")) : 11;
TR_Debug *debug = TR::comp()->findOrCreateDebug();
Expand Down
4 changes: 2 additions & 2 deletions compiler/infra/BitVector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ bool TR_BitContainer::intersects(TR_BitVector& v2)
else if (_type == bitvector)
return false;
else
return v2.get(_singleBit);
return v2.get(_singleBit) != 0;
}

bool TR_BitContainer::intersects(TR_BitContainer& v2)
Expand All @@ -254,7 +254,7 @@ bool TR_BitContainer::intersects(TR_BitContainer& v2)
{
// v2 is singleton
if (_type == bitvector && _bitVector)
return get(v2._singleBit);
return get(v2._singleBit) != 0;
else if (_type == bitvector)
return false;
else
Expand Down
2 changes: 1 addition & 1 deletion compiler/infra/BitVector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ class TR_BitVector
// value had been set
bool clear(int64_t n)
{
bool rc = get(n);
bool rc = get(n) != 0;
if (rc)
reset(n);
#if BV_SANITY_CHECK
Expand Down
8 changes: 4 additions & 4 deletions compiler/infra/OMRCfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,22 +667,22 @@ TR::CFGEdge * TR::CFGNode::getExceptionPredecessorEdge(TR::CFGNode * n)

bool TR::CFGNode::hasSuccessor(TR::CFGNode * n)
{
return (bool)getSuccessorEdge(n);
return getSuccessorEdge(n) != NULL;
}

bool TR::CFGNode::hasExceptionSuccessor(TR::CFGNode * n)
{
return (bool)getExceptionSuccessorEdge(n);
return getExceptionSuccessorEdge(n) != NULL;
}

bool TR::CFGNode::hasPredecessor(TR::CFGNode * n)
{
return (bool)getPredecessorEdge(n);
return getPredecessorEdge(n) != NULL;
}

bool TR::CFGNode::hasExceptionPredecessor(TR::CFGNode * n)
{
return (bool)getExceptionPredecessorEdge(n);
return getExceptionPredecessorEdge(n) != NULL;
}


Expand Down
2 changes: 1 addition & 1 deletion compiler/infra/SimpleRegex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ bool SimpleRegex::Simple::match(const char *s, bool isCaseSensitive, bool useLoc

bool SimpleRegex::Regex::match(const char *s, bool isCaseSensitive, bool useLocale)
{
int32_t rc = false;
bool rc = false;
for (Regex *p = this; p && !rc; p = p->remainder)
{
rc = p->simple->match(s, isCaseSensitive, useLocale);
Expand Down
3 changes: 2 additions & 1 deletion compiler/optimizer/DeadTreesElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ void TR::DeadTreesElimination::prePerformOnBlocks()
&& tt->getPrevTreeTop()->getNode()->getOpCodeValue() == TR::BBStart
&& !tt->getPrevTreeTop()->getNode()->getBlock()->isExtensionOfPreviousBlock())
{
requestOpt(OMR::redundantGotoElimination, tt->getEnclosingBlock());
requestOpt(OMR::redundantGotoElimination, true, tt->getEnclosingBlock());
}

if (node->getVisitCount() >= visitCount)
Expand Down Expand Up @@ -1003,6 +1003,7 @@ int32_t TR::DeadTreesElimination::process(TR::TreeTop *startTree, TR::TreeTop *e
{
requestOpt(
OMR::redundantGotoElimination,
true,
prevTree->getNode()->getBlock());
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/optimizer/InductionVariable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6473,7 +6473,7 @@ TR_InductionVariableAnalysis::analyzeExitEdges(TR_RegionStructure *loop,
}
}
else
osrInduceExitEdge = _isOSRInduceBlock.get(toNum);
osrInduceExitEdge = (_isOSRInduceBlock.get(toNum) != 0);

if (osrInduceExitEdge)
{
Expand Down
2 changes: 1 addition & 1 deletion compiler/optimizer/Inliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ TR_CallStack::initializeControlFlowInfo(TR::ResolvedMethodSymbol * callerSymbol)

for (int32_t i = 0; i < numberOfBlocks; ++i)
{
blockInfo(i)._inALoop = loopingBlocks.get(i);
blockInfo(i)._inALoop = (loopingBlocks.get(i) != 0);
}
// Walk forward following successor edges to mark blocks that are always reached
//
Expand Down
2 changes: 1 addition & 1 deletion compiler/optimizer/LocalAnticipatability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ TR_LocalAnticipatability::TR_LocalAnticipatability(TR_LocalAnalysisInfo &info, T
traceMsg(comp(), "Starting LocalAnticipatability\n");

static const char *e = feGetEnv("TR_loadaddrAsLoad");
_loadaddrAsLoad = e ? atoi(e) : true;
_loadaddrAsLoad = e ? (atoi(e) != 0) : true;

initializeLocalAnalysis(true);
TR::SymbolReferenceTable *symRefTab = comp()->getSymRefTab();
Expand Down
16 changes: 8 additions & 8 deletions compiler/optimizer/LoopVersioner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5912,7 +5912,7 @@ void TR_LoopVersioner::buildConditionalTree(
TR::Node *storeNode = _storeTrees[indexNode->getSymbolReference()->getReferenceNumber()]->getNode();
//int32_t exitValue = exitValue = storeNode->getFirstChild()->getSecondChild()->getInt();

loopLimit = _loopTestTree->getNode()->getSecondChild()->duplicateTree(comp());
loopLimit = _loopTestTree->getNode()->getSecondChild()->duplicateTree();
if(isAddition)
{
range = TR::Node::create(TR::isub, 2, loopLimit,entryNode);
Expand Down Expand Up @@ -5996,7 +5996,7 @@ void TR_LoopVersioner::buildConditionalTree(
TR_ASSERT(parent, "Parent shouldn't be null\n");

TR_ASSERT(indexChildIndex>=0, "Index child index should be valid at this point\n");
duplicateIndexNode = conditionalNode->getChild(indexChildIndex)->duplicateTree(comp());
duplicateIndexNode = conditionalNode->getChild(indexChildIndex)->duplicateTree();

int visitCount = comp()->incVisitCount();
int32_t indexSymRefNum = loopDrivingSymRef->getReferenceNumber();
Expand All @@ -6019,24 +6019,24 @@ void TR_LoopVersioner::buildConditionalTree(
if(indexNodeOccursAsSecondChild)
{
if (!reverseBranch)
duplicateComparisonNode = TR::Node::createif(conditionalNode->getOpCodeValue(), conditionalNode->getFirstChild()->duplicateTree(comp()),duplicateIndexNode, _exitGotoTarget);
duplicateComparisonNode = TR::Node::createif(conditionalNode->getOpCodeValue(), conditionalNode->getFirstChild()->duplicateTree(),duplicateIndexNode, _exitGotoTarget);
else
duplicateComparisonNode = TR::Node::createif(conditionalNode->getOpCode().getOpCodeForReverseBranch(), conditionalNode->getFirstChild()->duplicateTree(comp()), duplicateIndexNode, _exitGotoTarget);
duplicateComparisonNode = TR::Node::createif(conditionalNode->getOpCode().getOpCodeForReverseBranch(), conditionalNode->getFirstChild()->duplicateTree(), duplicateIndexNode, _exitGotoTarget);
}
else
{
if (!reverseBranch)
duplicateComparisonNode = TR::Node::createif(conditionalNode->getOpCodeValue(),duplicateIndexNode, conditionalNode->getSecondChild()->duplicateTree(comp()), _exitGotoTarget);
duplicateComparisonNode = TR::Node::createif(conditionalNode->getOpCodeValue(),duplicateIndexNode, conditionalNode->getSecondChild()->duplicateTree(), _exitGotoTarget);
else
duplicateComparisonNode = TR::Node::createif(conditionalNode->getOpCode().getOpCodeForReverseBranch(), duplicateIndexNode, conditionalNode->getSecondChild()->duplicateTree(comp()), _exitGotoTarget);
duplicateComparisonNode = TR::Node::createif(conditionalNode->getOpCode().getOpCodeForReverseBranch(), duplicateIndexNode, conditionalNode->getSecondChild()->duplicateTree(), _exitGotoTarget);
}
}
else
{
if (!reverseBranch)
duplicateComparisonNode = TR::Node::createif(conditionalNode->getOpCodeValue(), conditionalNode->getFirstChild()->duplicateTree(comp()), conditionalNode->getSecondChild()->duplicateTree(comp()), _exitGotoTarget);
duplicateComparisonNode = TR::Node::createif(conditionalNode->getOpCodeValue(), conditionalNode->getFirstChild()->duplicateTree(), conditionalNode->getSecondChild()->duplicateTree(), _exitGotoTarget);
else
duplicateComparisonNode = TR::Node::createif(conditionalNode->getOpCode().getOpCodeForReverseBranch(), conditionalNode->getFirstChild()->duplicateTree(comp()), conditionalNode->getSecondChild()->duplicateTree(comp()), _exitGotoTarget);
duplicateComparisonNode = TR::Node::createif(conditionalNode->getOpCode().getOpCodeForReverseBranch(), conditionalNode->getFirstChild()->duplicateTree(), conditionalNode->getSecondChild()->duplicateTree(), _exitGotoTarget);
}

if (duplicateComparisonNode->getFirstChild()->getOpCodeValue() == TR::instanceof)
Expand Down
2 changes: 1 addition & 1 deletion compiler/optimizer/RegisterCandidate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class TR_RegisterCandidate : public TR_Link<TR_RegisterCandidate>
}

bool find(uint32_t block) {
return _candidateBlocks.get(block);
return _candidateBlocks.get(block) != 0;
}
uint32_t getNumberOfLoadsAndStores(uint32_t block) {
if (_candidateBlocks.get(block))
Expand Down
4 changes: 2 additions & 2 deletions compiler/optimizer/Structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3374,7 +3374,7 @@ void TR_RegionStructure::resetInvariance()
bool TR_RegionStructure::isExprInvariant(TR::Node *expr, bool usePrecomputed)
{
if (_invariantExpressions && usePrecomputed)
return _invariantExpressions->get(expr->getGlobalIndex());
return _invariantExpressions->get(expr->getGlobalIndex()) != 0;

return isExprTreeInvariant(expr);
}
Expand All @@ -3393,7 +3393,7 @@ bool TR_RegionStructure::isExprTreeInvariant(TR::Node *expr)
{
if(!_invariantSymbols)
computeInvariantSymbols();
return _invariantSymbols->get(symRef->getReferenceNumber());
return _invariantSymbols->get(symRef->getReferenceNumber()) != 0;
}

bool TR_RegionStructure::isSubtreeInvariant(TR::Node *node, vcount_t visitCount)
Expand Down
4 changes: 2 additions & 2 deletions compiler/optimizer/UseDefInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ bool TR_UseDefInfo::_runReachingDefinitions(TR_ReachingDefinitions& reachingDefi

reachingDefinitions.perform();

bool succeeded = reachingDefinitions._blockAnalysisInfo;
bool succeeded = reachingDefinitions._blockAnalysisInfo != NULL;
if (!succeeded)
{
invalidateUseDefInfo();
Expand Down Expand Up @@ -639,7 +639,7 @@ void TR_UseDefInfo::findTrivialSymbolsToExclude(TR::Node *node, TR::TreeTop *tre
bool TR_UseDefInfo::isTrivialUseDefNode(TR::Node *node, AuxiliaryData &aux)
{
if (aux._doneTrivialNode.get(node->getGlobalIndex()))
return aux._isTrivialNode.get(node->getGlobalIndex());
return aux._isTrivialNode.get(node->getGlobalIndex()) != 0;

bool result = isTrivialUseDefNodeImpl(node, aux);
aux._doneTrivialNode.set(node->getGlobalIndex());
Expand Down
4 changes: 2 additions & 2 deletions compiler/optimizer/VPHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7560,7 +7560,7 @@ TR::Node *constrainIand(OMR::ValuePropagation *vp, TR::Node *node)
if (rhs && rhs->asIntConst())
{
int32_t mask = rhs->asIntConst()->getInt();
signBitsMaskedOff = leadingZeroes(mask);
signBitsMaskedOff = leadingZeroes(mask) != 0;

// take opportunity to remove if unneeded
if(255 == mask && lhs) // loading from byte
Expand Down Expand Up @@ -8964,7 +8964,7 @@ static TR::Node *constrainIfcmpeqne(OMR::ValuePropagation *vp, TR::Node *node, b
{
TR::ILOpCode lhsCmp = lhsChild->getOpCode();
TR::ILOpCode newIfOp = lhsCmp.convertCmpToIfCmp();
if (branchOnEqual != bool(rhsConst))
if (branchOnEqual != (rhsConst != 0))
newIfOp = newIfOp.getOpCodeForReverseBranch();

if (performTransformation(vp->comp(),
Expand Down
2 changes: 1 addition & 1 deletion compiler/ras/DebugCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ TR::DebugCounterBase::initializeReloData(TR::Compilation *comp, int32_t delta, i
{
_reloData = new (comp->trPersistentMemory()) TR::DebugCounterReloData(delta, fidelity, staticDelta);
}
return _reloData;
return _reloData != NULL;
}

void
Expand Down
2 changes: 1 addition & 1 deletion compiler/ras/LimitFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ TR_Debug::methodSigCanBeFound(const char *methodSig, TR::CompilationFilters * fi
filter = filter->findRegex(methodSig);
}

bool excluded = filters->defaultExclude();
bool excluded = filters->defaultExclude() != 0;
if (filter)
{
switch (filter->getFilterType())
Expand Down
2 changes: 1 addition & 1 deletion compiler/x/codegen/BinaryCommutativeAnalyser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ TR::Register *TR_X86BinaryCommutativeAnalyser::integerAddAnalyserImpl(TR::Node
}

targetRegister = tempReg;
bool is64Bit = TR::InstOpCode(regRegOpCode).hasLongSource();
bool is64Bit = TR::InstOpCode(regRegOpCode).hasLongSource() != 0;

// if eflags are required then we cannot use LEA as it doesn't set or use them
if (needsEflags || (carry != 0))
Expand Down
4 changes: 2 additions & 2 deletions compiler/x/codegen/HelperCallSnippet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ TR_Debug::printBody(TR::FILE *pOutFile, TR::X86HelperCallSnippet * snippet, uin
{
uint32_t pushLength;

bool useDedicatedFrameReg = _comp->cg()->getLinkage()->getProperties().getAlwaysDedicateFramePointerRegister();
bool useDedicatedFrameReg = _comp->cg()->getLinkage()->getProperties().getAlwaysDedicateFramePointerRegister() != 0;
if (snippet->getOffset() >= -128 && snippet->getOffset() <= 127)
pushLength = (useDedicatedFrameReg ? 3 : 4);
else
Expand Down Expand Up @@ -436,7 +436,7 @@ uint32_t TR::X86HelperCallSnippet::getLength(int32_t estimatedSnippetStart)

if (_offset != -1)
{
bool useDedicatedFrameReg = cg()->getLinkage()->getProperties().getAlwaysDedicateFramePointerRegister();
bool useDedicatedFrameReg = cg()->getLinkage()->getProperties().getAlwaysDedicateFramePointerRegister() != 0;
if (_offset >= -128 && _offset <= 127)
length += (useDedicatedFrameReg ? 3 : 4);
else
Expand Down
4 changes: 2 additions & 2 deletions compiler/x/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ OMR::X86::CodeGenerator::initializeX86(TR::Compilation *comp)
{
self()->setSupportsArraySet();
}
static bool disableX86TRTO = (bool)feGetEnv("TR_disableX86TRTO");
static bool disableX86TRTO = feGetEnv("TR_disableX86TRTO") != NULL;
if (!disableX86TRTO)
{
TR_ASSERT_FATAL(comp->compileRelocatableCode() || comp->isOutOfProcessCompilation() || comp->target().cpu.supportsFeature(OMR_FEATURE_X86_SSE4_1) == self()->getX86ProcessorInfo().supportsSSE4_1(), "supportsSSE4_1() failed\n");
Expand All @@ -384,7 +384,7 @@ OMR::X86::CodeGenerator::initializeX86(TR::Compilation *comp)
self()->setSupportsArrayTranslateTRTO();
}
}
static bool disableX86TROT = (bool)feGetEnv("TR_disableX86TROT");
static bool disableX86TROT = feGetEnv("TR_disableX86TROT") != NULL;
if (!disableX86TROT)
{
TR_ASSERT_FATAL(comp->compileRelocatableCode() || comp->isOutOfProcessCompilation() || comp->target().cpu.supportsFeature(OMR_FEATURE_X86_SSE4_1) == self()->getX86ProcessorInfo().supportsSSE4_1(), "supportsSSE4_1() failed\n");
Expand Down
2 changes: 1 addition & 1 deletion compiler/x/codegen/OMRInstruction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class OMR_EXTENSIBLE Instruction : public OMR::Instruction
TR::InstOpCode::Mnemonic getOpCodeValue() { return _opcode.getOpCodeValue(); }
TR::InstOpCode::Mnemonic setOpCodeValue(TR::InstOpCode::Mnemonic op) { return _opcode.setOpCodeValue(op); }

virtual bool isBranchOp() {return _opcode.isBranchOp();}
virtual bool isBranchOp() {return _opcode.isBranchOp() != 0;}
virtual bool isLabel();
virtual bool isRegRegMove();
virtual bool isPatchBarrier();
Expand Down
8 changes: 4 additions & 4 deletions compiler/x/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2193,8 +2193,8 @@ TR::Register *OMR::X86::TreeEvaluator::arraycopyEvaluator(TR::Node *node, TR::Co

TR::DataType dt = node->getArrayCopyElementType();
uint32_t elementSize = 1;
static bool useREPMOVSW = feGetEnv("TR_UseREPMOVSWForArrayCopy");
static bool forceByteArrayElementCopy = feGetEnv("TR_ForceByteArrayElementCopy");
static bool useREPMOVSW = feGetEnv("TR_UseREPMOVSWForArrayCopy") != NULL;
static bool forceByteArrayElementCopy = feGetEnv("TR_ForceByteArrayElementCopy") != NULL;
if (!forceByteArrayElementCopy)
{
if (node->isReferenceArrayCopy() || dt == TR::Address)
Expand All @@ -2203,8 +2203,8 @@ TR::Register *OMR::X86::TreeEvaluator::arraycopyEvaluator(TR::Node *node, TR::Co
elementSize = TR::Symbol::convertTypeToSize(dt);
}

static bool optimizeForConstantLengthArrayCopy = feGetEnv("TR_OptimizeForConstantLengthArrayCopy");
static bool ignoreDirectionForConstantLengthArrayCopy = feGetEnv("TR_IgnoreDirectionForConstantLengthArrayCopy");
static bool optimizeForConstantLengthArrayCopy = feGetEnv("TR_OptimizeForConstantLengthArrayCopy") != NULL;
static bool ignoreDirectionForConstantLengthArrayCopy = feGetEnv("TR_IgnoreDirectionForConstantLengthArrayCopy") != NULL;
#define shortConstArrayWithDirThreshold 256
#define shortConstArrayWithoutDirThreshold 16*4
bool isShortConstArrayWithDirection = false;
Expand Down
2 changes: 1 addition & 1 deletion compiler/x/codegen/SIMDTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static TR::MemoryReference* ConvertToPatchableMemoryReference(TR::MemoryReferenc
// Hence, the unresolved memory reference must be evaluated into a register first.
//
TR::Register* tempReg = cg->allocateRegister();
generateRegMemInstruction(LEARegMem(cg), node, tempReg, mr, cg);
generateRegMemInstruction(LEARegMem(), node, tempReg, mr, cg);
mr = generateX86MemoryReference(tempReg, 0, cg);
cg->stopUsingRegister(tempReg);
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/x/codegen/SubtractAnalyser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ TR::Register* TR_X86SubtractAnalyser::integerSubtractAnalyserImpl(TR::Node *
// Don't do this though if condition codes are needed. The sequence
// depends on the carry flag being valid as if a sub was done.
//
bool nodeIs64Bit = TR::InstOpCode(regRegOpCode).hasLongSource();
bool nodeIs64Bit = TR::InstOpCode(regRegOpCode).hasLongSource() != 0;
generateRegInstruction(NEGReg(nodeIs64Bit), secondChild, secondRegister, _cg);
thirdReg = secondRegister;
secondRegister = firstRegister;
Expand Down
Loading

0 comments on commit 0f3b2e6

Please sign in to comment.