[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-29 Thread Ulrich Weigand via cfe-commits
@@ -1211,6 +1211,19 @@ class TargetInfo : public TransferrableTargetInfo, TiedOperand = N; // Don't copy Name or constraint string. } + +// Output operand bounds can be set by target. uweigand wrote: Maybe make the comment a bit more specif

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-29 Thread Ulrich Weigand via cfe-commits
@@ -2715,18 +2716,20 @@ EmitAsmStores(CodeGenFunction &CGF, const AsmStmt &S, // ResultRegDests can be also populated by addReturnRegisterOutputs() above, // in which case its size may grow. assert(ResultTypeRequiresCast.size() <= ResultRegDests.size()); - assert(ResultR

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-28 Thread Ulrich Weigand via cfe-commits
@@ -2715,18 +2715,22 @@ EmitAsmStores(CodeGenFunction &CGF, const AsmStmt &S, // ResultRegDests can be also populated by addReturnRegisterOutputs() above, // in which case its size may grow. assert(ResultTypeRequiresCast.size() <= ResultRegDests.size()); - assert(ResultR

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-28 Thread Ulrich Weigand via cfe-commits
@@ -1211,6 +1211,15 @@ class TargetInfo : public TransferrableTargetInfo, TiedOperand = N; // Don't copy Name or constraint string. } + +// Output operand bounds can be set by target. +void setOutputOperandBounds(unsigned Min, unsigned Max) { + setR

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-28 Thread Ulrich Weigand via cfe-commits
@@ -1211,6 +1211,15 @@ class TargetInfo : public TransferrableTargetInfo, TiedOperand = N; // Don't copy Name or constraint string. } + +// Output operand bounds can be set by target. +void setOutputOperandBounds(unsigned Min, unsigned Max) { + setR

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-28 Thread Ulrich Weigand via cfe-commits
@@ -2715,18 +2715,22 @@ EmitAsmStores(CodeGenFunction &CGF, const AsmStmt &S, // ResultRegDests can be also populated by addReturnRegisterOutputs() above, // in which case its size may grow. assert(ResultTypeRequiresCast.size() <= ResultRegDests.size()); - assert(ResultR

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-28 Thread Ulrich Weigand via cfe-commits
@@ -9158,9 +9393,9 @@ SDValue SystemZTargetLowering::PerformDAGCombine(SDNode *N, case ISD::SREM: case ISD::UREM: return combineIntDIVREM(N, DCI); case ISD::INTRINSIC_W_CHAIN: - case ISD::INTRINSIC_VOID: return combineINTRINSIC(N, DCI); + case ISD::IN

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-28 Thread Ulrich Weigand via cfe-commits
@@ -2704,7 +2704,7 @@ EmitAsmStores(CodeGenFunction &CGF, const AsmStmt &S, const llvm::ArrayRef ResultRegDests, const llvm::ArrayRef ResultRegQualTys, const llvm::BitVector &ResultTypeRequiresCast, - const llvm::BitVector

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-22 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,266 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-22 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,266 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-22 Thread Ulrich Weigand via cfe-commits
@@ -8826,15 +9029,49 @@ SDValue SystemZTargetLowering::combineSELECT_CCMASK( int CCMaskVal = CCMask->getZExtValue(); SDValue CCReg = N->getOperand(4); - if (combineCCMask(CCReg, CCValidVal, CCMaskVal)) -return DAG.getNode(SystemZISD::SELECT_CCMASK, SDLoc(N), N->getVal

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-22 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,266 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-22 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,266 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-22 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,266 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-22 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,266 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-22 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,266 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-22 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,266 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-22 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand commented: More comments on just the CC optimization part - this is looking really good now, just a few minor issue and some suggestions for further enhancement. I'll start looking at the rest of the patch again as well. https://github.com/llvm/llvm-project/pull/1

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-22 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,266 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-22 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/125970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-22 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,266 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand commented: CC optimization is looking better now, still a couple of issues below. https://github.com/llvm/llvm-project/pull/125970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8826,15 +9104,49 @@ SDValue SystemZTargetLowering::combineSELECT_CCMASK( int CCMaskVal = CCMask->getZExtValue(); SDValue CCReg = N->getOperand(4); - if (combineCCMask(CCReg, CCValidVal, CCMaskVal)) -return DAG.getNode(SystemZISD::SELECT_CCMASK, SDLoc(N), N->getVal

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/125970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8826,15 +9104,49 @@ SDValue SystemZTargetLowering::combineSELECT_CCMASK( int CCMaskVal = CCMask->getZExtValue(); SDValue CCReg = N->getOperand(4); - if (combineCCMask(CCReg, CCValidVal, CCMaskVal)) -return DAG.getNode(SystemZISD::SELECT_CCMASK, SDLoc(N), N->getVal

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-20 Thread Ulrich Weigand via cfe-commits
@@ -8701,95 +8734,341 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } -static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { +static std::pair findCCUse(const SDValue &Val) { + auto *N = Val.getNode(); + if (!N) +return std::make_pa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-11 Thread Ulrich Weigand via cfe-commits
@@ -8702,61 +8738,264 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +static SmallSet convertCCMaskToCCValsSet(int Mask) { + SmallSet CCVals; + size_t Pos = 0; + while (Mask) { +if (Mask & 0x1) + CCVals.insert(3 - Pos); +Mask >>= 1; +

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-11 Thread Ulrich Weigand via cfe-commits
@@ -8702,61 +8738,264 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +static SmallSet convertCCMaskToCCValsSet(int Mask) { + SmallSet CCVals; + size_t Pos = 0; + while (Mask) { +if (Mask & 0x1) + CCVals.insert(3 - Pos); +Mask >>= 1; +

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-11 Thread Ulrich Weigand via cfe-commits
@@ -8702,61 +8738,264 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +static SmallSet convertCCMaskToCCValsSet(int Mask) { + SmallSet CCVals; + size_t Pos = 0; + while (Mask) { +if (Mask & 0x1) + CCVals.insert(3 - Pos); +Mask >>= 1; +

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-11 Thread Ulrich Weigand via cfe-commits
@@ -8702,61 +8738,264 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +static SmallSet convertCCMaskToCCValsSet(int Mask) { + SmallSet CCVals; + size_t Pos = 0; + while (Mask) { +if (Mask & 0x1) + CCVals.insert(3 - Pos); +Mask >>= 1; +

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-11 Thread Ulrich Weigand via cfe-commits
@@ -8702,61 +8738,264 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +static SmallSet convertCCMaskToCCValsSet(int Mask) { + SmallSet CCVals; + size_t Pos = 0; + while (Mask) { +if (Mask & 0x1) + CCVals.insert(3 - Pos); +Mask >>= 1; +

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-11 Thread Ulrich Weigand via cfe-commits
@@ -803,7 +805,10 @@ SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM, ISD::SREM, ISD::UREM, ISD::INTRINSIC_VOID, - ISD::INTRINSIC_W_CHAIN}); +

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-11 Thread Ulrich Weigand via cfe-commits
@@ -8702,61 +8738,264 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +static SmallSet convertCCMaskToCCValsSet(int Mask) { + SmallSet CCVals; + size_t Pos = 0; + while (Mask) { +if (Mask & 0x1) + CCVals.insert(3 - Pos); +Mask >>= 1; +

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-11 Thread Ulrich Weigand via cfe-commits
@@ -8702,61 +8738,264 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +static SmallSet convertCCMaskToCCValsSet(int Mask) { + SmallSet CCVals; + size_t Pos = 0; + while (Mask) { +if (Mask & 0x1) + CCVals.insert(3 - Pos); +Mask >>= 1; +

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-11 Thread Ulrich Weigand via cfe-commits
@@ -8702,61 +8738,264 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +static SmallSet convertCCMaskToCCValsSet(int Mask) { + SmallSet CCVals; + size_t Pos = 0; + while (Mask) { +if (Mask & 0x1) + CCVals.insert(3 - Pos); +Mask >>= 1; +

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-11 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/125970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-11 Thread Ulrich Weigand via cfe-commits
@@ -8702,61 +8738,264 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +static SmallSet convertCCMaskToCCValsSet(int Mask) { + SmallSet CCVals; + size_t Pos = 0; + while (Mask) { +if (Mask & 0x1) + CCVals.insert(3 - Pos); +Mask >>= 1; +

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-08-11 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand commented: This approach does look promising, it's much shorter, cleaner, and more general than before. Still a number of inline comments ... https://github.com/llvm/llvm-project/pull/125970 ___ cfe-commits mailing list cf

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-23 Thread Ulrich Weigand via cfe-commits
@@ -8789,8 +9049,329 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-23 Thread Ulrich Weigand via cfe-commits
@@ -8789,8 +9049,329 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-23 Thread Ulrich Weigand via cfe-commits
@@ -8789,8 +9049,329 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-23 Thread Ulrich Weigand via cfe-commits
@@ -8789,8 +9049,329 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-23 Thread Ulrich Weigand via cfe-commits
@@ -8789,8 +9049,329 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-23 Thread Ulrich Weigand via cfe-commits
@@ -8789,8 +9049,329 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8789,8 +9029,535 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8958,483 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8789,8 +9029,535 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8703,51 +8738,256 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condition code - // set by the CCReg instruction using the CCValid / CCMask

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8703,51 +8738,256 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condition code - // set by the CCReg instruction using the CCValid / CCMask

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8703,51 +8738,256 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condition code - // set by the CCReg instruction using the CCValid / CCMask

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8703,51 +8738,256 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condition code - // set by the CCReg instruction using the CCValid / CCMask

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8789,8 +9029,535 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8703,51 +8738,256 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condition code - // set by the CCReg instruction using the CCValid / CCMask

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8789,8 +9029,535 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8703,51 +8738,256 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condition code - // set by the CCReg instruction using the CCValid / CCMask

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8958,483 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146844)

2025-07-08 Thread Ulrich Weigand via cfe-commits
uweigand wrote: Both `clang-s390x-linux` and `clang-s390x-linux-lnt` failed with the same `Clang::bindings.sh` error: https://lab.llvm.org/buildbot/#/builders/42/builds/5208 https://lab.llvm.org/buildbot/#/builders/136/builds/4462 The `clang-s390x-linux-multistage` run including this change did

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8695,6 +8730,106 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { + // CCMask for ICmp is equal to 0, 1, 2 or 3. + const auto CCMaskForICmpEQCCVal = [](unsigned CC) { +assert(CC < 4 && "CC out of

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8958,483 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-07 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/125970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-07 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand commented: Once again not a full review, but comments on the combiner changes. https://github.com/llvm/llvm-project/pull/125970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8695,6 +8730,106 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { + // CCMask for ICmp is equal to 0, 1, 2 or 3. + const auto CCMaskForICmpEQCCVal = [](unsigned CC) { +assert(CC < 4 && "CC out of

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8728,9 +8928,9 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { auto *FalseVal = dyn_cast(CompareLHS->getOperand(1)); if (!FalseVal) return false; -if (CompareRHS->getAPIntValue() == FalseVal->getAPIntValue()) +if (CompareRHS-

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-30 Thread Ulrich Weigand via cfe-commits
@@ -8695,6 +8730,83 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { + // CCMask for ICmp is equal to 0, 1, 2 or 3. + const auto CCMaskForICmpEQCCVal = [](unsigned CC) { +assert(CC < 4 && "CC out of

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-30 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8958,483 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-30 Thread Ulrich Weigand via cfe-commits
@@ -8695,6 +8730,83 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { + // CCMask for ICmp is equal to 0, 1, 2 or 3. + const auto CCMaskForICmpEQCCVal = [](unsigned CC) { +assert(CC < 4 && "CC out of

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-30 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8958,483 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-30 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8958,483 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-30 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8958,483 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-30 Thread Ulrich Weigand via cfe-commits
@@ -8695,6 +8730,83 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { + // CCMask for ICmp is equal to 0, 1, 2 or 3. + const auto CCMaskForICmpEQCCVal = [](unsigned CC) { +assert(CC < 4 && "CC out of

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-25 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8961,445 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_cc_a (select_cc_b)), where select_cc_a has one

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-24 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8961,445 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_cc_a (select_cc_b)), where select_cc_a has one

[clang] [SystemZ][zOS] disable _Float16 support on z/OS (PR #145532)

2025-06-24 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/145532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-24 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8961,445 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_cc_a (select_cc_b)), where select_cc_a has one

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-24 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8961,445 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_cc_a (select_cc_b)), where select_cc_a has one

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-24 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8961,445 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_cc_a (select_cc_b)), where select_cc_a has one

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-24 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8961,445 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_cc_a (select_cc_b)), where select_cc_a has one

[clang] [SystemZ][zOS] disable _Float16 support on z/OS (PR #145532)

2025-06-24 Thread Ulrich Weigand via cfe-commits
@@ -76,6 +76,7 @@ class LLVM_LIBRARY_VISIBILITY SystemZTargetInfo : public TargetInfo { MinGlobalAlign = 16; HasUnalignedAccess = true; if (Triple.isOSzOS()) { + HasFloat16 = false; uweigand wrote: Wouldn't this be the default anyway? https:

[clang] [SystemZ][zOS] disable _Float16 support on z/OS (PR #145532)

2025-06-24 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand approved this pull request. I guess this is fine with me if this is what you want for z/OS. Note that on Linux, _Float16 also wasn't supported previously, we've made the choice to add it. https://github.com/llvm/llvm-project/pull/145532 ___

[clang] [llvm] Global string alignment (PR #142346)

2025-06-06 Thread Ulrich Weigand via cfe-commits
uweigand wrote: > The clang patch was written the way it was because it was necessary to comply > with the ABI rules. Strings passed to printf don't have any sort of alignment > requirement, so you can't really appeal to the ABI rules here, I think? Just to be clear, the ABI requirement is tha

  1   2   3   4   5   >