[PATCH] D109889: AMDGPU: Broadcast scalar boolean to vector boolean explicitly
Alexander via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 28 09:25:36 PDT 2021
alex-t added a comment.
> Overall I think we should not have contexts where copy from SCC is being used as a broadcast to a vector boolean. I think these only arise as a side effect of the hacky way SIFixSGPRCopies rewrites the function instruction at a time
In the case given as an example - yes. As soon as I finish divergence-driven isel for the ISD::SELECT, this will turn to the following:
s_addc_u32 s4, s6, 0
s_cselect_b32 s4, s4, 0
But we still have other cases that are going to persist irrelative to the SIFixSGPRCopies hackery presence.
Ruiling gave me a good example in our last discussion on this topic:
What is about using the floating-point compare result in the bitwise operation?
s_cmp_ge_u32 s0, s1
s_cselect_b64 s[0:1], -1, 0
v_cmp_nlt_f32_e32 vcc, v1, v2
s_and_b64 vcc, vcc, s[0:1]
v_cndmask_b32_e32 v1, v2, v1, vcc
Both comparisons are uniform but we still have to broadcast SCC.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109889/new/
https://reviews.llvm.org/D109889
More information about the llvm-commits
mailing list