Add tests to reproduce pointer/index width confusion crashes
Some calls to GEPOperator::accumulateConstantOffset(APInt) passed the pointer bitwidth as the width of the APInt, while the function asserts that the width of its argument is equal to the index width of the GEP pointer input. These values are almost always the same, so mixing up which call to use doesn't usually cause issues. However, when dealing with data layouts where these values are different, the passes tested here can crash. This will be fixed in D143437 . Differential Revision: https://reviews.llvm.org/D144673
Loading
Please sign in to comment