This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Allow a SGPR for the conditional KILL operand.
ClosedPublic

Authored by bnieuwenhuizen on Jan 19 2018, 8:24 AM.

Details

Summary

Just use the _e64 variant if needed. This should be possible as per

def : Pat <

(int_amdgcn_kill (i1 (setcc f32:$src, InlineFPImm<f32>:$imm, cond:$cond))),
(SI_KILL_F32_COND_IMM_PSEUDO $src, (bitcast_fpimm_to_i32 $imm), (cond_as_i32imm $cond))

;

I don't think we can get an immediate for the other operand for which we
need the second 32-bit word.

Diff Detail

Event Timeline

bnieuwenhuizen created this revision.Jan 19 2018, 8:24 AM
nhaehnle accepted this revision.Jan 24 2018, 9:25 AM

One minor nitpack, apart from that LGTM.

lib/Target/AMDGPU/SIInsertSkips.cpp
262–263

This could just be an assert. I'm also not entirely convinced that it's required. src0 is a VSrc_b32, same as for V_CMPX_, but I suppose it doesn't hurt.

This revision is now accepted and ready to land.Jan 24 2018, 9:25 AM

Move it to an assert, and removed the redundant check for the same condition
in the following if.

Could you commit this for me? I don't have commit access yet.

mareko closed this revision.Jan 29 2018, 4:14 PM

Pushed.