[PATCH] D55897: Add constrained fptrunc and fpext intrinsics

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 13 09:02:25 PST 2019


cameron.mcinally added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:710
 
+SDValue DAGTypeLegalizer::ScalarizeVecOp_STRICT_FP_ROUND(SDNode *N, 
+                                                         unsigned OpNo) {
----------------
kpn wrote:
> craig.topper wrote:
> > What makes us reach this case? I would expect we'd scalarize based on the result type before we got to the operand type.
> Test case CodeGen/AArch64/neon-fpround_f128.ll says this code is needed.  That case goes through the non-STRICT version of this function. This STRICT function was copied from the non-STRICT function and called in the appropriate places alongside that function. And a trivial conversion of the test case to use the constrained intrinsics does indeed go through this STRICT function.
> 
> I did want to try to keep the functions unified, but sometimes the result was too ugly to live.
Have you considered scalarizing the operands with a generic function? Something like `ScalarizeVecRes_StrictFPOp(...)`? I suspect we'll see reuse of this code.

@craig.topper 

> What makes us reach this case? I would expect we'd scalarize based on the result type before we got to the operand type.

The different operand and result types for these operations are probably why `ScalarizeVecRes_StrictFPOp(...)` didn't trip. Just guessing though...


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

https://reviews.llvm.org/D55897





More information about the llvm-commits mailing list