OSDN Git Service

DetectDeadLanes: Increase precision when detecting undef inputs
authorMatthias Braun <matze@braunis.de>
Fri, 6 May 2016 22:43:50 +0000 (22:43 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 6 May 2016 22:43:50 +0000 (22:43 +0000)
commit26b46026813b7f52d3585032a5884e5a2bf4caa0
treeefbc84f17d45756ac485238da31f8e8c0c45f1f1
parent950b465e86b3c952e4a049a51ef3969ec184fab2
DetectDeadLanes: Increase precision when detecting undef inputs

In case of COPY-like instruction we may be able to deduce that a certain
input is unused, based on the used lanes of the register defined by the
instruction.
This even works accross otherwise incompatible copies (no need to have
compatible lanemasks, completely unused operands are still completely
unused). It even makes sense to redo the analysis in this case since we
gained information for a case we previously stopped at because of the
incompatible masks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268815 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/DetectDeadLanes.cpp
test/CodeGen/AMDGPU/detect-dead-lanes.mir
test/CodeGen/AMDGPU/subreg-coalescer-undef-use.ll