aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2017-09-19 20:38:10 +0200
committerUros Bizjak <uros@gcc.gnu.org>2017-09-19 20:38:10 +0200
commit684ccf0e119368fb8eba11bfce9d2724bcfaef9f (patch)
tree4b86c3db7097fa641cc443d43221641d25fa117b
parent23b49089a4f20c24535c964d1b0eba0995dff6c8 (diff)
downloadgcc-684ccf0e119368fb8eba11bfce9d2724bcfaef9f.zip
gcc-684ccf0e119368fb8eba11bfce9d2724bcfaef9f.tar.gz
gcc-684ccf0e119368fb8eba11bfce9d2724bcfaef9f.tar.bz2
i386.c (ix86_split_long_move): Do not handle address used for LEA in a special way.
* config/i386/i386.c (ix86_split_long_move): Do not handle address used for LEA in a special way. From-SVN: r252984
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/i386/i386.c37
2 files changed, 10 insertions, 36 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ec3616d..35a3602 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,8 +1,13 @@
-2017-09-17 Segher Boessenkool <segher@kernel.crashing.org>
+2017-09-19 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (ix86_split_long_move): Do not handle
+ address used for LEA in a special way.
+
+2017-09-19 Segher Boessenkool <segher@kernel.crashing.org>
* simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.
-2017-09-18 Martin Sebor <msebor@redhat.com>
+2017-09-19 Martin Sebor <msebor@redhat.com>
PR c/81854
* cgraphunit.c (handle_alias_pairs): Reject aliases between functions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index c80c0de..1c765fb 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -26706,7 +26706,7 @@ ix86_split_long_move (rtx operands[])
Do an lea to the last part and use only one colliding move. */
else if (collisions > 1)
{
- rtx base, addr, tls_base = NULL_RTX;
+ rtx base, addr;
collisions = 1;
@@ -26723,44 +26723,13 @@ ix86_split_long_move (rtx operands[])
struct ix86_address parts;
int ok = ix86_decompose_address (addr, &parts);
gcc_assert (ok);
- if (parts.seg == DEFAULT_TLS_SEG_REG)
- {
- /* It is not valid to use %gs: or %fs: in
- lea though, so we need to remove it from the
- address used for lea and add it to each individual
- memory loads instead. */
- addr = copy_rtx (addr);
- rtx *x = &addr;
- while (GET_CODE (*x) == PLUS)
- {
- for (i = 0; i < 2; i++)
- {
- rtx u = XEXP (*x, i);
- if (GET_CODE (u) == ZERO_EXTEND)
- u = XEXP (u, 0);
- if (GET_CODE (u) == UNSPEC
- && XINT (u, 1) == UNSPEC_TP)
- {
- tls_base = XEXP (*x, i);
- *x = XEXP (*x, 1 - i);
- break;
- }
- }
- if (tls_base)
- break;
- x = &XEXP (*x, 0);
- }
- gcc_assert (tls_base);
- }
+ /* It is not valid to use %gs: or %fs: in lea. */
+ gcc_assert (parts.seg == ADDR_SPACE_GENERIC);
}
emit_insn (gen_rtx_SET (base, addr));
- if (tls_base)
- base = gen_rtx_PLUS (GET_MODE (base), base, tls_base);
part[1][0] = replace_equiv_address (part[1][0], base);
for (i = 1; i < nparts; i++)
{
- if (tls_base)
- base = copy_rtx (base);
tmp = plus_constant (Pmode, base, UNITS_PER_WORD * i);
part[1][i] = replace_equiv_address (part[1][i], tmp);
}