diff options
author | liuhongt <hongtao.liu@intel.com> | 2021-09-13 18:54:05 +0800 |
---|---|---|
committer | liuhongt <hongtao.liu@intel.com> | 2021-09-13 19:52:23 +0800 |
commit | c8e4cb8adf68730357888adf186ab2e686a220ad (patch) | |
tree | 7c39c094e0732e080dc8997b86b0d4ac1b39a449 /gcc | |
parent | 924326b3e0d75dbb246a4fbabfdd8be417788db8 (diff) | |
download | gcc-c8e4cb8adf68730357888adf186ab2e686a220ad.zip gcc-c8e4cb8adf68730357888adf186ab2e686a220ad.tar.gz gcc-c8e4cb8adf68730357888adf186ab2e686a220ad.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/expmed.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 3143f38..59734d4 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; } |