2013-05-14 11:53:30 +02:00
|
|
|
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=R600-CHECK %s
|
|
|
|
; RUN: llc < %s -march=r600 -mcpu=verde | FileCheck --check-prefix=SI-CHECK %s
|
2012-12-11 22:25:42 +01:00
|
|
|
|
2013-05-14 11:53:30 +02:00
|
|
|
; R600-CHECK: @amdgpu_trunc
|
2013-07-31 22:43:27 +02:00
|
|
|
; R600-CHECK: TRUNC * T{{[0-9]+\.[XYZW]}}, KC0[2].Z
|
2013-05-14 11:53:30 +02:00
|
|
|
; SI-CHECK: @amdgpu_trunc
|
|
|
|
; SI-CHECK: V_TRUNC_F32
|
2012-12-11 22:25:42 +01:00
|
|
|
|
2013-05-14 11:53:30 +02: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 22:25:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare float @llvm.AMDGPU.trunc(float ) readnone
|