mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
3c698f35e0
This allows existing DAG combines to work on them, and then we can re-match to BFE if necessary during instruction selection. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209462 91177308-0d34-0410-b5e6-96231b3b80d8
83 lines
1.5 KiB
LLVM
83 lines
1.5 KiB
LLVM
;XUN: llc < %s -march=r600 -mcpu=SI -verify-machineinstrs| FileCheck --check-prefix=SI --check-prefix=FUNC %s
|
|
;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=EG --check-prefix=FUNC %s
|
|
|
|
;FUNC-LABEL: @test_udiv
|
|
;EG: RECIP_UINT
|
|
;EG: LSHL {{.*}}, 1,
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;SI: S_ENDPGM
|
|
define void @test_udiv(i64 addrspace(1)* %out, i64 %x, i64 %y) {
|
|
%result = udiv i64 %x, %y
|
|
store i64 %result, i64 addrspace(1)* %out
|
|
ret void
|
|
}
|
|
|
|
;FUNC-LABEL: @test_urem
|
|
;EG: RECIP_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: BFE_UINT
|
|
;EG: AND_INT {{.*}}, 1,
|
|
;SI: S_ENDPGM
|
|
define void @test_urem(i64 addrspace(1)* %out, i64 %x, i64 %y) {
|
|
%result = urem i64 %x, %y
|
|
store i64 %result, i64 addrspace(1)* %out
|
|
ret void
|
|
}
|