2014-04-29 23:12:53 +00:00
|
|
|
;XUN: llc < %s -march=r600 -mcpu=SI -verify-machineinstrs| FileCheck --check-prefix=SI --check-prefix=FUNC %s
|
2014-04-29 23:12:46 +00:00
|
|
|
;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=EG --check-prefix=FUNC %s
|
|
|
|
|
|
|
|
;FUNC-LABEL: @test_udiv
|
|
|
|
;EG: RECIP_UINT
|
2014-05-22 18:09:12 +00:00
|
|
|
;EG: LSHL {{.*}}, 1,
|
2014-04-29 23:12:46 +00:00
|
|
|
;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
|
2014-05-22 18:09:12 +00:00
|
|
|
;EG: AND_INT {{.*}}, 1,
|
2014-04-29 23:12:46 +00:00
|
|
|
;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
|
|
|
|
}
|