public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3484] Use gen_lowpart_if_possible instead of gen_lowpart to avoid ICE.
@ 2021-09-13 11:52 hongtao Liu
0 siblings, 0 replies; only message in thread
From: hongtao Liu @ 2021-09-13 11:52 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:c8e4cb8adf68730357888adf186ab2e686a220ad
commit r12-3484-gc8e4cb8adf68730357888adf186ab2e686a220ad
Author: liuhongt <hongtao.liu@intel.com>
Date: Mon Sep 13 18:54:05 2021 +0800
Use gen_lowpart_if_possible instead of gen_lowpart to avoid ICE.
gcc/ChangeLog:
PR bootstrap/102302
* expmed.c (extract_bit_field_using_extv): Use
gen_lowpart_if_possible instead of gen_lowpart to avoid ICE.
Diff:
---
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-13 11:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 11:52 [gcc r12-3484] Use gen_lowpart_if_possible instead of gen_lowpart to avoid ICE hongtao Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).