HomePhabricator

[PeepholeOptimizer] Take advantage of the isInsertSubreg property in the

Description

[PeepholeOptimizer] Take advantage of the isInsertSubreg property in the
advanced copy optimization.

This is the final step patch 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.32 d16[0], r0
vmov.32 d16[1], r1

and is able to rewrite the following sequence:
vmov.32 d16[0], r0
vmov.32 d16[1], r1
vmov r0, r1, d16

into simple generic GPR copies that the coalescer managed to remove.

rdar://problem/12702965

Details

Committed
qcolombetAug 20 2014, 5:19 PM
Parents
rL216143: [ARM] Mark VSETLNi32 with the InsertSubreg property and implement the related
Branches
Unknown
Tags
Unknown

Event Timeline