2013-05-14 17:53:30 +08:00
|
|
|
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=R600-CHECK %s
|
2013-10-11 01:11:46 +08:00
|
|
|
; RUN: llc < %s -march=r600 -mcpu=verde -verify-machineinstrs | FileCheck --check-prefix=SI-CHECK %s
|
2012-12-12 05:25:42 +08:00
|
|
|
|
2014-10-02 01:15:17 +08:00
|
|
|
; R600-CHECK: {{^}}amdgpu_trunc:
|
2013-09-05 03:53:46 +08:00
|
|
|
; R600-CHECK: TRUNC T{{[0-9]+\.[XYZW]}}, KC0[2].Z
|
2014-10-02 01:15:17 +08:00
|
|
|
; SI-CHECK: {{^}}amdgpu_trunc:
|
2014-11-05 22:50:53 +08:00
|
|
|
; SI-CHECK: v_trunc_f32
|
2012-12-12 05:25:42 +08:00
|
|
|
|
2013-05-14 17:53:30 +08: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-12 05:25:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
declare float @llvm.AMDGPU.trunc(float ) readnone
|