-2019-03-26 Jeff Law <law@redhat.com>
+2019-03-24 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Add REG_EQUAL
+ notes for the result of the __tls_get_addr calls.
+ * config/rs6000/rs6000.md (unspec UNSPEC_TLS_GET_ADDR): New.
+
+2019-03-24 Jeff Law <law@redhat.com>
* config/bfin/bfin.md (movpdi): Fix length for alternative 1.
else
emit_library_call_value (tga, dest, LCT_CONST, Pmode);
global_tlsarg = NULL_RTX;
+
+ /* Make a note so that the result of this call can be CSEd. */
+ rtvec vec = gen_rtvec (1, copy_rtx (arg));
+ rtx uns = gen_rtx_UNSPEC (Pmode, vec, UNSPEC_TLS_GET_ADDR);
+ set_unique_reg_note (get_last_insn (), REG_EQUAL, uns);
}
else if (model == TLS_MODEL_LOCAL_DYNAMIC)
{
emit_library_call_value (tga, tmp1, LCT_CONST, Pmode);
global_tlsarg = NULL_RTX;
+ /* Make a note so that the result of this call can be CSEd. */
+ rtvec vec = gen_rtvec (1, copy_rtx (arg));
+ rtx uns = gen_rtx_UNSPEC (Pmode, vec, UNSPEC_TLS_GET_ADDR);
+ set_unique_reg_note (get_last_insn (), REG_EQUAL, uns);
+
if (rs6000_tls_size == 16)
{
if (TARGET_64BIT)