2015-02-04 05:53:27 +08:00
|
|
|
;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s --check-prefix=EG
|
|
|
|
;RUN: llc < %s -march=r600 -mcpu=cayman | FileCheck %s --check-prefix=CM
|
2014-06-21 01:06:05 +08:00
|
|
|
|
2015-02-04 05:53:27 +08:00
|
|
|
;EG-LABEL: {{^}}test:
|
|
|
|
;EG: EXP_IEEE *
|
|
|
|
;CM-LABEL: {{^}}test:
|
|
|
|
;CM: EXP_IEEE T{{[0-9]+}}.X, -|T{{[0-9]+}}.X|
|
|
|
|
;CM: EXP_IEEE T{{[0-9]+}}.Y (MASKED), -|T{{[0-9]+}}.X|
|
|
|
|
;CM: EXP_IEEE T{{[0-9]+}}.Z (MASKED), -|T{{[0-9]+}}.X|
|
|
|
|
;CM: EXP_IEEE * T{{[0-9]+}}.W (MASKED), -|T{{[0-9]+}}.X|
|
2014-06-21 01:06:05 +08:00
|
|
|
|
2016-04-07 03:40:20 +08:00
|
|
|
define amdgpu_ps void @test(<4 x float> inreg %reg0) {
|
2014-06-21 01:06:05 +08:00
|
|
|
%r0 = extractelement <4 x float> %reg0, i32 0
|
|
|
|
%r1 = call float @llvm.fabs.f32(float %r0)
|
|
|
|
%r2 = fsub float -0.000000e+00, %r1
|
|
|
|
%r3 = call float @llvm.exp2.f32(float %r2)
|
|
|
|
%vec = insertelement <4 x float> undef, float %r3, i32 0
|
2016-07-16 05:27:08 +08:00
|
|
|
call void @llvm.r600.store.swizzle(<4 x float> %vec, i32 0, i32 0)
|
2014-06-21 01:06:05 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare float @llvm.exp2.f32(float) readnone
|
|
|
|
declare float @llvm.fabs.f32(float) readnone
|
2016-07-16 05:27:08 +08:00
|
|
|
declare void @llvm.r600.store.swizzle(<4 x float>, i32, i32)
|