[PATCH] D12372: [X86] Fix sitofp and uitofp instruction matching failures with long double and avx512
Mitch Bodart via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 09:23:32 PDT 2015
mbodart added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:1332
@@ -1331,3 @@
- if (Subtarget->is64Bit()) {
- setOperationAction(ISD::SINT_TO_FP, MVT::i64, Legal);
- setOperationAction(ISD::UINT_TO_FP, MVT::i64, Legal);
----------------
AsafBadouh wrote:
> I'm not sure, but I think you missed SINT_TO_FP case.
Hi Asaf,
The SINT_TO_FP case does not require as many changes as the UINT_TO_FP case.
As the signed conversion instructions [v]cvtsi2ss/sd have existed since SSE/SSE2, LowerSINT_TO_FP already properly handles i32 and i64. And the operation action is properly set to Custom earlier in this function.
But the unsigned conversion instructions vcvtusi2ss/sd are new as of avx512f, so support for i32/i64->FP needed to be added to LowerUINT_TO_FP, and their operation action needed to be changed to Custom above.
regards,
Mitch
http://reviews.llvm.org/D12372
More information about the llvm-commits
mailing list