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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|rtl-optimization            |middle-end
     Ever confirmed|0                           |1
           Keywords|                            |needs-bisection
   Last reconfirmed|                            |2023-12-31
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
5.4 produced during expand:
```
(insn 10 7 11 2 (set (reg:QI 198 [ D.1502 ])
        (truncate:QI (reg/v:DI 197 [ b ]))) /app/example.cpp:10 -1
     (nil))
(insn 11 10 12 2 (set (reg:SI 199)
        (mem/j:SI (reg/v/f:DI 196 [ a ]) [1 a_5(D)->d+-3 S4 A32]))
/app/example.cpp:10 -1
     (nil))
(insn 12 11 13 2 (set (zero_extract:SI (reg:SI 199)
            (const_int 1 [0x1])
            (const_int 0 [0]))
        (subreg:SI (reg:QI 198 [ D.1502 ]) 0)) /app/example.cpp:10 -1
     (nil))
```

But 11.2.0 produces:
```
(insn 10 7 11 2 (set (reg:SI 197)
        (mem/j:SI (reg/v/f:DI 195 [ a ]) [1 a_4(D)->d+-3 S4 A32]))
"/app/example.cpp":10:14 -1
     (nil))
(insn 11 10 12 2 (set (zero_extract:SI (reg:SI 197)
            (const_int 1 [0x1])
            (const_int 0 [0]))
        (subreg:SI (reg/v:DI 196 [ b ]) 4)) "/app/example.cpp":10:14 -1
     (nil))
```

The truncate is missing ...

Would be interesting to do a bisect here on what caused the wrong code ...

Reply via email to