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

Artyom Skrobov Artyom.Skrobov at arm.com
Mon Feb 24 02:04:57 PST 2014


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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IfConversion-ThumbV8.patch
Type: application/octet-stream
Size: 8146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140224/2c6177d0/attachment.obj>


More information about the llvm-commits mailing list