Skip to content

Commit 34d0edc

Browse files
[fixup] Don't enable the transformation for SME and simplify some code and tests
1 parent 90ef28b commit 34d0edc

File tree

3 files changed

+19
-325
lines changed

3 files changed

+19
-325
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,8 +1834,8 @@ void AArch64TargetLowering::addTypeForNEON(MVT VT) {
18341834

18351835
bool AArch64TargetLowering::shouldExpandGetActiveLaneMask(EVT ResVT,
18361836
EVT OpVT) const {
1837-
// Only SVE/SME has a 1:1 mapping from intrinsic -> instruction (whilelo).
1838-
if (!Subtarget->hasSVEorSME())
1837+
// Only SVE has a 1:1 mapping from intrinsic -> instruction (whilelo).
1838+
if (!Subtarget->hasSVE())
18391839
return true;
18401840

18411841
// We can only support legal predicate result types. We can use the SVE
@@ -20541,7 +20541,7 @@ static SDValue tryCombineWhileLo(SDNode *N,
2054120541
if (DCI.isBeforeLegalize())
2054220542
return SDValue();
2054320543

20544-
if (!Subtarget->hasSVE2p1() && !Subtarget->hasSME2())
20544+
if (!Subtarget->hasSVE2p1())
2054520545
return SDValue();
2054620546

2054720547
if (!N->hasNUsesOfValue(2, 0))
@@ -20555,13 +20555,13 @@ static SDValue tryCombineWhileLo(SDNode *N,
2055520555
SDNode *Lo = *It++;
2055620556
SDNode *Hi = *It;
2055720557

20558-
uint64_t OffLo, OffHi;
2055920558
if (Lo->getOpcode() != ISD::EXTRACT_SUBVECTOR ||
20560-
!isIntImmediate(Lo->getOperand(1).getNode(), OffLo) ||
20561-
Hi->getOpcode() != ISD::EXTRACT_SUBVECTOR ||
20562-
!isIntImmediate(Hi->getOperand(1).getNode(), OffHi))
20559+
Hi->getOpcode() != ISD::EXTRACT_SUBVECTOR)
2056320560
return SDValue();
2056420561

20562+
uint64_t OffLo = Lo->getConstantOperandVal(1);
20563+
uint64_t OffHi = Hi->getConstantOperandVal(1);
20564+
2056520565
if (OffLo > OffHi) {
2056620566
std::swap(Lo, Hi);
2056720567
std::swap(OffLo, OffHi);

llvm/test/CodeGen/AArch64/active_lane_mask.ll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
22
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
3-
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme < %s | FileCheck %s
43

54
; == Scalable ==
65

0 commit comments

Comments
 (0)