mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-10 06:25:01 +00:00
Fix the predicate which checks for non-sensical formulae which have
constants in registers which partially cancel out their immediate fields. llvm-svn: 104088
This commit is contained in:
parent
3a470a6b6c
commit
d81303e044
@ -2572,10 +2572,11 @@ void LSRInstance::GenerateCrossUseConstantOffsets() {
|
||||
J = NewF.BaseRegs.begin(), JE = NewF.BaseRegs.end();
|
||||
J != JE; ++J)
|
||||
if (const SCEVConstant *C = dyn_cast<SCEVConstant>(*J))
|
||||
if (C->getValue()->getValue().isNegative() !=
|
||||
(NewF.AM.BaseOffs < 0) &&
|
||||
C->getValue()->getValue().abs()
|
||||
.ule(abs64(NewF.AM.BaseOffs)))
|
||||
if ((C->getValue()->getValue() + NewF.AM.BaseOffs).abs().slt(
|
||||
abs64(NewF.AM.BaseOffs)) &&
|
||||
(C->getValue()->getValue() +
|
||||
NewF.AM.BaseOffs).countTrailingZeros() >=
|
||||
CountTrailingZeros_64(NewF.AM.BaseOffs))
|
||||
goto skip_formula;
|
||||
|
||||
// Ok, looks good.
|
||||
|
Loading…
x
Reference in New Issue
Block a user