2015-10-29 23:29:09 +08:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
|
|
|
|
; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
|
|
|
|
|
|
|
|
; GCN-LABEL: {{^}}main:
|
|
|
|
; GCN: v_cvt_pkrtz_f16_f32
|
|
|
|
; GCN: v_cvt_pkrtz_f16_f32
|
|
|
|
; GCN-NOT: v_cvt_pkrtz_f16_f32
|
|
|
|
|
2016-04-07 03:40:20 +08:00
|
|
|
define amdgpu_ps void @main(float %src) {
|
2015-10-29 23:29:09 +08:00
|
|
|
main_body:
|
|
|
|
%p1 = call i32 @llvm.SI.packf16(float undef, float %src)
|
|
|
|
%p2 = call i32 @llvm.SI.packf16(float %src, float undef)
|
|
|
|
%p3 = call i32 @llvm.SI.packf16(float undef, float undef)
|
|
|
|
%f1 = bitcast i32 %p1 to float
|
|
|
|
%f2 = bitcast i32 %p2 to float
|
|
|
|
%f3 = bitcast i32 %p3 to float
|
|
|
|
call void @llvm.SI.export(i32 15, i32 1, i32 0, i32 0, i32 1, float undef, float %f1, float undef, float %f1)
|
|
|
|
call void @llvm.SI.export(i32 15, i32 1, i32 0, i32 0, i32 1, float undef, float %f2, float undef, float %f2)
|
|
|
|
call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float undef, float %f3, float undef, float %f2)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; Function Attrs: nounwind readnone
|
2016-04-07 03:40:20 +08:00
|
|
|
declare i32 @llvm.SI.packf16(float, float) #0
|
2015-10-29 23:29:09 +08:00
|
|
|
|
|
|
|
declare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float)
|
|
|
|
|
2016-04-07 03:40:20 +08:00
|
|
|
attributes #0 = { nounwind readnone }
|