Skip to content

Commit b263c01

Browse files
[EraVM] Add pre-commit test for Run MachineCopyPropagation Pass one more time
Signed-off-by: Vladimir Radosavljevic <[email protected]>
1 parent e9650ba commit b263c01

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

llvm/test/CodeGen/EraVM/machine-cp.ll

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2+
; RUN: llc -O3 < %s | FileCheck %s
3+
4+
target datalayout = "E-p:256:256-i256:256:256-S32-a:256:256"
5+
target triple = "eravm"
6+
7+
define i256 @test(i256 %dummy, ptr addrspace(3) %0) {
8+
; CHECK-LABEL: test:
9+
; CHECK: ; %bb.0:
10+
; CHECK-NEXT: add r2, r0, r1
11+
; CHECK-NEXT: and 255, r1, r1
12+
; CHECK-NEXT: ret
13+
%ptrtoint = ptrtoint ptr addrspace(3) %0 to i256
14+
%and = and i256 %ptrtoint, 255
15+
ret i256 %and
16+
}

0 commit comments

Comments
 (0)