]> granicus.if.org Git - llvm/commit
GlobalISel: Handle more cases for widenScalar of G_MERGE_VALUES
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 17 Jul 2019 20:22:38 +0000 (20:22 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 17 Jul 2019 20:22:38 +0000 (20:22 +0000)
commit873bfe9bdf4aa4f309907b4a9bca8fd07beb1cb6
treef9cfb5bbbabbaf4c3c6a5e694b00b04f7755bc47
parentd72f127799b3faea9917cab164a2238d6b63d199
GlobalISel: Handle more cases for widenScalar of G_MERGE_VALUES

Use an anyext to the requested type for the leftover operand to
produce a slightly wider type, and then truncate the final merge.

I have another implementation almost ready which handles arbitrary
widens, but I think it produces worse code in this example (which I
think is 90% due to not folding redundant copies or folding out
implicit_def users), so I wanted to add this as a baseline first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366366 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/GlobalISel/LegalizerHelper.cpp
test/CodeGen/AMDGPU/GlobalISel/legalize-merge-values.mir
unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp