Skip to content

Commit e74582e

Browse files
jcmvbkbcantmak
authored andcommitted
gcc: xtensa: fix PR target/102115
2021-09-07 Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp> gcc/ PR target/102115 * config/xtensa/xtensa.c (xtensa_emit_move_sequence): Add 'CONST_INT_P (src)' to the condition of the block that tries to eliminate literal when loading integer contant. (cherry picked from commit b552c4e)
1 parent 3df11f2 commit e74582e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gcc/config/xtensa/xtensa.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,8 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode)
10871087
{
10881088
/* Try to emit MOVI + SLLI sequence, that is smaller
10891089
than L32R + literal. */
1090-
if (optimize_size && mode == SImode && register_operand (dst, mode))
1090+
if (optimize_size && mode == SImode && CONST_INT_P (src)
1091+
&& register_operand (dst, mode))
10911092
{
10921093
HOST_WIDE_INT srcval = INTVAL (src);
10931094
int shift = ctz_hwi (srcval);

0 commit comments

Comments
 (0)