[Bug target/126030] gcc/config/i386/sse.md:16208: identical branches ?

dcb314 at hotmail dot com gcc-bugzilla@gcc.gnu.org
Mon Jun 29 14:16:08 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126030

--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
-Wduplicated-branches might catch this. 

Trying an ARM 32 bit build. I will try an  x86_64 build in the next
day or two.

I should mention that Coverity found this problem. CID 1695667.

16207     {
>>>     CID 1695667:         Incorrect expression  (IDENTICAL_BRANCHES)
>>>     The same code is executed when the condition "(unsigned short)mode_to_bytes(scalar_mode(mode_to_inner((((void)0) , E_V4DImode))).operator machine_mode()).coeffs[0] == 4" is true or false, because the code in the if-then branch and after the if statement is identical. Should the if statement be removed?
16208       if (GET_MODE_SIZE (GET_MODE_INNER (<MODE>mode)) == 4)
16209         return "vpmov<trunsuffix><pmov_suff_4>\t{%1, %0%{%2%}|%0%{%2%},
%1}";
16210       return "vpmov<trunsuffix><pmov_suff_4>\t{%1, %0%{%2%}|%0%{%2%},
%1}";


More information about the Gcc-bugs mailing list