Files
clang-p2996/llvm/test/Transforms/InferAddressSpaces/AMDGPU/infer-getelementptr.ll
Nikita Popov 5f01a626dd [ConstantFold] Fix inbounds inference on mismatching source element type
When inferring that a GEP of a global variable is inbounds because
there is no notional overindexing, we need to check that the
global value type and the GEP source element type match.

This was not necessary with typed pointers (because we would have
a bitcast in between), but is necessary with opaque pointers.

We should be able to recover some of the safe cases by performing
an offset based inbounds inference in DL-aware ConstantFolding.
2023-01-31 11:33:00 +01:00

5.6 KiB