James Greenhalgh writes: > Hi Jiong, > > I was looking at another bug and in the process of auditing our code > spotted an issue with this patch from back in June... > > On Fri, Jun 19, 2015 at 10:15:38AM +0100, Jiong Wang wrote: >> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md >> index 8b061ba..be9da5b 100644 >> --- a/gcc/config/aarch64/aarch64.md >> +++ b/gcc/config/aarch64/aarch64.md >> +(define_insn "tlsie_tiny_sidi" >> + [(set (match_operand:DI 0 "register_operand" "=&r") >> + (zero_extend:DI >> + (unspec:SI [(match_operand 1 "aarch64_tls_ie_symref" "S") >> + (match_operand:DI 2 "register_operand" "r") >> + ] >> + UNSPEC_GOTTINYTLS)))] >> + "" >> + "ldr\\t%w0, %L1\;add\\t%<w>0, %<w>0, %<w>2" > > Here, you have no iterators, so the <w> will never be replaced. Consequently, > you are likely to hit an ICE if this pattern is ever used. > > I presume you intended this to say > > "ldr\\t%w0, %L1\;add\\t%w0, %w0, %w2" > > If so, consider that change preapproved.
Thanks, yes, it's a hiding bug which might be triggered under ILP32 mode only. committed below patch after bootstrap & regression tls* testcases OK. 2015-10-05 James Greenhalgh <james.greenha...@arm.com> Jiong Wang <jiong.w...@arm.com> gcc/ * config/aarch64/aarch64.md (tlsie_tiny_sidi): Replace "<w>" with "w".
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 74522f8..208f58f 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -4738,7 +4738,7 @@ ] UNSPEC_GOTTINYTLS)))] "" - "ldr\\t%w0, %L1\;add\\t%<w>0, %<w>0, %<w>2" + "ldr\\t%w0, %L1\;add\\t%w0, %w0, %w2" [(set_attr "type" "multiple") (set_attr "length" "8")] )