2015-02-03 21:53:27 +00:00
|
|
|
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=R600 %s
|
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=verde -verify-machineinstrs | FileCheck --check-prefix=SI %s
|
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs | FileCheck --check-prefix=SI %s
|
2012-12-11 21:25:42 +00:00
|
|
|
|
2015-02-03 21:53:27 +00:00
|
|
|
; R600: {{^}}amdgpu_trunc:
|
|
|
|
; R600: TRUNC T{{[0-9]+\.[XYZW]}}, KC0[2].Z
|
|
|
|
; SI: {{^}}amdgpu_trunc:
|
|
|
|
; SI: 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
|