https://sourceware.org/bugzilla/show_bug.cgi?id=32984
--- Comment #3 from Lulu Cai <cailulu at loongson dot cn> --- In GCC 14 and earlier versions, immediate values are generated using the method of x >> y, which may involve right shifts of negative numbers. For example, -536870912 >> 12 is used to generate 0xffffffffe0000000. The binutils 2.45 assembler will issue a warning for right shifts of negative numbers: "Warning: Right shift of negative numbers may be changed from arithmetic right shift to logical right shift!". If binutils 2.45 or later are compiled with GCC 14 or earlier with LTO enabled, the ld bootstrap test will be considered failed due to this assembler warning. GCC 15 and later no longer use the method of right-shifting negative numbers, so this test can pass. commit f30423ea8c2152dcee91056e75a4f3736cce6a6e Author: mengqinggang <mengqingg...@loongson.cn> Date: Fri Jan 10 10:27:09 2025 +0800 LoongArch: Generate the final immediate for lu12i.w, lu32i.d and lu52i.d Generate 0x1010 instead of 0x1010000>>12 for lu12i.w. lu32i.d and lu52i.d use the same processing. gcc/ChangeLog: * config/loongarch/lasx.md: Use new loongarch_output_move. * config/loongarch/loongarch-protos.h (loongarch_output_move): Change parameters from (rtx, rtx) to (rtx *). * config/loongarch/loongarch.cc (loongarch_output_move): Generate final immediate for lu12i.w and lu52i.d. * config/loongarch/loongarch.md: Generate final immediate for lu32i.d and lu52i.d. * config/loongarch/lsx.md: Use new loongarch_output_move. gcc/testsuite/ChangeLog: * gcc.target/loongarch/imm-load.c: Not generate ">>". -- You are receiving this mail because: You are on the CC list for the bug.