xtensa: Fix RTL insn cost estimation about relaxed MOVI instructions
These instructions will all be converted to L32R ones with litpool entries by the assembler. gcc/ChangeLog: * config/xtensa/xtensa.cc (xtensa_is_insn_L32R_p): Consider relaxed MOVI instructions as L32R.
This commit is contained in:
parent
75ab2f0ebd
commit
46880cd8be
1 changed files with 14 additions and 8 deletions
|
@ -4286,17 +4286,23 @@ xtensa_is_insn_L32R_p (const rtx_insn *insn)
|
|||
{
|
||||
rtx x = PATTERN (insn);
|
||||
|
||||
if (GET_CODE (x) == SET)
|
||||
if (GET_CODE (x) != SET)
|
||||
return false;
|
||||
|
||||
x = XEXP (x, 1);
|
||||
if (MEM_P (x))
|
||||
{
|
||||
x = SET_SRC (x);
|
||||
if (MEM_P (x))
|
||||
{
|
||||
x = XEXP (x, 0);
|
||||
return (SYMBOL_REF_P (x) || CONST_INT_P (x))
|
||||
&& CONSTANT_POOL_ADDRESS_P (x);
|
||||
}
|
||||
x = XEXP (x, 0);
|
||||
return (SYMBOL_REF_P (x) || CONST_INT_P (x))
|
||||
&& CONSTANT_POOL_ADDRESS_P (x);
|
||||
}
|
||||
|
||||
/* relaxed MOVI instructions, that will be converted to L32R by the
|
||||
assembler. */
|
||||
if (CONST_INT_P (x)
|
||||
&& ! xtensa_simm12b (INTVAL (x)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue