-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EraVM] Add pre-commit test for Optimize copies when src is used duri…
…ng backward propagation Signed-off-by: Vladimir Radosavljevic <[email protected]>
- Loading branch information
1 parent
4836425
commit 6da66c0
Showing
1 changed file
with
28 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2 | ||
# RUN: llc -x mir -run-pass machine-cp -verify-machineinstrs -compile-twice=false < %s | FileCheck %s | ||
|
||
--- | | ||
|
||
target datalayout = "E-p:256:256-i256:256:256-S32-a:256:256" | ||
target triple = "eravm" | ||
|
||
define void @test(i256 %a, i256 %b) { ret void } | ||
|
||
... | ||
--- | ||
name: test | ||
tracksRegLiveness: true | ||
body: | | ||
bb.0: | ||
liveins: $r1, $r2, $r4 | ||
; CHECK-LABEL: name: test | ||
; CHECK: liveins: $r1, $r2, $r4 | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: renamable $r3 = ADDirr_s i256 1, killed renamable $r1, i256 0 | ||
; CHECK-NEXT: dead $r0 = SUBrrr_v renamable $r3, renamable $r2, i256 0, implicit-def $flags | ||
; CHECK-NEXT: renamable $r1 = COPY killed renamable $r3 | ||
; CHECK-NEXT: RET 0, implicit $r1 | ||
renamable $r3 = ADDirr_s i256 1, killed renamable $r1, i256 0 | ||
dead $r0 = SUBrrr_v renamable $r3, renamable $r2, i256 0, implicit-def $flags | ||
renamable $r1 = COPY killed renamable $r3 | ||
RET 0, implicit $r1 |