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 D77530
[AArch64][GlobalISel] Generalize logic for promoting copies tambre on Apr 6 2020, 1:17 AM. Authored by
Details 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().
Diff Detail
Event TimelineComment Actions This actually breaks CodeGen/AArch64/f16-instructions.ll's test_select. Will investigate.
Comment Actions Added proper generalization for the DstSize > SrcSize aka SUBREG_TO_REG case. Also moved the missing comment to SrcSize > DstSize.
Comment Actions I didn't add any testcases. The testcase changes are now gone that I fixed the code to work correctly. This is now a NFC. |
It's weird that we have this case and also the case above which checks getMinSizeForRegBank(SrcRegBank) > DstSize. Is this a typo?