[llvm] [Legalizer] Soften EXTRACT_ELEMENT on ppcf128 (PR #77412)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 9 03:18:06 PST 2024


================
@@ -262,6 +264,16 @@ SDValue DAGTypeLegalizer::SoftenFloatRes_ConstantFP(SDNode *N) {
   }
 }
 
+SDValue DAGTypeLegalizer::SoftenFloatRes_EXTRACT_ELEMENT(SDNode *N) {
+  SDValue Src = N->getOperand(0);
+  assert(Src.getValueType() == MVT::ppcf128 &&
+         Src.getOperand(0)->getOpcode() == ISD::BUILD_PAIR &&
+         "In floats only ppcf128 can be extracted by element!");
+  EVT DestVT = EVT::getIntegerVT(*DAG.getContext(), N->getValueSizeInBits(0));
----------------
RKSimon wrote:

Use EVT::changeTypeToInteger ? But I don't understand why you need to make it an integer

https://github.com/llvm/llvm-project/pull/77412


More information about the llvm-commits mailing list