aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2022-06-25 11:11:58 -0700
committerPhilip Reames <listmail@philipreames.com>2022-06-25 11:11:58 -0700
commitab736a2750a99b303f8d6a216f754fb3577abb88 (patch)
tree9f88eb66d9dc750bb3c88c65caffa51d4509f789 /clang/lib/Lex/ModuleMap.cpp
parent767ba58f808de8099294bb95929bd8ee55b49da4 (diff)
downloadllvm-ab736a2750a99b303f8d6a216f754fb3577abb88.zip
llvm-ab736a2750a99b303f8d6a216f754fb3577abb88.tar.gz
llvm-ab736a2750a99b303f8d6a216f754fb3577abb88.tar.bz2
[BasicTTI] Account for vector of pointers in getMemoryOpCost
By using getPrimitiveSizeInBits, we were getting 0 for every pointer type. This code is trying to account for the cost of truncating a store or extending a load to convert from the source vector element type to the legal vector element type. I'd originally seen this as a crash when trying to scalarize a <vscale x 1 x ptr> type coming from the vectorizer. Here's a minimum reproducer to exercise the code in question. void e(int *argv[], int *p) { for (int i = 0; i < 1024; i++) argv[i] = p; } This was checked in as the splat_ptr test in 2cf320d. After bbf3fd, this no longer crashes since we correctly return invalid if the extending load/truncating store isn't legal. Differential Revision: https://reviews.llvm.org/D128228
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions