2013-05-14 09:53:30 +00:00
|
|
|
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=R600-CHECK %s
|
2013-10-10 17:11:46 +00:00
|
|
|
; RUN: llc < %s -march=r600 -mcpu=verde -verify-machineinstrs | FileCheck --check-prefix=SI-CHECK %s
|
2012-12-11 21:25:42 +00:00
|
|
|
|
2014-10-01 17:15:17 +00:00
|
|
|
; R600-CHECK: {{^}}amdgpu_trunc:
|
2013-09-04 19:53:46 +00:00
|
|
|
; R600-CHECK: TRUNC T{{[0-9]+\.[XYZW]}}, KC0[2].Z
|
2014-10-01 17:15:17 +00:00
|
|
|
; SI-CHECK: {{^}}amdgpu_trunc:
|
2014-11-05 14:50:53 +00:00
|
|
|
; SI-CHECK: v_trunc_f32
|
2012-12-11 21:25:42 +00:00
|
|
|
|
2013-05-14 09:53:30 +00:00
|
|
|
define void @amdgpu_trunc(float addrspace(1)* %out, float %x) {
|
|
|
|
entry:
|
|
|
|
%0 = call float @llvm.AMDGPU.trunc(float %x)
|
|
|
|
store float %0, float addrspace(1)* %out
|
|
|
|
ret void
|
2012-12-11 21:25:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
declare float @llvm.AMDGPU.trunc(float ) readnone
|