aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WasmObjectFile.cpp
diff options
context:
space:
mode:
authorSanne Wouda <Sanne.Wouda@arm.com>2021-02-24 13:05:11 +0000
committerSanne Wouda <Sanne.Wouda@arm.com>2021-03-08 16:32:30 +0000
commit05a6e2eb9a412db22309031d2326bf6a3aa0c90c (patch)
tree8762da0bd7a3d8fe5fe6278d934c3f7fdfdb7c70 /llvm/lib/Object/WasmObjectFile.cpp
parent5e963a24415eb88d512eb74c8addf87051f7969a (diff)
downloadllvm-05a6e2eb9a412db22309031d2326bf6a3aa0c90c.zip
llvm-05a6e2eb9a412db22309031d2326bf6a3aa0c90c.tar.gz
llvm-05a6e2eb9a412db22309031d2326bf6a3aa0c90c.tar.bz2
[InstCombine] Add a combine for a shuffle of similar bitcasts
Some intrinsics wrapper code has the habit of ignoring the type of the elements in vectors, thinking of vector registers as a "bag of bits". As a consequence, some operations are shared between vectors of different types are shared. For example, functions that rearrange elements in a vector can be shared between vectors of int32 and float. This can result in bitcasts in awkward places that prevent the backend from recognizing some instructions. For AArch64 in particular, it inhibits the selection of dup from a general purpose register (GPR), and mov from GPR to a vector lane. This patch adds a pattern in InstCombine to move the bitcasts past the shufflevector if this is possible. Sometimes this even allows InstCombine to remove the bitcast entirely, as in the included tests. Alternatively this could be done with a few extra patterns in the AArch64 backend, but InstCombine seems like a better place for this. Differential Revision: https://reviews.llvm.org/D97397
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions