[SROA] Avoid splitting loads/stores with irregular type
authorLemonBoy <thatlemon@gmail.com>
Wed, 9 Jun 2021 14:35:18 +0000 (16:35 +0200)
committerLemonBoy <thatlemon@gmail.com>
Wed, 9 Jun 2021 14:36:58 +0000 (16:36 +0200)
commitd3faef6eefe51a8f231898a4eda9130c8ba01bb5
tree298398e57d46471f40fc93f3fa9ee3908dfc7570
parentcf8467057947e019f7fe45d00836dfb629715064
[SROA] Avoid splitting loads/stores with irregular type

Upon encountering loads/stores on types whose size is not a multiple of 8 bits the SROA pass would either trip an assertion or use logic that was not meant to work with such irregularly-sized types.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D99435
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/Transforms/SROA/irregular-type.ll [new file with mode: 0644]
llvm/test/Transforms/SROA/slice-width.ll