Be less conservative about forming IT blocks.
authorJames Molloy <james.molloy@arm.com>
Mon, 3 Aug 2015 09:24:48 +0000 (09:24 +0000)
committerJames Molloy <james.molloy@arm.com>
Mon, 3 Aug 2015 09:24:48 +0000 (09:24 +0000)
commitae8ffe09774da93ce0fabdc5a24f3d76e18336ff
tree89c56b59518f3b66015618581054b09949d9407e
parent21481e03205e084695b87e75cee02fffe31dc09a
Be less conservative about forming IT blocks.

In http://reviews.llvm.org/rL215382, IT forming was made more conservative under
the belief that a flag-setting instruction was unpredictable inside an IT block on ARMv6M.

But actually, ARMv6M doesn't even support IT blocks so that's impossible. In the ARMARM for
v7M, v7AR and v8AR it states that the semantics of such an instruction changes inside an
IT block - it doesn't set the flags. So actually it is fine to use one inside an IT block
as long as the flags register is dead afterwards.

This gives significant performance improvements in a variety of MPEG based workloads.

Differential revision: http://reviews.llvm.org/D11680

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243869 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseInstrInfo.cpp
test/CodeGen/ARM/thumb2-it-block.ll