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)
commit6967e5e4a394fc3ef783f171b076ad357b52759f
treebc8f238fe71f655f912c0ad5d169c1464449c441
parent2d4bef8d8d8de6ebd6f968c4039ed40c87f24982
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

llvm-svn: 243869
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/test/CodeGen/ARM/thumb2-it-block.ll