blob: 43e58b942220294fb70f75360ab777d589d027c1 [file] [log] [blame]
Matt Arsenault76723d72015-01-16 22:11:00 +00001; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck %s
Tom Stellard75aadc22012-12-11 21:25:42 +00002
Matt Arsenault76723d72015-01-16 22:11:00 +00003; CHECK: FLOOR * T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}}
Nicolai Haehnledf3a20c2016-04-06 19:40:20 +00004define amdgpu_ps void @test(<4 x float> inreg %reg0) {
Vincent Lejeunef143af32013-11-11 22:10:24 +00005 %r0 = extractelement <4 x float> %reg0, i32 0
Tom Stellard75aadc22012-12-11 21:25:42 +00006 %r1 = call float @floor(float %r0)
Vincent Lejeunef143af32013-11-11 22:10:24 +00007 %vec = insertelement <4 x float> undef, float %r1, i32 0
Matt Arsenault82e5e1e2016-07-15 21:27:08 +00008 call void @llvm.r600.store.swizzle(<4 x float> %vec, i32 0, i32 0)
Tom Stellard75aadc22012-12-11 21:25:42 +00009 ret void
10}
11
Tom Stellard75aadc22012-12-11 21:25:42 +000012declare float @floor(float) readonly
Matt Arsenault82e5e1e2016-07-15 21:27:08 +000013declare void @llvm.r600.store.swizzle(<4 x float>, i32, i32)
Vincent Lejeunef143af32013-11-11 22:10:24 +000014