llvm-project
2ec08b31 - [LSV] Added check for mismatched GEP strides in getConstantOffsetComplexAddrs (#186671)

Commit
8 days ago
[LSV] Added check for mismatched GEP strides in getConstantOffsetComplexAddrs (#186671) When two GEPs A & B with variable indices have source element types of different sizes (e.g. i8 vs i32), their offsets cannot be constants. Currently the `getConstantOffsetComplexAddrs` does not check this and simply use the stride of GEP A assuming they are equal, resulting in miscompile. Add a check that the source element types are the same, otherwise bail out. Fixes #186327
Author
Parents
Loading