Skip to content

Commit b552c4e

Browse files
committed
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.
1 parent 21b046b commit b552c4e

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
@@ -1084,7 +1084,8 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode)
10841084
{
10851085
/* Try to emit MOVI + SLLI sequence, that is smaller
10861086
than L32R + literal. */
1087-
if (optimize_size && mode == SImode && register_operand (dst, mode))
1087+
if (optimize_size && mode == SImode && CONST_INT_P (src)
1088+
&& register_operand (dst, mode))
10881089
{
10891090
HOST_WIDE_INT srcval = INTVAL (src);
10901091
int shift = ctz_hwi (srcval);

0 commit comments

Comments
 (0)