Skip to content

Commit 426e8c8

Browse files
committed
Address comments
1 parent ad3c72b commit 426e8c8

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12263,12 +12263,11 @@ parseSVERegAsConstraint(StringRef Constraint) {
1226312263
if (Constraint.getAsInteger(10, V) || V > 31)
1226412264
return std::nullopt;
1226512265

12266-
if (!IsPredicate)
12267-
return std::make_pair(AArch64::Z0 + V, &AArch64::ZPRRegClass);
12268-
else if (IsPredicateAsCount)
12266+
if (IsPredicateAsCount)
1226912267
return std::make_pair(AArch64::PN0 + V, &AArch64::PNRRegClass);
12270-
else
12268+
if (IsPredicate)
1227112269
return std::make_pair(AArch64::P0 + V, &AArch64::PPRRegClass);
12270+
return std::make_pair(AArch64::Z0 + V, &AArch64::ZPRRegClass);
1227212271
}
1227312272

1227412273
static std::optional<PredicateConstraint>
@@ -12523,12 +12522,10 @@ AArch64TargetLowering::getRegForInlineAsmConstraint(
1252312522
// still observe clobbers of Z-registers by clobbering
1252412523
// the lower 128bits of those registers.
1252512524
if (AArch64::ZPRRegClass.hasSubClassEq(P->second) &&
12526-
!Subtarget->hasSVE() && Subtarget->hasSME() &&
12527-
!Subtarget->isStreaming())
12525+
!Subtarget->isSVEorStreamingSVEAvailable())
1252812526
return std::make_pair(TRI->getSubReg(P->first, AArch64::zsub),
1252912527
&AArch64::FPR128RegClass);
12530-
else
12531-
return *P;
12528+
return *P;
1253212529
}
1253312530
if (const auto PC = parsePredicateConstraint(Constraint))
1253412531
if (const auto *RegClass = getPredicateRegisterClass(*PC, VT))

0 commit comments

Comments
 (0)