]> git.ipfire.org Git - thirdparty/gcc.git/commit
expr: Allow scalar_int_mode target mode when converting a constant
authorJozef Lawrynowicz <jozef.l@mittosystems.com>
Wed, 22 Jul 2020 11:34:30 +0000 (12:34 +0100)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:18:54 +0000 (13:18 -0300)
commitf825cd6f7cd54faf4d75bce8a13f8732ed70e356
tree87520f4b06cda58b70e266d308e9bc0b4b018a96
parent68bf193adb71e199fb946345e5ca396ff7706203
expr: Allow scalar_int_mode target mode when converting a constant

is_int_mode does not allow MODE_PARTIAL_INT modes, so convert_modes was
not allowing a constant value to be converted to a MODE_PARTIAL_INT for
use as operand 2 in patterns such as ashlpsi3. The constant had
to be copied into a register before it could be used, but now can be
used directly as an operand without any copying.

gcc/ChangeLog:

* expr.c (convert_modes): Allow a constant integer to be converted to
any scalar int mode.
gcc/expr.c