blob: fdd531d79134c5cd0e4da36c26bb2990a8d64dd1 [file] [log] [blame]
Michel Danzer12903692013-05-14 09:53:30 +00001; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=R600-CHECK %s
Tom Stellard70f13db2013-10-10 17:11:46 +00002; RUN: llc < %s -march=r600 -mcpu=verde -verify-machineinstrs | FileCheck --check-prefix=SI-CHECK %s
Tom Stellard75aadc22012-12-11 21:25:42 +00003
Tom Stellard79243d92014-10-01 17:15:17 +00004; R600-CHECK: {{^}}amdgpu_trunc:
Vincent Lejeune7e2c8322013-09-04 19:53:46 +00005; R600-CHECK: TRUNC T{{[0-9]+\.[XYZW]}}, KC0[2].Z
Tom Stellard79243d92014-10-01 17:15:17 +00006; SI-CHECK: {{^}}amdgpu_trunc:
Tom Stellard326d6ec2014-11-05 14:50:53 +00007; SI-CHECK: v_trunc_f32
Tom Stellard75aadc22012-12-11 21:25:42 +00008
Michel Danzer12903692013-05-14 09:53:30 +00009define void @amdgpu_trunc(float addrspace(1)* %out, float %x) {
10entry:
11 %0 = call float @llvm.AMDGPU.trunc(float %x)
12 store float %0, float addrspace(1)* %out
13 ret void
Tom Stellard75aadc22012-12-11 21:25:42 +000014}
15
Tom Stellard75aadc22012-12-11 21:25:42 +000016declare float @llvm.AMDGPU.trunc(float ) readnone