Skip to content

Commit 2447ede

Browse files
[fixup] Don't enable the transformation for SME and simplify some code and tests
1 parent 1a75829 commit 2447ede

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

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

18371837
// We can only support legal predicate result types. We can use the SVE
@@ -20528,7 +20528,7 @@ static SDValue tryCombineWhileLo(SDNode *N,
2052820528
if (DCI.isBeforeLegalize())
2052920529
return SDValue();
2053020530

20531-
if (!Subtarget->hasSVE2p1() && !Subtarget->hasSME2())
20531+
if (!Subtarget->hasSVE2p1())
2053220532
return SDValue();
2053320533

2053420534
if (!N->hasNUsesOfValue(2, 0))
@@ -20542,13 +20542,13 @@ static SDValue tryCombineWhileLo(SDNode *N,
2054220542
SDNode *Lo = *It++;
2054320543
SDNode *Hi = *It;
2054420544

20545-
uint64_t OffLo, OffHi;
2054620545
if (Lo->getOpcode() != ISD::EXTRACT_SUBVECTOR ||
20547-
!isIntImmediate(Lo->getOperand(1).getNode(), OffLo) ||
20548-
Hi->getOpcode() != ISD::EXTRACT_SUBVECTOR ||
20549-
!isIntImmediate(Hi->getOperand(1).getNode(), OffHi))
20546+
Hi->getOpcode() != ISD::EXTRACT_SUBVECTOR)
2055020547
return SDValue();
2055120548

20549+
uint64_t OffLo = Lo->getConstantOperandVal(1);
20550+
uint64_t OffHi = Hi->getConstantOperandVal(1);
20551+
2055220552
if (OffLo > OffHi) {
2055320553
std::swap(Lo, Hi);
2055420554
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)