Skip to content

Commit 1317450

Browse files
arm64: Add bic(s) compact encoding
Change-Id: Ief95d09c2f7bec412b2509e615f7c09e4d228986
1 parent 1f93ea7 commit 1317450

File tree

5 files changed

+467
-1
lines changed

5 files changed

+467
-1
lines changed

src/coreclr/jit/codegenarm64.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,6 +2645,12 @@ void CodeGen::genCodeForBinary(GenTreeOp* tree)
26452645
break;
26462646
}
26472647

2648+
case GT_AND_NOT:
2649+
{
2650+
ins = INS_bics;
2651+
break;
2652+
}
2653+
26482654
default:
26492655
{
26502656
noway_assert(!"Unexpected BinaryOp with GTF_SET_FLAGS set");

src/coreclr/jit/gentree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19995,7 +19995,7 @@ bool GenTree::SupportsSettingZeroFlag()
1999519995
}
1999619996
#endif
1999719997
#elif defined(TARGET_ARM64)
19998-
if (OperIs(GT_AND))
19998+
if (OperIs(GT_AND, GT_AND_NOT))
1999919999
{
2000020000
return true;
2000120001
}

src/coreclr/jit/lowerarmarch.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,11 @@ bool Lowering::IsContainableUnaryOrBinaryOp(GenTree* parentNode, GenTree* childN
304304
}
305305
}
306306

307+
if (childNode->OperIs(GT_LSH, GT_RSH, GT_RSZ) && parentNode->OperIs(GT_AND_NOT))
308+
{
309+
return true;
310+
}
311+
307312
// TODO: Handle CMN, NEG/NEGS, BIC/BICS, EON, MVN, ORN, TST
308313
return false;
309314
}

0 commit comments

Comments
 (0)