2 ; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
4 declare float @llvm.AMDGPU.div.scale.f32(float, float) nounwind readnone
5 declare double @llvm.AMDGPU.div.scale.f64(double, double) nounwind readnone
7 ; SI-LABEL @test_div_scale_f32:
8 define void @test_div_scale_f32(float addrspace(1)* %out, float addrspace(1)* %aptr, float addrspace(1)* %bptr) nounwind {
9 %a = load float addrspace(1)* %aptr, align 4
10 %b = load float addrspace(1)* %bptr, align 4
11 %result = call float @llvm.AMDGPU.div.scale.f32(float %a, float %b) nounwind readnone
12 store float %result, float addrspace(1)* %out, align 4
16 ; SI-LABEL @test_div_scale_f64:
17 define void @test_div_scale_f64(double addrspace(1)* %out, double addrspace(1)* %aptr, double addrspace(1)* %bptr) nounwind {
18 %a = load double addrspace(1)* %aptr, align 8
19 %b = load double addrspace(1)* %bptr, align 8
20 %result = call double @llvm.AMDGPU.div.scale.f64(double %a, double %b) nounwind readnone
21 store double %result, double addrspace(1)* %out, align 8