[PATCH] D70214: [X86] Add custom type legalization and lowering for scalar STRICT_FP_TO_SINT/UINT

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 17:27:23 PST 2019


andrew.w.kaylor added inline comments.


================
Comment at: llvm/test/CodeGen/X86/fp-intrinsics.ll:714
 ; SSE:       # %bb.0: # %entry
+; SSE-NEXT:    cvttsd2si %xmm0, %rax
+; SSE-NEXT:    # kill: def $eax killed $eax killed $rax
----------------
craig.topper wrote:
> andrew.w.kaylor wrote:
> > This is wrong for the strict case. If the converted value doesn't fit in the destination range, the invalid flag is supposed to be raised. Likewise with the AVX case below. Possibly also the x87 case above.
> Agreed, but the only way I see to fix this is to add an IR pass to insert the checks before SelectionDAG.
Can you put FIXME's in the code indicating that something needs to be done. And maybe create a Bugzilla report?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70214/new/

https://reviews.llvm.org/D70214





More information about the llvm-commits mailing list