[PATCH] ARMv8 IfConversion must skip narrow instructions that a) define CPSR and b) wouldn't affect CPSR in an IT block

Amara Emerson amara.emerson at arm.com
Tue Feb 25 06:12:34 PST 2014


This change LGTM. Tim, what do you think?

Amara

> -----Original Message-----
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> bounces at cs.uiuc.edu] On Behalf Of Artyom Skrobov
> Sent: 24 February 2014 10:05
> To: llvm-commits at cs.uiuc.edu
> Cc: weimingz at codeaurora.org
> Subject: [PATCH] ARMv8 IfConversion must skip narrow instructions that a)
> define CPSR and b) wouldn't affect CPSR in an IT block
> 
> Hello,
> 
> As discussed earlier (the bug report is at
> http://llvm.org/bugs/show_bug.cgi?id=18370  and the follow-up discussion
> is
> at
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
> 20140120/202386.
> html), many narrow Thumb instructions change their behaviour depending on
> whether they're in an IT block. These instructions only affect CPSR if
> they're *not* in an IT block.
> 
> Therefore, when IfConversion applies the new ARMv8 restrictions, it must
> not
> embed such an instruction into an IT block *whenever CPSR is live after
> the
> instruction*.
> 
> Note that this doesn't fix the original reported bug, which is about
> emitting a wrong assembly mnemonic in the other case, when an instruction
> is
> safe to be embedded into an IT block.
> 
> OK to commit this?







More information about the llvm-commits mailing list