diff options
author | Roger Sayle <roger@nextmovesoftware.com> | 2022-08-17 22:23:33 +0100 |
---|---|---|
committer | Roger Sayle <roger@nextmovesoftware.com> | 2022-08-17 22:23:33 +0100 |
commit | 5cccc24c06610d2f28688655f12184e5bc615474 (patch) | |
tree | aa6a55cbdd9145f051024803c9bc57b62bc9d133 | |
parent | 177e93e95272e9b373203dee5b28d2b284ffa05e (diff) | |
download | gcc-5cccc24c06610d2f28688655f12184e5bc615474.zip gcc-5cccc24c06610d2f28688655f12184e5bc615474.tar.gz gcc-5cccc24c06610d2f28688655f12184e5bc615474.tar.bz2 |
[Committed] PR target/106640: Fix use of XINT in TImode compute_convert_gain.
Thanks to Zdenek Sojka for reporting PR target/106640 where an RTL checking
build reveals a thinko in my recent patch to support TImode shifts/rotates
in STV. My "senior moment" was to inappropriately use XINT where I should
be using INTVAL of XEXP.
2022-08-17 Roger Sayle <roger@nextmovesoftware.com>
gcc/ChangeLog
PR target/106640
* config/i386/i386-features.cc
(timde_scalar_chain::compute_convert_gain): Replace incorrect use
of XINT with INTVAL (XEXP (src, 1)).
-rw-r--r-- | gcc/config/i386/i386-features.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/config/i386/i386-features.cc b/gcc/config/i386/i386-features.cc index 821d8c7..d6bb66c 100644 --- a/gcc/config/i386/i386-features.cc +++ b/gcc/config/i386/i386-features.cc @@ -1248,7 +1248,7 @@ timode_scalar_chain::compute_convert_gain () case ASHIFT: case LSHIFTRT: /* See ix86_expand_v1ti_shift. */ - op1val = XINT (src, 1); + op1val = INTVAL (XEXP (src, 1)); if (optimize_insn_for_size_p ()) { if (op1val == 64 || op1val == 65) @@ -1282,7 +1282,7 @@ timode_scalar_chain::compute_convert_gain () case ASHIFTRT: /* See ix86_expand_v1ti_ashiftrt. */ - op1val = XINT (src, 1); + op1val = INTVAL (XEXP (src, 1)); if (optimize_insn_for_size_p ()) { if (op1val == 64 || op1val == 127) @@ -1355,7 +1355,7 @@ timode_scalar_chain::compute_convert_gain () case ROTATE: case ROTATERT: /* See ix86_expand_v1ti_rotate. */ - op1val = XINT (src, 1); + op1val = INTVAL (XEXP (src, 1)); if (optimize_insn_for_size_p ()) { scost = COSTS_N_BYTES (13); |