[llvm] [AMDGPU] expand-fp: Change frem expansion criterion (PR #158285)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 30 23:49:06 PDT 2025


================
@@ -4809,7 +4809,8 @@ void DAGTypeLegalizer::WidenVectorResult(SDNode *N, unsigned ResNo) {
     EVT VT = N->getValueType(0);
     EVT WideVecVT = TLI.getTypeToTransformTo(*DAG.getContext(), VT);
     if (!TLI.isOperationLegalOrCustomOrPromote(N->getOpcode(), WideVecVT) &&
-        TLI.isOperationExpand(N->getOpcode(), VT.getScalarType())) {
+        (TLI.isOperationExpand(N->getOpcode(), VT.getScalarType()) ||
+         TLI.isOperationLibCall(N->getOpcode(), VT.getScalarType()))) {
----------------
arsenm wrote:

Add isOperationExpandOrLibCall?

Beyond the scope of this patch, but the vector legalization logic is a pain. Ideally this would be written to do vector splitting based on the available calls (which theoretically should include a vector version) 



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


More information about the llvm-commits mailing list