OSDN Git Service

Explicitly request physreg coalesing for a bunch of Thumb2 unit tests.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 4 May 2011 19:02:07 +0000 (19:02 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 4 May 2011 19:02:07 +0000 (19:02 +0000)
commit28e104bcb0d436adfc961776efb421bb21650e7b
treea6bc8c96fa88228a0bf2599419e2b7d740c9a2f1
parent21f7902a899930bd62260ffefd610b7490c15439
Explicitly request physreg coalesing for a bunch of Thumb2 unit tests.

These tests all follow the same pattern:

mov r2, r0
movs r0, #0
$CMP r2, r1
it eq
moveq r0, #1
bx lr

The first 'mov' can be eliminated by rematerializing 'movs r0, #0' below the
test instruction:

$CMP r0, r1
mov.w r0, #0
it eq
moveq r0, #1
bx lr

So far, only physreg coalescing can do that. The register allocators won't yet
split live ranges just to eliminate copies. They can learn, but this particular
problem is not likely to show up in real code. It only appears because r0 is
used for both the function argument and return value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130858 91177308-0d34-0410-b5e6-96231b3b80d8
test/CodeGen/Thumb2/thumb2-cmn.ll
test/CodeGen/Thumb2/thumb2-cmp.ll
test/CodeGen/Thumb2/thumb2-cmp2.ll
test/CodeGen/Thumb2/thumb2-teq.ll
test/CodeGen/Thumb2/thumb2-teq2.ll
test/CodeGen/Thumb2/thumb2-tst.ll
test/CodeGen/Thumb2/thumb2-tst2.ll