Skip to content

Commit 11994e8

Browse files
authored
[AArch64][GlobalISel] Mark G_BR as always legal. NFC (#153545)
As far as I understand this will not affect anything, just lower the exposure to the legacy legalizer rules.
1 parent c91f7dc commit 11994e8

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
@@ -968,6 +968,7 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
968968
{s128, s64}});
969969

970970
// Control-flow
971+
getActionDefinitionsBuilder(G_BR).alwaysLegal();
971972
getActionDefinitionsBuilder(G_BRCOND)
972973
.legalFor({s32})
973974
.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
@@ -674,8 +674,8 @@
674674
# DEBUG-NEXT: .. the first uncovered type index: 2, OK
675675
# DEBUG-NEXT: .. the first uncovered imm index: 0, OK
676676
# DEBUG-NEXT: G_BR (opcode {{[0-9]+}}): 0 type indices, 0 imm indices
677-
# DEBUG-NEXT: .. type index coverage check SKIPPED: no rules defined
678-
# DEBUG-NEXT: .. imm index coverage check SKIPPED: no rules defined
677+
# DEBUG-NEXT: .. type index coverage check SKIPPED: user-defined predicate detected
678+
# DEBUG-NEXT: .. imm index coverage check SKIPPED: user-defined predicate detected
679679
# DEBUG-NEXT: G_BRJT (opcode {{[0-9]+}}): 2 type indices
680680
# DEBUG-NEXT: .. the first uncovered type index: 2, OK
681681
# DEBUG-NEXT: .. the first uncovered imm index: 0, OK

0 commit comments

Comments
 (0)