[llvm] [Xtensa] Implement lowering SELECT_CC/BRCC for Xtensa FP Option. (PR #145544)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 27 07:03:24 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- llvm/lib/Target/Xtensa/XtensaISelLowering.cpp llvm/lib/Target/Xtensa/XtensaISelLowering.h llvm/lib/Target/Xtensa/XtensaInstrInfo.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/Xtensa/XtensaISelLowering.cpp b/llvm/lib/Target/Xtensa/XtensaISelLowering.cpp
index 3a7722d26..26ad5dcdc 100644
--- a/llvm/lib/Target/Xtensa/XtensaISelLowering.cpp
+++ b/llvm/lib/Target/Xtensa/XtensaISelLowering.cpp
@@ -924,16 +924,16 @@ SDValue XtensaTargetLowering::LowerSELECT_CC(SDValue Op,
FalseValue, TargetCC, Op->getFlags());
return Res;
}
- assert(LHS.getValueType() == MVT::f32 &&
- "We expect MVT::f32 type of the LHS Operand in SELECT_CC");
- unsigned BrOpcode;
- unsigned CmpOpCode;
- GetFPBranchKind(CC, BrOpcode, CmpOpCode);
- SDValue TargetCC = DAG.getConstant(CmpOpCode, DL, MVT::i32);
- SDValue TargetBC = DAG.getConstant(BrOpcode, DL, MVT::i32);
- return DAG.getNode(XtensaISD::SELECT_CC_FP, DL, Ty,
- {LHS, RHS, TrueValue, FalseValue, TargetCC, TargetBC},
- Op->getFlags());
+ assert(LHS.getValueType() == MVT::f32 &&
+ "We expect MVT::f32 type of the LHS Operand in SELECT_CC");
+ unsigned BrOpcode;
+ unsigned CmpOpCode;
+ GetFPBranchKind(CC, BrOpcode, CmpOpCode);
+ SDValue TargetCC = DAG.getConstant(CmpOpCode, DL, MVT::i32);
+ SDValue TargetBC = DAG.getConstant(BrOpcode, DL, MVT::i32);
+ return DAG.getNode(XtensaISD::SELECT_CC_FP, DL, Ty,
+ {LHS, RHS, TrueValue, FalseValue, TargetCC, TargetBC},
+ Op->getFlags());
}
SDValue XtensaTargetLowering::LowerRETURNADDR(SDValue Op,
``````````
</details>
https://github.com/llvm/llvm-project/pull/145544
More information about the llvm-commits
mailing list