aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-02-22 01:49:50 +0000
committerCraig Topper <craig.topper@intel.com>2019-02-22 01:49:50 +0000
commitbe22f329a957f507c6a695b0413e275506f5e122 (patch)
tree22d7f286293fab4128f060e189523dd6e346f04c /llvm/lib/Transforms/Utils/Local.cpp
parent4a7db8cb903696b83f6fd6c756c65946f6b5644b (diff)
downloadllvm-be22f329a957f507c6a695b0413e275506f5e122.zip
llvm-be22f329a957f507c6a695b0413e275506f5e122.tar.gz
llvm-be22f329a957f507c6a695b0413e275506f5e122.tar.bz2
[LegalizeTypes] When promoting the result of EXTRACT_SUBVECTOR, also check if the input needs to be promoted. Use that to determine the element type to extract.
Otherwise we end up creating extract_vector_elts that then each need to have their input promoted. This can lead to truncates needing to be emitted for each of those. But we already emitted any_extends when we legalized the extract_subvector. So now we have pairs of any_extend+trunc that partially cancel. But depending on how DAGCombiner visits them we can get weird results. By promoting the input at the same time we can create only a single any_extend or truncate. There's one regression in the vector-narrow-binop.ll case, but that looks easy to fix with a follow up patch. llvm-svn: 354647
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions