We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8ce2df commit 5fe510eCopy full SHA for 5fe510e
llvm/lib/Target/AArch64/SMEPeepholeOpt.cpp
@@ -189,6 +189,12 @@ bool SMEPeepholeOpt::optimizeStartStopPairs(
189
case AArch64::CommitZASavePseudo:
190
case AArch64::SMEStateAllocPseudo:
191
case AArch64::RequiresZASavePseudo:
192
+ // These instructions only depend on the ZA state, not the streaming mode,
193
+ // so if the pair of smstart/stop is only changing the streaming mode, we
194
+ // can permit these instructions.
195
+ if (Prev->getOperand(0).getImm() != AArch64SVCR::SVCRSM)
196
+ Prev = nullptr;
197
+ break;
198
case AArch64::ADJCALLSTACKDOWN:
199
case AArch64::ADJCALLSTACKUP:
200
case AArch64::ANDXri:
0 commit comments