OSDN Git Service

[PeepholeOptimizer] Take advantage of the isExtractSubreg property in the
authorQuentin Colombet <qcolombet@apple.com>
Wed, 20 Aug 2014 23:13:02 +0000 (23:13 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Wed, 20 Aug 2014 23:13:02 +0000 (23:13 +0000)
commit8ccce6b8feb30fdb51a3ac2f6fb3b7b05f6bf16b
tree357757c16d63627be31eb05bd125bcd2ebb55429
parentee1b45f2a2dbe7e1ecfdb0cf6c4e0c22eb3f18ae
[PeepholeOptimizer] Take advantage of the isExtractSubreg property in the
advanced copy optimization.

This patch is a step toward transforming:
udiv r0, r0, r2
udiv r1, r1, r3
vmov.32 d16[0], r0
vmov.32 d16[1], r1
vmov r0, r1, d16
bx lr

into:
udiv r0, r0, r2
udiv r1, r1, r3
bx lr

Indeed, thanks to this patch, this optimization is able to look through
vmov r0, r1, d16
but it does not understand yet
vmov.32 d16[0], r0
vmov.32 d16[1], r1

Comming patches will fix that and update the related test case.

<rdar://problem/12702965>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216136 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/PeepholeOptimizer.cpp