diff options
author | Roger Sayle <roger@nextmovesoftware.com> | 2022-08-01 23:08:23 +0100 |
---|---|---|
committer | Roger Sayle <roger@nextmovesoftware.com> | 2022-08-01 23:08:23 +0100 |
commit | 96e5f6696a1fa90493c464884984e9f1de86d817 (patch) | |
tree | 14c89f554d9e6b8ed0c4f54d5aa3032fcc6f76f1 /gcc/c | |
parent | 80928920147a109a7f8735bffc55a72cbe8db185 (diff) | |
download | gcc-96e5f6696a1fa90493c464884984e9f1de86d817.zip gcc-96e5f6696a1fa90493c464884984e9f1de86d817.tar.gz gcc-96e5f6696a1fa90493c464884984e9f1de86d817.tar.bz2 |
PR target/106481: Handle CONST_WIDE_INT in REG_EQUAL during STV on x86_64.
This patch resolves PR target/106481, and is an oversight in my recent
battles with REG_EQUAL notes during TImode STV (see PR target/106278
https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598416.html).
The patch above's/current behaviour is that we check that the mode of
the REG_EQUAL note is TImode before using PUT_MODE to set it to V1TImode.
However, the new test case reveals that this doesn't consider REG_EQUAL
notes that are CONST_INT or CONST_WIDE_INT, i.e. that are VOIDmode,
and so STV produces:
(insn 85 84 86 2 (set (reg:V1TI 113)
(reg:V1TI 84)) "pr106481.c":13:3 1766 {movv1ti_internal}
(expr_list:REG_EQUAL (const_wide_int 0x0ffffffff00000004)
(nil)))
which causes problems as the const_wide_int isn't a valid immediate
constant for V1TImode. With this patch, we now generate the correct:
(insn 85 84 86 2 (set (reg:V1TI 113)
(reg:V1TI 84)) "pr106481.c":13:3 1766 {movv1ti_internal}
(expr_list:REG_EQUAL (const_vector:V1TI [
(const_wide_int 0x0ffffffff00000004)
])
(nil)))
2022-08-01 Roger Sayle <roger@nextmovesoftware.com>
Uroš Bizjak <ubizjak@gmail.com>
gcc/ChangeLog
PR target/106481
* config/i386/i386-features.cc (timode_scalar_chain::convert_insn):
Convert a CONST_SCALAR_INT_P in a REG_EQUAL note into a V1TImode
CONST_VECTOR.
gcc/testsuite/ChangeLog
PR target/106481
* gcc.target/i386/pr106481.c: New test case.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions