[llvm] [PPC] Add custom lowering for uaddo (PR #110137)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 12:50:15 PDT 2024
================
@@ -11967,11 +11969,45 @@ SDValue PPCTargetLowering::LowerFP_EXTEND(SDValue Op, SelectionDAG &DAG) const {
llvm_unreachable("ERROR:Should return for all cases within swtich.");
}
+SDValue PPCTargetLowering::LowerUaddo(SDValue Op, SelectionDAG &DAG) const {
+ // Default to target independent lowering if there is a logical user of the
+ // carry-bit.
+ for (SDNode *U : Op->uses()) {
+ if (U->getOpcode() == ISD::SELECT || ISD::isBitwiseLogicOp(U->getOpcode()))
+ return SDValue();
----------------
RolandF77 wrote:
IIUC this patch doesn't make the long long case worse, it just doesn't make it better. Maybe long long can be addressed in a separate patch? Seems hard to tell that case apart from the condition use case - may want to handle the full 64 bit operation in 32 bit mode for long long.
https://github.com/llvm/llvm-project/pull/110137
More information about the llvm-commits
mailing list