[PATCH] D69275: Add constrained int->FP intrinsics

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 10:10:44 PDT 2019


kpn planned changes to this revision.
kpn marked an inline comment as done.
kpn added a comment.

It looks like I am going to have to do some Custom lowering work after all. Plus the changes to the IR verifier are missing.



================
Comment at: llvm/test/CodeGen/X86/fp-intrinsics.ll:423
+; CHECK-LABEL: @f31
+; CHECK: call double @llvm.experimental.constrained.sitofp
+define double @f31() #0 {
----------------
kpn wrote:
> craig.topper wrote:
> > kpn wrote:
> > > craig.topper wrote:
> > > > This check line is for IR, but this is an assembly test. CHECK isn't a valid check-prefix for this file. Which also means all of the CHECK-LABEL lines are broken in the existing tests aren't doing anything
> > > Ouch, yeah, that error is all over this file. How about I fix it for the new changes here and then fix the rest in another ticket?
> > What is the expected behavior here? We seem to doing some emulation of the operation instead of using the conversion instruction we have with SSE2.
> That may be an artifact of of the getOperationAction()/getStrictFPOperationAction() issue that I found after the rearranging Cameron asked for. I'm looking into it now.
Yep, that's what caused it. If we use the getStrictFPOperationAction() route like the other STRICT nodes here then we end up with Custom lowerings.

It's a shame there's no "Unassigned" "lowering". Currently there's no way to know if the target doesn't implement something or if it really does want to Expand like is currently returned. And LegalizeOp() doesn't bother trying to query the target like ExpandNode() does. That seems like a bug.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69275





More information about the llvm-commits mailing list