[SROA] Avoid splitting loads/stores with irregular type
authorLemonBoy <thatlemon@gmail.com>
Wed, 9 Jun 2021 09:47:17 +0000 (11:47 +0200)
committerLemonBoy <thatlemon@gmail.com>
Wed, 9 Jun 2021 09:48:20 +0000 (11:48 +0200)
commit905f4eb537c118783969fded19e96fe6504c2956
tree26a5dd5fd426e682589c7b01c5086e333e7243b7
parent391f9ef1aa8b28ef8bad4486576477c0700e43e9
[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]