[AArch64][GlobalISel] Generalize logic for promoting copies
authorJessica Paquette <jpaquette@apple.com>
Tue, 28 Apr 2020 21:45:05 +0000 (14:45 -0700)
committerJessica Paquette <jpaquette@apple.com>
Tue, 28 Apr 2020 21:56:08 +0000 (14:56 -0700)
commit9f31446c99bd2b92fe863a5afda08e1ed6fd94b9
tree380689201007666f56135bb2ac5cd86e1ac5387a
parent68b30bc02b3a7e84d03f43a82cc08e5df76a28dd
[AArch64][GlobalISel] Generalize logic for promoting copies

Generalize the 16-bit FPR to 32-bit GPR logic to work for all cases where
destination size is bigger than source size.

Also fixed CheckCopy() always returning true instead of the result of
isValidCopy().

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

Patch by tambre (Raul Tambre)
llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp