mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-14 15:39:00 +00:00
[SCEV] Fix GCC 4.8.0 ICE in lambda function
Rewrite some code to not use a lambda function. The non-lambda code is just about as clean as the original, and not any longer. The lambda function causes an internal compiler error in GCC 4.8.0, and it is not worth breaking support for that compiler over this. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245466 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fc5268df60
commit
25faeeb8fe
@ -7351,13 +7351,9 @@ static bool IsKnownPredicateViaAddRecStart(ScalarEvolution &SE,
|
||||
if (LAR->getStepRecurrence(SE) != RAR->getStepRecurrence(SE))
|
||||
return false;
|
||||
|
||||
auto CheckWrap = [Pred](const SCEVAddRecExpr *AR) -> bool {
|
||||
if (ICmpInst::isSigned(Pred))
|
||||
return AR->getNoWrapFlags(SCEV::FlagNSW);
|
||||
return AR->getNoWrapFlags(SCEV::FlagNUW);
|
||||
};
|
||||
|
||||
if (!CheckWrap(LAR) || !CheckWrap(RAR))
|
||||
SCEV::NoWrapFlags NW = ICmpInst::isSigned(Pred) ?
|
||||
SCEV::FlagNSW : SCEV::FlagNUW;
|
||||
if (!LAR->getNoWrapFlags(NW) || !RAR->getNoWrapFlags(NW))
|
||||
return false;
|
||||
|
||||
return SE.isKnownPredicate(Pred, LAR->getStart(), RAR->getStart());
|
||||
|
Loading…
Reference in New Issue
Block a user