Skip to content

Commit 7c5209d

Browse files
committed
[LegalizeTypes] Simplify code for UndefinedBooleanContent in PromoteIntOp_VECREDUCE.
We can treat UndefinedBooleanContent the same as ZeroOrOneBooleanContent. There's no reason to consider sign extending.
1 parent cf4477d commit 7c5209d

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,8 +2305,6 @@ SDValue DAGTypeLegalizer::PromoteIntOp_VECREDUCE(SDNode *N) {
23052305
// to either sign_ext or zero_ext in the undefined case.
23062306
switch (TLI.getBooleanContents(InVT)) {
23072307
case TargetLoweringBase::UndefinedBooleanContent:
2308-
Op = SExtOrZExtPromotedInteger(N->getOperand(0));
2309-
break;
23102308
case TargetLoweringBase::ZeroOrOneBooleanContent:
23112309
Op = ZExtPromotedInteger(N->getOperand(0));
23122310
break;
@@ -2326,8 +2324,6 @@ SDValue DAGTypeLegalizer::PromoteIntOp_VECREDUCE(SDNode *N) {
23262324
// to either sign_ext or zero_ext in the undefined case.
23272325
switch (TLI.getBooleanContents(InVT)) {
23282326
case TargetLoweringBase::UndefinedBooleanContent:
2329-
Op = SExtOrZExtPromotedInteger(N->getOperand(0));
2330-
break;
23312327
case TargetLoweringBase::ZeroOrOneBooleanContent:
23322328
Op = ZExtPromotedInteger(N->getOperand(0));
23332329
break;

0 commit comments

Comments
 (0)