aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/MathExtrasTest.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2022-12-01 14:17:07 -0500
committerSanjay Patel <spatel@rotateright.com>2022-12-01 14:47:37 -0500
commitdd8d0d21ce6d0665ef5d426372096aaed85b479a (patch)
treedcf74d559e3496d5c498877b18d157fec0a30be5 /llvm/unittests/Support/MathExtrasTest.cpp
parentb7c7fe3d0779b6e332fe6db64e87561deba2e56a (diff)
downloadllvm-dd8d0d21ce6d0665ef5d426372096aaed85b479a.zip
llvm-dd8d0d21ce6d0665ef5d426372096aaed85b479a.tar.gz
llvm-dd8d0d21ce6d0665ef5d426372096aaed85b479a.tar.bz2
[InstCombine] canonicalize trunc + insert as bitcast + shuffle, part 2
This enhances the base fold from part 1 to allow mapping a right-shift to an insert index. Example of translating a middle chunk of the scalar to vector for either endian: https://alive2.llvm.org/ce/z/fRXCOZ This only allows creating an identity shuffle (with optional shortening/lengthening) because that is considered the safe baseline for any target (can be inverted if needed). If we tried this fold with target-specific costs/legality, then we could do the transform more generally. Differential Revision: https://reviews.llvm.org/D138873
Diffstat (limited to 'llvm/unittests/Support/MathExtrasTest.cpp')
0 files changed, 0 insertions, 0 deletions