[llvm] 7c5209d - [LegalizeTypes] Simplify code for UndefinedBooleanContent in PromoteIntOp_VECREDUCE.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue May 9 23:16:41 PDT 2023
Author: Craig Topper
Date: 2023-05-09T23:16:27-07:00
New Revision: 7c5209d01779341a3c2969eca173565df068188b
URL: https://github.com/llvm/llvm-project/commit/7c5209d01779341a3c2969eca173565df068188b
DIFF: https://github.com/llvm/llvm-project/commit/7c5209d01779341a3c2969eca173565df068188b.diff
LOG: [LegalizeTypes] Simplify code for UndefinedBooleanContent in PromoteIntOp_VECREDUCE.
We can treat UndefinedBooleanContent the same as ZeroOrOneBooleanContent.
There's no reason to consider sign extending.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index 7dcc0fbc8170..7e85a2ea0f97 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -2305,8 +2305,6 @@ SDValue DAGTypeLegalizer::PromoteIntOp_VECREDUCE(SDNode *N) {
// to either sign_ext or zero_ext in the undefined case.
switch (TLI.getBooleanContents(InVT)) {
case TargetLoweringBase::UndefinedBooleanContent:
- Op = SExtOrZExtPromotedInteger(N->getOperand(0));
- break;
case TargetLoweringBase::ZeroOrOneBooleanContent:
Op = ZExtPromotedInteger(N->getOperand(0));
break;
@@ -2326,8 +2324,6 @@ SDValue DAGTypeLegalizer::PromoteIntOp_VECREDUCE(SDNode *N) {
// to either sign_ext or zero_ext in the undefined case.
switch (TLI.getBooleanContents(InVT)) {
case TargetLoweringBase::UndefinedBooleanContent:
- Op = SExtOrZExtPromotedInteger(N->getOperand(0));
- break;
case TargetLoweringBase::ZeroOrOneBooleanContent:
Op = ZExtPromotedInteger(N->getOperand(0));
break;
More information about the llvm-commits
mailing list