Skip to content

Commit e910ffb

Browse files
committed
[AArch64][GlobalISel] Mark G_BR as always legal. NFC
As far as I understand this will not affect anything, just lower the exposure to the legacy legalizer rules.
1 parent bbcac02 commit e910ffb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,7 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
965965
{s128, s64}});
966966

967967
// Control-flow
968+
getActionDefinitionsBuilder(G_BR).alwaysLegal();
968969
getActionDefinitionsBuilder(G_BRCOND)
969970
.legalFor({s32})
970971
.clampScalar(0, s32, s32);

llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,8 @@
672672
# DEBUG-NEXT: .. the first uncovered type index: 2, OK
673673
# DEBUG-NEXT: .. the first uncovered imm index: 0, OK
674674
# DEBUG-NEXT: G_BR (opcode {{[0-9]+}}): 0 type indices, 0 imm indices
675-
# DEBUG-NEXT: .. type index coverage check SKIPPED: no rules defined
676-
# DEBUG-NEXT: .. imm index coverage check SKIPPED: no rules defined
675+
# DEBUG-NEXT: .. type index coverage check SKIPPED: user-defined predicate detected
676+
# DEBUG-NEXT: .. imm index coverage check SKIPPED: user-defined predicate detected
677677
# DEBUG-NEXT: G_BRJT (opcode {{[0-9]+}}): 2 type indices
678678
# DEBUG-NEXT: .. the first uncovered type index: 2, OK
679679
# DEBUG-NEXT: .. the first uncovered imm index: 0, OK

0 commit comments

Comments
 (0)