[GlobalISel][Legalizer] Look thro copies while combining G_UNMERGE's
authorRoman Tereshin <rtereshin@apple.com>
Mon, 23 Apr 2018 22:28:36 +0000 (22:28 +0000)
committerRoman Tereshin <rtereshin@apple.com>
Mon, 23 Apr 2018 22:28:36 +0000 (22:28 +0000)
commit3c6ea7e28c957bdaf03df8a3a4ff00c46e9315f6
treea28696867a28b68a9a3621e7f49fe96dbb61467f
parenteb6090941c49ccaf48715f49c89eef07409a7cf2
[GlobalISel][Legalizer] Look thro copies while combining G_UNMERGE's

As we're becoming stricter w/ respect to not allowing vregs having LLTs
and regclasses assigned both mid-globalisel pipeline, the number of
extra copies grows, some of which separate G_UNMERGE's from their
corresponding G_MERGE's, becoming a performance concern.

It's worth mentioning that we're already looking through copies while
combining legalization artifacts for every kind of artifact but
G_UNMERGE.

Reviewed By: aditya_nandakumar

Reviewers: ab, t.p.northover, volkan, javed.absar

Subscribers: rovka, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D45644

llvm-svn: 330660
llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
llvm/test/CodeGen/AArch64/GlobalISel/legalize-combines.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalize-nonpowerof2eltsvec.mir