blob: 67e86c41fdcfe441754177625639838a2ef1081e [file] [log] [blame]
Tom Stellard75aadc22012-12-11 21:25:42 +00001;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
2
Vincent Lejeune4b5b8492013-06-05 20:27:35 +00003;CHECK: FLOOR * T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}}
Tom Stellard75aadc22012-12-11 21:25:42 +00004
Vincent Lejeunef143af32013-11-11 22:10:24 +00005define void @test(<4 x float> inreg %reg0) #0 {
6 %r0 = extractelement <4 x float> %reg0, i32 0
Tom Stellard75aadc22012-12-11 21:25:42 +00007 %r1 = call float @floor(float %r0)
Vincent Lejeunef143af32013-11-11 22:10:24 +00008 %vec = insertelement <4 x float> undef, float %r1, i32 0
9 call void @llvm.R600.store.swizzle(<4 x float> %vec, i32 0, i32 0)
Tom Stellard75aadc22012-12-11 21:25:42 +000010 ret void
11}
12
Tom Stellard75aadc22012-12-11 21:25:42 +000013declare float @floor(float) readonly
Vincent Lejeunef143af32013-11-11 22:10:24 +000014declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32)
15
16attributes #0 = { "ShaderType"="0" }