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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 11:38:22 PDT 2019


craig.topper added a comment.

In D69275#1728938 <https://reviews.llvm.org/D69275#1728938>, @kpn wrote:

> 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:
> 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.
I didn't understand this. Isn't ExpandNode is only called from LegalizeOp? And doesn't LegalizeOp query the target to know to call ExpandNode?


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