Home | History | Annotate | Download | only in R600
      1 ; RUN: llc < %s -march=r600 -mcpu=verde -verify-machineinstrs | FileCheck -check-prefix=SI %s
      2 
      3 ; SI-LABEL: @vector_imax
      4 ; SI: V_MAX_I32_e32
      5 define void @vector_imax(i32 %p0, i32 %p1, i32 addrspace(1)* %in) #0 {
      6 main_body:
      7   %load = load i32 addrspace(1)* %in, align 4
      8   %max = call i32 @llvm.AMDGPU.imax(i32 %p0, i32 %load)
      9   %bc = bitcast i32 %max to float
     10   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 0, float %bc, float %bc, float %bc, float %bc)
     11   ret void
     12 }
     13 
     14 ; SI-LABEL: @scalar_imax
     15 ; SI: S_MAX_I32
     16 define void @scalar_imax(i32 %p0, i32 %p1) #0 {
     17 entry:
     18   %max = call i32 @llvm.AMDGPU.imax(i32 %p0, i32 %p1)
     19   %bc = bitcast i32 %max to float
     20   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 0, float %bc, float %bc, float %bc, float %bc)
     21   ret void
     22 }
     23 
     24 ; Function Attrs: readnone
     25 declare i32 @llvm.AMDGPU.imax(i32, i32) #1
     26 
     27 declare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float)
     28 
     29 attributes #0 = { nounwind }
     30 attributes #1 = { nounwind readnone }
     31 
     32 !0 = metadata !{metadata !"const", null, i32 1}
     33