@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
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
@@ -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
@@ -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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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;
+
@@ -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;
+
@@ -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;
+
@@ -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;
+
@@ -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;
+
@@ -803,7 +805,10 @@ SystemZTargetLowering::SystemZTargetLowering(const
TargetMachine &TM,
ISD::SREM,
ISD::UREM,
ISD::INTRINSIC_VOID,
- ISD::INTRINSIC_W_CHAIN});
+
@@ -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;
+
@@ -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;
+
@@ -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;
+
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
@@ -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;
+
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
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
@@ -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
@@ -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-
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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:
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
___
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 - 100 of 420 matches
Mail list logo