HomePhabricator

[GlobalISel] Don't select trivially dead instructions.

Description

[GlobalISel] Don't select trivially dead instructions.

Folding instructions when selecting can cause them to become dead.
Don't select these dead instructions (if they don't have other side
effects, and don't define physical registers).

Preserve existing tests by adding COPYs.

In some tests, the G_CONSTANT vregs never get constrained to a class:
the only use of the vreg was folded into another instruction, so the
G_CONSTANT, now dead, never gets selected.

Details

Committed
abMar 19 2017, 9:13 AM
Parents
rL298223: [GlobalISel][AArch64] Add DBG_VALUE select test. NFC.
Branches
Unknown
Tags
Unknown