G_SHUFFLE_VECTOR is legal since it theoretically may help match op_sel
for VOP3P instructions. Expand it in some other way in case it doesn't
fold into the use instructions.
Details
Diff Detail
Event Timeline
LGTM but please consider the suggestions inline.
llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.cpp | ||
---|---|---|
53–54 | I realise it's a matter of taste but how about (Mask[0] & 2) == (Mask[1] & 2)? | |
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp | ||
2184 | Mask[0] == 1 might be clearer here, since we've already handled the all-undef case and we don't want to be handling it again here. | |
2194 | Mask[1] == 0 might be clearer. All other cases have been handled. Don't you also want to separate out the Mask[0] == -1 && Mask[1] == 0 case which can just be a left shift? | |
2212 | Mask[0] == 1 && Mask[1] == 1 might be clearer. All other case have been handled. | |
2230 | Mask[0] == 1 && Mask[1] == 0 might be clearer. All other cases have been handled. |
I realise it's a matter of taste but how about (Mask[0] & 2) == (Mask[1] & 2)?