middle-end/105711 - properly handle CONST_INT when expanding bitfields
authorRichard Biener <rguenther@suse.de>
Tue, 24 May 2022 08:09:25 +0000 (10:09 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 24 May 2022 10:12:13 +0000 (12:12 +0200)
commit91c7c5edd2c1d31bf379be1d077b39644391cc31
treee963e823cd7d1a3d144ac265109e861df755f310
parent4fb2b4f7ea6b80ae75d3efb6f86e7c6179080535
middle-end/105711 - properly handle CONST_INT when expanding bitfields

This is another place where we fail to pass down the mode of a
CONST_INT.

2022-05-24  Richard Biener  <rguenther@suse.de>

PR middle-end/105711
* expmed.cc (extract_bit_field_as_subreg): Add op0_mode parameter
and use it.
(extract_bit_field_1): Pass down the mode of op0 to
extract_bit_field_as_subreg.

* gcc.target/i386/pr105711.c: New testcase.
gcc/expmed.cc
gcc/testsuite/gcc.target/i386/pr105711.c [new file with mode: 0644]