Skip to content

Commit c4dbea5

Browse files
[fixup] Don't enable the transformation for SME and simplify some code and tests
1 parent 0f9031c commit c4dbea5

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
@@ -1847,8 +1847,8 @@ void AArch64TargetLowering::addTypeForNEON(MVT VT) {
18471847

18481848
bool AArch64TargetLowering::shouldExpandGetActiveLaneMask(EVT ResVT,
18491849
EVT OpVT) const {
1850-
// Only SVE/SME has a 1:1 mapping from intrinsic -> instruction (whilelo).
1851-
if (!Subtarget->hasSVEorSME())
1850+
// Only SVE has a 1:1 mapping from intrinsic -> instruction (whilelo).
1851+
if (!Subtarget->hasSVE())
18521852
return true;
18531853

18541854
// We can only support legal predicate result types. We can use the SVE
@@ -20487,7 +20487,7 @@ static SDValue tryCombineWhileLo(SDNode *N,
2048720487
if (DCI.isBeforeLegalize())
2048820488
return SDValue();
2048920489

20490-
if (!Subtarget->hasSVE2p1() && !Subtarget->hasSME2())
20490+
if (!Subtarget->hasSVE2p1())
2049120491
return SDValue();
2049220492

2049320493
if (!N->hasNUsesOfValue(2, 0))
@@ -20501,13 +20501,13 @@ static SDValue tryCombineWhileLo(SDNode *N,
2050120501
SDNode *Lo = *It++;
2050220502
SDNode *Hi = *It;
2050320503

20504-
uint64_t OffLo, OffHi;
2050520504
if (Lo->getOpcode() != ISD::EXTRACT_SUBVECTOR ||
20506-
!isIntImmediate(Lo->getOperand(1).getNode(), OffLo) ||
20507-
Hi->getOpcode() != ISD::EXTRACT_SUBVECTOR ||
20508-
!isIntImmediate(Hi->getOperand(1).getNode(), OffHi))
20505+
Hi->getOpcode() != ISD::EXTRACT_SUBVECTOR)
2050920506
return SDValue();
2051020507

20508+
uint64_t OffLo = Lo->getConstantOperandVal(1);
20509+
uint64_t OffHi = Hi->getConstantOperandVal(1);
20510+
2051120511
if (OffLo > OffHi) {
2051220512
std::swap(Lo, Hi);
2051320513
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)