aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectCommands.cpp
diff options
context:
space:
mode:
authorRuiling Song <ruiling.song@amd.com>2021-09-16 23:04:39 +0800
committerRuiling Song <ruiling.song@amd.com>2021-09-30 10:15:01 +0800
commit52785989e95db15f5021f095198f821772d3d656 (patch)
tree8a56ec1fea366aa7168a8ca511e80e443fbbf921 /lldb/source/Commands/CommandObjectCommands.cpp
parent01641f665f5a3f94fc9e2bba598b5a65a6a7bd01 (diff)
downloadllvm-52785989e95db15f5021f095198f821772d3d656.zip
llvm-52785989e95db15f5021f095198f821772d3d656.tar.gz
llvm-52785989e95db15f5021f095198f821772d3d656.tar.bz2
AMDGPU: Broadcast scalar boolean to vector boolean explicitly
This is used to fix wrong code generation of s_add_co_select_user in test/CodeGen/AMDGPU/expand-scalar-carry-out-select-user.ll s_addc_u32 s4, s6, 0 s_cselect_b64 vcc, 1, 0 <-- vcc set as 0x1 if SCC==1 v_mov_b32_e32 v1, s4 s_cmp_gt_u32 s6, 31 v_cndmask_b32_e32 v1, 0, v1, vcc If the s_addc_u32 set SCC, then we will get value 0x1 in VCC. The v_cndmask will do per thread selection with VCC as condition register. As VCC only gets the first bit being set, only the first thread/lane in destination register can get correct result if the very first lane is active. In fact, we should broadcast the value to all active lanes of the final register. The idea here is doing this broadcast to vector boolean explicitly instead of lowering it into a COPY from SCC which would be interpreted as selecting between 0/1. This is used to replace D109754. Reviewed-by: foad, alex-t Differential Revision: https://reviews.llvm.org/D109889
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
0 files changed, 0 insertions, 0 deletions