[PATCH] D146905: [IR] Add llvm.tan.* intrinsic

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 26 18:11:51 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:124
     case ISD::FSIN:        R = SoftenFloatRes_FSIN(N); break;
+    case ISD::FTAN:        R = SoftenFloatRes_FTAN(N); break;
     case ISD::STRICT_FSQRT:
----------------
pengfei wrote:
> junaire wrote:
> > RKSimon wrote:
> > > We probably want to add STRICT_FTAN at the same time.
> > I have to admit I know nothing about it and I just simply grep `STRICT_FSIN` and add corresponding cases. I'm confused about where it comes from since there's no occurrence in `SelectionDAGBuilder.cpp`.
> > 
> > It'll be helpful if you can elaborate a bit about how these things work under the hood! :)
> The strict nodes come from constrained intrinsics emitted by the FE under strict mode, see D70256
They aren't directly referenced in SelectionDAGBuilder.cpp because they go through this code

```
  case Intrinsic::INTRINSIC:                                                     
#include "llvm/IR/ConstrainedOps.def"                                            
    visitConstrainedFPIntrinsic(cast<ConstrainedFPIntrinsic>(I));                
    return;
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146905



More information about the llvm-commits mailing list