2015-01-06 18:00:21 +00:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -strict-whitespace -check-prefix=SI %s
|
2014-08-03 05:27:14 +00:00
|
|
|
|
|
|
|
; Make sure there isn't an extra space between the instruction name and first operands.
|
|
|
|
|
2014-10-01 17:15:17 +00:00
|
|
|
; SI-LABEL: {{^}}add_f32:
|
2014-11-05 14:50:53 +00:00
|
|
|
; SI-DAG: s_load_dword [[SREGA:s[0-9]+]], s{{\[[0-9]+:[0-9]+\]}}, 0xb
|
|
|
|
; SI-DAG: s_load_dword [[SREGB:s[0-9]+]], s{{\[[0-9]+:[0-9]+\]}}, 0xc
|
|
|
|
; SI: v_mov_b32_e32 [[VREGB:v[0-9]+]], [[SREGB]]
|
|
|
|
; SI: v_add_f32_e32 [[RESULT:v[0-9]+]], [[SREGA]], [[VREGB]]
|
|
|
|
; SI: buffer_store_dword [[RESULT]],
|
2014-08-03 05:27:14 +00:00
|
|
|
define void @add_f32(float addrspace(1)* %out, float %a, float %b) {
|
|
|
|
%result = fadd float %a, %b
|
|
|
|
store float %result, float addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|