[llvm] r271925 - [MBP] Reduce code size by running tail merging in MBP.
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 8 07:44:59 PDT 2016
FWIW, I believe James has already diagnosed the issue and suggested a
fix in the PR.
James Molloy:
> It looks to me that Thumb2InstrInfo::ReplaceTailWithBranchTo() is
> broken.
> It sees a conditional instruction and assumes that it is conditional
> because it is in an IT block. This is not true - the conditional
> instruction is a branch which cannot be in an IT block.
> The function should bail to TargetInstrInfo::ReplaceTailWithBranchTo()
> if *Tail is a branch.
HTH,
Chad
On 2016-06-08 10:23, Haicheng Wu via llvm-commits wrote:
> Thank you for creating a bug for me, Diana.
>
> If you have a reduced test case, please help me attach it to PR28049.
> If not, I can work on it.
>
> Do you think it is better for me to reapply r271925 but leave it
> turned off by default so that whoever tries to fix PR28049 does not
> need to rebase my reverted patch?
>
> Best,
>
> Haicheng
>
> -----Original Message-----
> From: Diana Picus [mailto:diana.picus at linaro.org]
> Sent: Wednesday, June 08, 2016 5:41 AM
> To: Haicheng Wu <haicheng at codeaurora.org>
> Cc: llvm-commits <llvm-commits at lists.llvm.org>; Renato Golin
> <renato.golin at linaro.org>; Tim Northover <t.p.northover at gmail.com>;
> james.molloy at arm.com
> Subject: Re: [llvm] r271925 - [MBP] Reduce code size by running tail
> merging in MBP.
>
> On 8 June 2016 at 08:44, <haicheng at codeaurora.org> wrote:
>> I am not an expert of Thumb2 backend. Is it a bug of the
>> implementation of ReplaceTailWithBranchTo()? Or BB#187 is mistakenly
>> treated as an IT block (no t2IT instruction)? Or I should not call
>> tail merging after Block Placement for Thumb2 at all?
>
> I'm not an expert either. I'll try to have a look, and I've also
> created a bug for it: https://llvm.org/bugs/show_bug.cgi?id=28049
> If anyone feels like they have a better chance of fixing this, please
> go ahead :)
>
>> I think Thumb2 cares the code size and my patch is beneficial to
>> Thumb2.
>> Please let me know what you think.
>
> I think we should try to get it to work.
>
> Diana
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list