diff options
author | Alexey Karyakin <akaryaki@quicinc.com> | 2025-09-23 10:46:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-23 10:46:57 -0500 |
commit | 0161143836bdb8f42a9ba44e2e0de7842e4e68eb (patch) | |
tree | bf649362765670818c75cfd3951fd0261e1dbb99 /llvm/lib/Transforms/Utils/ControlFlowUtils.cpp | |
parent | be7444becf6ce74ccf5b6743dd6ec0c9633bfdd8 (diff) | |
download | llvm-0161143836bdb8f42a9ba44e2e0de7842e4e68eb.zip llvm-0161143836bdb8f42a9ba44e2e0de7842e4e68eb.tar.gz llvm-0161143836bdb8f42a9ba44e2e0de7842e4e68eb.tar.bz2 |
[Hexagon] Generate signed mask for vshuff/vdeal (#159800)
vhsuff/vdeal takes a mask parameter which is interpreted as modulo
vector size in bytes so the values -2 and 126 have the same effect,
although the code is different. Positive values often come from the code
that uses getVectorShuffle() and does look past the vector size so the
upper bits are left as zeroes. Manually written code often picks
negative values because they are often small and easy to think about in
important cases like adjusting the result after a double-vector
arithmetic.
For consistency, switch to normalizing the mask parameters to a signed
value. Signed values were chosen over unsigned because they are not
sensitive to the vector length and A2_trfsi argument, which is used to
create a value, is also signed.
Diffstat (limited to 'llvm/lib/Transforms/Utils/ControlFlowUtils.cpp')
0 files changed, 0 insertions, 0 deletions