[PATCH] D54906: [LegalizeVectorTypes][X86][ARM][AArch64][PowerPC] Don't use SplitVecOp_TruncateHelper for FP_TO_SINT/UINT.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 26 09:59:54 PST 2018
craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel, efriedma.
Herald added subscribers: jsji, chrib, kristof.beyls, javed.absar, nemanjai.
SplitVecOp_TruncateHelper tries to promote the result type while splitting FP_TO_SINT/UINT. It then concatenates the result and introduces a truncate to the original result type. But it does this without inserting the AssertZExt/AssertSExt that the regular result type promotion would insert. Nor does it turn FP_TO_UINT into FP_TO_SINT the way normal result type promotion for these operations does. This is bad on X86 which doesn't support FP_TO_SINT until AVX512.
This patch disables the use of SplitVecOp_TruncateHelper for these operations and just lets normal promotion handle it. I've tweaked a couple things in X86ISelLowering to avoid a few obvious regressions there. I believe all the changes on X86 are improvements. Not sure about the other targets, but it doesn't look obviously worse.
Repository:
rL LLVM
https://reviews.llvm.org/D54906
Files:
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/AArch64/arm64-convert-v4f64.ll
test/CodeGen/AArch64/vcvt-oversize.ll
test/CodeGen/ARM/vcvt.ll
test/CodeGen/PowerPC/vec_conv_fp64_to_i16_elts.ll
test/CodeGen/PowerPC/vec_conv_fp64_to_i8_elts.ll
test/CodeGen/X86/vec_cast2.ll
test/CodeGen/X86/vec_fp_to_int-widen.ll
test/CodeGen/X86/vec_fp_to_int.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54906.175285.patch
Type: text/x-patch
Size: 48897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181126/d9dea8a4/attachment.bin>
More information about the llvm-commits
mailing list