aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2024-12-11 16:40:56 +0000
committerGitHub <noreply@github.com>2024-12-11 16:40:56 +0000
commit08f904011f4b17e46b7616737a5dec01e3563c80 (patch)
treed8ab1cb14b2526b724a809e9d16d62fe0b95073e /llvm/lib/CodeGen/MachineInstr.cpp
parent8b63bfbf6dd2ad0efd221407755300942a7ca35f (diff)
downloadllvm-08f904011f4b17e46b7616737a5dec01e3563c80.zip
llvm-08f904011f4b17e46b7616737a5dec01e3563c80.tar.gz
llvm-08f904011f4b17e46b7616737a5dec01e3563c80.tar.bz2
[VectorCombine] Fold "(or (zext (bitcast X)), (shl (zext (bitcast Y)), C))" -> "(bitcast (concat X, Y))" MOVMSK bool mask style patterns (#119559)
Mask/Bool vectors are often bitcast to/from scalar integers, in particular when concatenating mask results, often this is due to the difficulties of working with vector of bools on C/C++. On x86 this typically involves the MOVMSK/KMOV instructions. To concatenate bool masks, these are typically cast to scalars, which are then zero-extended, shifted and OR'd together. This patch attempts to match these scalar concatenation patterns and convert them to vector shuffles instead. This in turn often assists with further vector combines, depending on the cost model. Fixes #111431
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions