On Fri, 2023-07-07 16:38:51 +0800, 梅杰 <jie....@oss.cipunited.com> wrote: > 在 2023/7/7 07:06, Jan-Benedict Glaw 写道: > > On Mon, 2023-06-19 16:29:53 +0800, Jie Mei <jie....@oss.cipunited.com> > > wrote: > > > There are shortened bitwise instructions in the mips16e2 ASE, > > > for instance, ANDI, ORI/XORI, EXT, INS etc. . [...] > > Starting with this patch, I see some new warning: > > > > [all 2023-07-06 23:04:01] g++ -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 -Wconditionally-supported > > -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros > > -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -I. > > -Ibuild -I../../gcc/gcc -I../../gcc/gcc/build -I../../gcc/gcc/../include > > -I../../gcc/gcc/../libcpp/include \ > > [all 2023-07-06 23:04:01] -o build/gencondmd.o build/gencondmd.cc > > [all 2023-07-06 23:04:02] ../../gcc/gcc/config/mips/mips-msa.md:435:26: > > warning: 'and' of mutually exclusive equal-tests is always 0 > > [all 2023-07-06 23:04:02] 435 | DONE; > > [all 2023-07-06 23:04:02] ../../gcc/gcc/config/mips/mips-msa.md:435:26: > > warning: 'and' of mutually exclusive equal-tests is always 0 > > [all 2023-07-06 23:04:03] ../../gcc/gcc/config/mips/mips.md:822:1: warning: > > 'and' of mutually exclusive equal-tests is always 0 > > [all 2023-07-06 23:04:03] 822 | ;; conditional-move-type condition is > > needed. > > [all 2023-07-06 23:04:03] | ^ > > [all 2023-07-06 23:04:03] g++ -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 -Wconditionally-supported > > -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros > > -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE > > -static-libstdc++ -static-libgcc -o build/gencondmd \ > > [all 2023-07-06 23:04:03] build/gencondmd.o build/errors.o > > ../build-x86_64-pc-linux-gnu/libiberty/libiberty.a > > [all 2023-07-06 23:04:03] build/gencondmd > tmp-cond.md > > > > > > (Full build log available as eg. > > http://toolchain.lug-owl.de/laminar/jobs/gcc-mips-linux/76) > > The warning you mentioned above seems gone if I change the condition > `ISA_HAS_MIPS16E2` to `TARGET_MIPS16 && ISA_HAS_MIPS16E2` in mips.md. > > But it's weird because `ISA_HAS_MIPS16E2` actually contains `TARGET_MIPS16`. > > diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md > index b9eb541cf4a..77165778067 100644 > --- a/gcc/config/mips/mips.md > +++ b/gcc/config/mips/mips.md > @@ -3436,7 +3436,7 @@ > [(set (match_operand:GPR 0 "register_operand" "=d,d") > (ior:GPR (match_operand:GPR 1 "register_operand" "%0,0") > (match_operand:GPR 2 "uns_arith_operand" "d,K")))] > - "ISA_HAS_MIPS16E2" > + "TARGET_MIPS16 && ISA_HAS_MIPS16E2" > "@ > or\t%0,%2 > ori\t%0,%x2"
That's odd. Have you looked at preprocessed output? Maybe some parentheses aren't as expected? Looks like an opportunity to deep-dive into the unexpected. OTOH what's with the mips-msa.md warnings? The pattern actually want !TARGET_MIPS16. (But I haven't really looked into the dependencies.) MfG, JBG --
signature.asc
Description: PGP signature