GlobalISel: Rewrite getLCMType
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 6 Jun 2020 23:37:43 +0000 (19:37 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 21 Jul 2020 01:06:30 +0000 (21:06 -0400)
commit1ef3ed0eb49d39d6eda84dec7e702aee7f55e9ae
treecea5c2faa54661efd06afe92e8e3516187985f02
parent12d5bec8c79b9841f1b25fa87ffb69b9d3cbec3b
GlobalISel: Rewrite getLCMType

Try to make the behavior more consistent with getGCDType, and bias
towards returning something closer to the source type whenever there's
an ambiguity.
llvm/include/llvm/CodeGen/GlobalISel/Utils.h
llvm/lib/CodeGen/GlobalISel/Utils.cpp
llvm/unittests/CodeGen/GlobalISel/GISelUtilsTest.cpp