[llvm] 7ff9669 - [ISel/RISCV] Refactor isPromotedOpNeedingSplit (NFC) (#146059)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 28 03:41:30 PDT 2025


Author: Ramkumar Ramachandra
Date: 2025-06-28T11:41:26+01:00
New Revision: 7ff9669a2e8003764251de14fcbf88a327d876c4

URL: https://github.com/llvm/llvm-project/commit/7ff9669a2e8003764251de14fcbf88a327d876c4
DIFF: https://github.com/llvm/llvm-project/commit/7ff9669a2e8003764251de14fcbf88a327d876c4.diff

LOG: [ISel/RISCV] Refactor isPromotedOpNeedingSplit (NFC) (#146059)

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 6261ae69a4d3e..a9847afa5021b 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -7044,13 +7044,10 @@ static unsigned getRISCVVLOp(SDValue Op) {
 
 static bool isPromotedOpNeedingSplit(SDValue Op,
                                      const RISCVSubtarget &Subtarget) {
-  if (Op.getValueType() == MVT::nxv32f16 &&
-      (Subtarget.hasVInstructionsF16Minimal() &&
-       !Subtarget.hasVInstructionsF16()))
-    return true;
-  if (Op.getValueType() == MVT::nxv32bf16)
-    return true;
-  return false;
+  return (Op.getValueType() == MVT::nxv32f16 &&
+          (Subtarget.hasVInstructionsF16Minimal() &&
+           !Subtarget.hasVInstructionsF16())) ||
+         Op.getValueType() == MVT::nxv32bf16;
 }
 
 static SDValue SplitVectorOp(SDValue Op, SelectionDAG &DAG) {


        


More information about the llvm-commits mailing list