mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-25 07:31:32 +00:00
[CodeGenPrepare] Fix r265264 (again).
Don't require TLI for SinkCmpExpression, like it wasn't before r265264. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265271 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9786f33c04
commit
7ab7e0efeb
@ -855,11 +855,11 @@ static bool CombineUAddWithOverflow(CmpInst *CI) {
|
||||
/// lose; some adjustment may be wanted there.
|
||||
///
|
||||
/// Return true if any changes are made.
|
||||
static bool SinkCmpExpression(CmpInst *CI, const TargetLowering &TLI) {
|
||||
static bool SinkCmpExpression(CmpInst *CI, const TargetLowering *TLI) {
|
||||
BasicBlock *DefBB = CI->getParent();
|
||||
|
||||
// Avoid sinking soft-FP comparisons, since this can move them into a loop.
|
||||
if (TLI.useSoftFloat() && isa<FCmpInst>(CI))
|
||||
if (TLI && TLI->useSoftFloat() && isa<FCmpInst>(CI))
|
||||
return false;
|
||||
|
||||
// Only insert a cmp in each block once.
|
||||
@ -911,7 +911,7 @@ static bool SinkCmpExpression(CmpInst *CI, const TargetLowering &TLI) {
|
||||
}
|
||||
|
||||
static bool OptimizeCmpExpression(CmpInst *CI, const TargetLowering *TLI) {
|
||||
if (TLI && SinkCmpExpression(CI, *TLI))
|
||||
if (SinkCmpExpression(CI, TLI))
|
||||
return true;
|
||||
|
||||
if (CombineUAddWithOverflow(CI))
|
||||
|
Loading…
x
Reference in New Issue
Block a user