[llvm] [DAG] getOperationAction - always return Custom action for target opcodes (PR #95401)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 05:47:09 PDT 2024


phoebewang wrote:

This can be solve in this way too:
```
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 3fbab3af32bb..a535cffa282c 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -57239,7 +57239,7 @@ static SDValue combineFP_ROUND(SDNode *N, SelectionDAG &DAG,
     return SDValue();
   }

-  if (NumElts == 1 || !isPowerOf2_32(NumElts))
+  if (NumElts == 1 || NumElts > 16 || !isPowerOf2_32(NumElts))
     return SDValue();

   // Widen to at least 4 input elements.
```
Which looks less destructive to me.

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


More information about the llvm-commits mailing list