1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/test/CodeGen/R600/llvm.trunc.ll
Tom Stellard b39ac07c09 R600: Allow ftrunc
v2: Add ftrunc->TRUNC pattern instead of replacing int_AMDGPU_trunc
v3: move ftrunc pattern next to TRUNC definition, it's available since R600

Patch By: Jan Vesely

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 197783
2013-12-20 05:11:55 +00:00

14 lines
309 B
LLVM

; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
; CHECK-LABEL: @trunc_f32
; CHECK: TRUNC
define void @trunc_f32(float addrspace(1)* %out, float %in) {
entry:
%0 = call float @llvm.trunc.f32(float %in)
store float %0, float addrspace(1)* %out
ret void
}
declare float @llvm.trunc.f32(float)