Hi!
On Wed, 2022-10-19 17:16:24 +0900, Takayuki 'January June' Suwa via Gcc-patches
wrote:
> * gcc/config/xtensa/xtensa.md: Add two new split patterns:
> - splits DImode immediate load into two SImode ones
> - puts out-of-constraint SImode constants into the constant pool
> --- a/gcc/config/xtensa/xtensa.md
> +++ b/gcc/config/xtensa/xtensa.md
> @@ -940,14 +940,9 @@
>because of offering further optimization opportunities. */
>if (register_operand (operands[0], DImode))
> {
> - rtx lowpart, highpart;
> -
> - if (TARGET_BIG_ENDIAN)
> - split_double (operands[1], , );
> - else
> - split_double (operands[1], , );
> - emit_insn (gen_movsi (gen_lowpart (SImode, operands[0]), lowpart));
> - emit_insn (gen_movsi (gen_highpart (SImode, operands[0]), highpart));
> + xtensa_split_DI_reg_imm (operands);
> + emit_move_insn (operands[0], operands[1]);
> + emit_move_insn (operands[2], operands[3]);
This results in a new warning for me:
[all 2022-10-25 16:04:19] g++ -fno-PIE -c -g -O2 -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common
-DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/.
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include
-I../../gcc/gcc/../libcody -I../../gcc/gcc/../libdecnumber
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber
-I../../gcc/gcc/../libbacktrace -o insn-emit.o -MT insn-emit.o -MMD -MP -MF
./.deps/insn-emit.TPo insn-emit.cc
[all 2022-10-25 16:04:22] ../../gcc/gcc/config/xtensa/xtensa.md: In function
'rtx_def* gen_movdi(rtx, rtx)':
[all 2022-10-25 16:04:22] ../../gcc/gcc/config/xtensa/xtensa.md:945:26: error:
array subscript 3 is above array bounds of 'rtx_def* [2]' [-Werror=array-bounds]
[all 2022-10-25 16:04:22] 945 | emit_move_insn (operands[2],
operands[3]);
[all 2022-10-25 16:04:22] |
~~~^~
[all 2022-10-25 16:04:22] ../../gcc/gcc/config/xtensa/xtensa.md:897:9: note:
while referencing 'operands'
[all 2022-10-25 16:04:22] 897 |(set_attr "mode" "SF")
[all 2022-10-25 16:04:22] | ^~~~
[all 2022-10-25 16:04:22] ../../gcc/gcc/config/xtensa/xtensa.md:945:26: error:
array subscript 2 is above array bounds of 'rtx_def* [2]' [-Werror=array-bounds]
[all 2022-10-25 16:04:22] 945 | emit_move_insn (operands[2],
operands[3]);
[all 2022-10-25 16:04:22] |
~~~^~
[all 2022-10-25 16:04:22] ../../gcc/gcc/config/xtensa/xtensa.md:897:9: note:
while referencing 'operands'
[all 2022-10-25 16:04:22] 897 |(set_attr "mode" "SF")
[all 2022-10-25 16:04:22] | ^~~~
I didn't yet actually check the warning, it may be bogus.
Thanks,
Jan-Benedict
--
signature.asc
Description: PGP signature