[PATCH] D44061: [PowerPC][LegalizeFloatTypes] Move the PPC hacks for (i32 fp_to_sint/fp_to_uint (ppcf128 X)) out of LegalizeFloatTypes and into PPC specific code

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 17:05:06 PST 2018


craig.topper created this revision.
craig.topper added a reviewer: hfinkel.
Herald added subscribers: kbarton, nemanjai.

I'm not entirely sure these hacks are still needed. If you remove the hacks completely, the name of the library call that gets generated doesn't match the grep the test previously had. So the test wasn't really checking anything.

If the hack is still needed it belongs in PPC specific code. I believe the FP_TO_SINT code here is the only place in the tree where a FP_ROUND_INREG node is created today. And I don't think its even being used correctly because the legalization returned a BUILD_PAIR with the same value twice. That doesn't seem right to me. By moving the code entirely to PPC we can avoid creating the FP_ROUND_INREG at all.

I replace the grep in the existing test with full checks generated by hacking update_llc_test_check.py to support ppc32 just long enough to generate it. I can commit that ahead if this patch if desired.


https://reviews.llvm.org/D44061

Files:
  lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
  lib/Target/PowerPC/PPCISelLowering.cpp
  test/CodeGen/PowerPC/2008-10-28-f128-i32.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44061.136882.patch
Type: text/x-patch
Size: 17914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180303/a29f9654/attachment.bin>


More information about the llvm-commits mailing list