-
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.
[AIE2p] Enable register re-allocation
- Loading branch information
Showing
6 changed files
with
89 additions
and
20 deletions.
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
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
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,56 @@ | ||
# 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 | ||
|
||
# Basic test for the WAW register renaming pass. Check AIE2 tests for more coverage. | ||
|
||
# RUN: llc -mtriple=aie2p -verify-machineinstrs --start-before=greedy --stop-after=virtregrewriter %s -o - | FileCheck %s | ||
|
||
# Make sure VLD and VMAX define different X registers. | ||
--- | ||
name: simple_waw_replacement | ||
alignment: 16 | ||
legalized: true | ||
tracksRegLiveness: true | ||
body: | | ||
; CHECK-LABEL: name: simple_waw_replacement | ||
; CHECK: bb.0.entry: | ||
; CHECK-NEXT: successors: %bb.1(0x80000000) | ||
; CHECK-NEXT: liveins: $p0, $p1, $r0, $x0 | ||
; 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: $d0, $d2, $p0, $p1, $p2, $x0, $d1_3d | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: renamable $x2, renamable $p0 = VLDA_dmx_lda_x_pstm_nrm_imm killed renamable $p0, 64 | ||
; CHECK-NEXT: renamable $x4, dead renamable $r16 = VMAX_LT_32_vaddSign1 killed renamable $x2, renamable $x0, implicit $vaddsign1 | ||
; CHECK-NEXT: renamable $p1 = VST_dmx_sts_x_pstm_nrm_imm killed renamable $x4, killed renamable $p1, 64 | ||
; 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, $p0, $p1, $x0 | ||
%0:ep = COPY $p0 | ||
%1:vec512 = COPY $x0 | ||
%2:ep = COPY $p1 | ||
LoopStart $r0, 0 | ||
bb.1: | ||
successors: %bb.1, %bb.2 | ||
liveins: $p0, $p1, $p2, $d0, $d1_3d, $d2 | ||
%10:vec512, %0:ep = VLDA_dmx_lda_x_pstm_nrm_imm %0, 64 | ||
%11:vec512, %12:mr16_vcompare = VMAX_LT_32_vaddSign1 %10, %1, implicit $vaddsign1 | ||
%2:ep = VST_dmx_sts_x_pstm_nrm_imm %11, %2, 64 | ||
PseudoLoopEnd <mcsymbol .L_1120>, %bb.1 | ||
bb.2: | ||
PseudoRET implicit $lr | ||
... |
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