aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/tutorial
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2024-12-12 13:45:10 +0000
committerGitHub <noreply@github.com>2024-12-12 13:45:10 +0000
commit86779da52be6c6900a57fbba243f6894b19bb9b1 (patch)
tree03a661018b40d9d9aebc7ab787a320f420ad46db /llvm/docs/tutorial
parentf9734b9df15bc1eea84ef00973c2e5560e70c27d (diff)
downloadllvm-86779da52be6c6900a57fbba243f6894b19bb9b1.zip
llvm-86779da52be6c6900a57fbba243f6894b19bb9b1.tar.gz
llvm-86779da52be6c6900a57fbba243f6894b19bb9b1.tar.bz2
[VectorCombine] Fold "(or (zext (bitcast X)), (shl (zext (bitcast Y)), C))" -> "(bitcast (concat X, Y))" MOVMSK bool mask style patterns (#119695)
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. Reapplied patch from #119559 - fixed use after free issue. Fixes #111431
Diffstat (limited to 'llvm/docs/tutorial')
0 files changed, 0 insertions, 0 deletions