[llvm] d09109a - [RISCV] Use isScalarInteger instead of isInteger. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 15 22:53:52 PDT 2023
Author: Craig Topper
Date: 2023-07-15T22:52:43-07:00
New Revision: d09109aa1ec104b51ce7c2b06ecbc0c52fe2f780
URL: https://github.com/llvm/llvm-project/commit/d09109aa1ec104b51ce7c2b06ecbc0c52fe2f780
DIFF: https://github.com/llvm/llvm-project/commit/d09109aa1ec104b51ce7c2b06ecbc0c52fe2f780.diff
LOG: [RISCV] Use isScalarInteger instead of isInteger. NFC
The type should only be scalar here and the isScalarInteger
should be a simpler check.
Added:
Modified:
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
index 8c13f95c4015db..3d8a3bfc5f1791 100644
--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
@@ -2482,7 +2482,7 @@ bool RISCVDAGToDAGISel::selectSETCC(SDValue N, ISD::CondCode ExpectedCCVal,
SDValue LHS = N->getOperand(0);
SDValue RHS = N->getOperand(1);
- if (!LHS.getValueType().isInteger())
+ if (!LHS.getValueType().isScalarInteger())
return false;
// If the RHS side is 0, we don't need any extra instructions, return the LHS.
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 0a250f495f1a1a..25f1208e20c2f4 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -5784,7 +5784,7 @@ static bool selectSETCC(SDValue N, ISD::CondCode ExpectedCCVal, SDValue &Val,
SDValue LHS = N->getOperand(0);
SDValue RHS = N->getOperand(1);
- if (!LHS.getValueType().isInteger())
+ if (!LHS.getValueType().isScalarInteger())
return false;
// If the RHS side is 0, we don't need any extra instructions, return the LHS.
@@ -5904,7 +5904,7 @@ SDValue RISCVTargetLowering::lowerSELECT(SDValue Op, SelectionDAG &DAG) const {
// the SELECT. Performing the lowering here allows for greater control over
// when CZERO_{EQZ/NEZ} are used vs another branchless sequence or
// RISCVISD::SELECT_CC node (branch-based select).
- if (Subtarget.hasStdExtZicond() && VT.isInteger()) {
+ if (Subtarget.hasStdExtZicond() && VT.isScalarInteger()) {
SDValue NewCondV;
if (selectSETCC(CondV, ISD::SETNE, NewCondV, DAG)) {
// (select (riscv_setne c), t, 0) -> (czero_eqz t, c)
More information about the llvm-commits
mailing list