mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-12-04 00:24:58 +00:00
R600/SI: Remove i1 pseudo VALU ops
Select i1 logical ops directly to 64-bit SALU instructions. Vector i1 values are always really in SGPRs, with each bit for each item in the wave. This saves about 4 instructions when and/or/xoring any condition, and also helps write conditions that need to be passed in vcc. This should work correctly now that the SGPR live range fixing pass works. More work is needed to eliminate the VReg_1 pseudo regclass and possibly the entire SILowerI1Copies pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223206 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -57,11 +57,11 @@ entry:
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}f64_one:
|
||||
; SI: v_cmp_o_f64
|
||||
; SI: v_cmp_neq_f64
|
||||
; SI: v_cndmask_b32_e64
|
||||
; SI: v_cndmask_b32_e64
|
||||
; SI: v_and_b32_e32
|
||||
; SI-DAG: v_cmp_o_f64_e32 vcc
|
||||
; SI-DAG: v_cmp_neq_f64_e64 [[CMP1:s\[[0-9]+:[0-9]+\]]]
|
||||
; SI: s_and_b64 [[AND:s\[[0-9]+:[0-9]+\]]], [[CMP1]], vcc
|
||||
; SI: v_cndmask_b32_e64 [[VRESULT:v[0-9]+]], 0, -1, [[AND]]
|
||||
; SI: buffer_store_dword [[VRESULT]]
|
||||
define void @f64_one(i32 addrspace(1)* %out, double %a, double %b) {
|
||||
entry:
|
||||
%0 = fcmp one double %a, %b
|
||||
@@ -83,9 +83,8 @@ entry:
|
||||
; FUNC-LABEL: {{^}}f64_ueq:
|
||||
; SI: v_cmp_u_f64
|
||||
; SI: v_cmp_eq_f64
|
||||
; SI: v_cndmask_b32_e64
|
||||
; SI: v_cndmask_b32_e64
|
||||
; SI: v_or_b32_e32
|
||||
; SI: s_or_b64
|
||||
; SI: v_cndmask_b32
|
||||
define void @f64_ueq(i32 addrspace(1)* %out, double %a, double %b) {
|
||||
entry:
|
||||
%0 = fcmp ueq double %a, %b
|
||||
@@ -97,9 +96,8 @@ entry:
|
||||
; FUNC-LABEL: {{^}}f64_ugt:
|
||||
; SI: v_cmp_u_f64
|
||||
; SI: v_cmp_gt_f64
|
||||
; SI: v_cndmask_b32_e64
|
||||
; SI: v_cndmask_b32_e64
|
||||
; SI: v_or_b32_e32
|
||||
; SI: s_or_b64
|
||||
; SI: v_cndmask_b32
|
||||
define void @f64_ugt(i32 addrspace(1)* %out, double %a, double %b) {
|
||||
entry:
|
||||
%0 = fcmp ugt double %a, %b
|
||||
@@ -111,9 +109,8 @@ entry:
|
||||
; FUNC-LABEL: {{^}}f64_uge:
|
||||
; SI: v_cmp_u_f64
|
||||
; SI: v_cmp_ge_f64
|
||||
; SI: v_cndmask_b32_e64
|
||||
; SI: v_cndmask_b32_e64
|
||||
; SI: v_or_b32_e32
|
||||
; SI: s_or_b64
|
||||
; SI: v_cndmask_b32
|
||||
define void @f64_uge(i32 addrspace(1)* %out, double %a, double %b) {
|
||||
entry:
|
||||
%0 = fcmp uge double %a, %b
|
||||
@@ -125,9 +122,8 @@ entry:
|
||||
; FUNC-LABEL: {{^}}f64_ult:
|
||||
; SI: v_cmp_u_f64
|
||||
; SI: v_cmp_lt_f64
|
||||
; SI: v_cndmask_b32_e64
|
||||
; SI: v_cndmask_b32_e64
|
||||
; SI: v_or_b32_e32
|
||||
; SI: s_or_b64
|
||||
; SI: v_cndmask_b32
|
||||
define void @f64_ult(i32 addrspace(1)* %out, double %a, double %b) {
|
||||
entry:
|
||||
%0 = fcmp ult double %a, %b
|
||||
@@ -139,9 +135,8 @@ entry:
|
||||
; FUNC-LABEL: {{^}}f64_ule:
|
||||
; SI: v_cmp_u_f64
|
||||
; SI: v_cmp_le_f64
|
||||
; SI: v_cndmask_b32_e64
|
||||
; SI: v_cndmask_b32_e64
|
||||
; SI: v_or_b32_e32
|
||||
; SI: s_or_b64
|
||||
; SI: v_cndmask_b32
|
||||
define void @f64_ule(i32 addrspace(1)* %out, double %a, double %b) {
|
||||
entry:
|
||||
%0 = fcmp ule double %a, %b
|
||||
|
||||
Reference in New Issue
Block a user