-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AIEX] Register re-allocation for GPRs
- Loading branch information
Showing
2 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4 | ||
# NOTE: Example file for Write After Write Register Renaming in Loop test | ||
# | ||
# This file is licensed under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
# | ||
# (c) Copyright 2025 Advanced Micro Devices, Inc. or its affiliates | ||
|
||
# RUN: llc -mtriple=aie2 -verify-machineinstrs --start-before=greedy --stop-after=virtregrewriter \ | ||
# RUN: --aie-gpr-realloc %s -o - | FileCheck %s | ||
|
||
|
||
# Check general purpose registers can also be renamed. | ||
--- | ||
name: gpr_renaming | ||
alignment: 16 | ||
legalized: true | ||
tracksRegLiveness: true | ||
body: | | ||
; CHECK-LABEL: name: gpr_renaming | ||
; CHECK: bb.0.entry: | ||
; CHECK-NEXT: successors: %bb.1(0x80000000) | ||
; CHECK-NEXT: liveins: $r0, $r1, $r2, $r8 | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: LoopStart $r0, 0 | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: bb.1: | ||
; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000) | ||
; CHECK-NEXT: liveins: $r1, $r2, $r8 | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: renamable $r0 = AND $r1, $r2 | ||
; CHECK-NEXT: renamable $r3 = AND $r1, $r8 | ||
; CHECK-NEXT: renamable $r4 = AND killed renamable $r0, renamable $r3 | ||
; CHECK-NEXT: dead renamable $r5 = AND killed renamable $r3, killed renamable $r4 | ||
; CHECK-NEXT: PseudoLoopEnd <mcsymbol .L_1120>, %bb.1 | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: bb.2: | ||
; CHECK-NEXT: PseudoRET implicit $lr | ||
bb.0.entry: | ||
successors: %bb.1 | ||
liveins: $r0, $r1, $r2, $r8 | ||
LoopStart $r0, 0 | ||
bb.1: | ||
successors: %bb.1, %bb.2 | ||
liveins: $r1, $r2, $r8 | ||
%0:er = AND $r1, $r2 | ||
%1:er = AND $r1, $r8 | ||
%2:er = AND %0, %1 | ||
%3:er = AND %1, %2 | ||
PseudoLoopEnd <mcsymbol .L_1120>, %bb.1 | ||
bb.2: | ||
PseudoRET implicit $lr | ||
... | ||
|