Skip to content

Commit 5a3b71a

Browse files
committed
Misc trivial fixes for getAuthCheckedReg
1 parent 81f801e commit 5a3b71a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
395395
auto StepBack = [&]() {
396396
while (It != BB.begin()) {
397397
--It;
398+
// Skip any CFI instructions, but no other pseudos are expected here.
398399
if (!isCFI(*It))
399400
return true;
400401
}
@@ -434,8 +435,8 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
434435
}
435436

436437
if (matchInst(*It, AArch64::TBZX, ScratchReg, Imm(62) /*, .Lon_success*/)) {
437-
if (!StepBack() || !matchInst(*It, AArch64::EORXrs, Reg(ScratchReg),
438-
TestedReg, TestedReg, Imm(1)))
438+
if (!StepBack() || !matchInst(*It, AArch64::EORXrs, ScratchReg, TestedReg,
439+
TestedReg, Imm(1)))
439440
return std::nullopt;
440441

441442
return std::make_pair(TestedReg.get(), &*It);

0 commit comments

Comments
 (0)