Re: [PATCH] Fix tree-emutls ADDR_EXPR handling (PR middle-end/83945)

2018-01-19 Thread Richard Biener
On January 19, 2018 10:52:08 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >Before emutls lowering, expressions like &MEM_REF[(whatever)&e].a >for static __thread e is considered gimple invariant (after all, for >native TLS we do that too) and gimple invariants are shareable trees. >lower_emutls* the

[PATCH] Fix tree-emutls ADDR_EXPR handling (PR middle-end/83945)

2018-01-19 Thread Jakub Jelinek
Hi! Before emutls lowering, expressions like &MEM_REF[(whatever)&e].a for static __thread e is considered gimple invariant (after all, for native TLS we do that too) and gimple invariants are shareable trees. lower_emutls* then has code to update the VAR_DECL in there with an SSA_NAME and if neede