blob: c6bfb8567a0f0740264dd060b41207c3192822c9 [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]}}
Vincent Lejeunef143af32013-11-11 22:10:24 +00004define void @test(<4 x float> inreg %reg0) #0 {
5 %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
8 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
Vincent Lejeunef143af32013-11-11 22:10:24 +000013declare void @llvm.R600.store.swizzle(<4 x float>, i32, i32)
14
Matt Arsenault76723d72015-01-16 22:11:00 +000015attributes #0 = { "ShaderType"="0" }