On 13.09.21 13:14, Hongtao Liu via Gcc-patches wrote:
Yes, update patch
bootstrapped and regtested on x86_64-linux-gnu{-m32,}.
Ok for trunk?
If that patch gets approved, can you add PR bootstrap/102302 to the
commit changelog ?
cf. https://gcc.gnu.org/PR102302
Thanks,
Tobias
gcc/ChangeLog:
* expmed.c (extract_bit_field_using_extv): Use
gen_lowpart_if_possible instead of gen_lowpart to avoid ICE.
---
gcc/expmed.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 3143f38e057..59734d4841c 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -1571,14 +1571,16 @@ extract_bit_field_using_extv (const
extraction_insn *extv, rtx op0,
if (GET_MODE (target) != ext_mode)
{
+ rtx temp;
/* Don't use LHS paradoxical subreg if explicit truncation is needed
between the mode of the extraction (word_mode) and the target
mode. Instead, create a temporary and use convert_move to set
the target. */
if (REG_P (target)
- && TRULY_NOOP_TRUNCATION_MODES_P (GET_MODE (target), ext_mode))
+ && TRULY_NOOP_TRUNCATION_MODES_P (GET_MODE (target), ext_mode)
+ && (temp = gen_lowpart_if_possible (ext_mode, target)))
{
- target = gen_lowpart (ext_mode, target);
+ target = temp;
if (partial_subreg_p (GET_MODE (spec_target), ext_mode))
spec_target_subreg = target;
}
--
2.27.0
target = tem;
...
Richard.
if (partial_subreg_p (GET_MODE (spec_target), ext_mode))
--
2.27.0
--
BR,
Hongtao
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht
München, HRB 106955