diff options
author | Nikita Popov <npopov@redhat.com> | 2022-01-04 12:23:06 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-01-04 12:27:40 +0100 |
commit | 75db002725156fba9e9c38b7cefe57b7ed713734 (patch) | |
tree | 7a6f3e56ec7e75b345dcee3a4281835587b85753 /clang/lib/Parse/ParseDecl.cpp | |
parent | aefab6f8d5b13c41d000feaa8f0e567d4b6a4681 (diff) | |
download | llvm-75db002725156fba9e9c38b7cefe57b7ed713734.zip llvm-75db002725156fba9e9c38b7cefe57b7ed713734.tar.gz llvm-75db002725156fba9e9c38b7cefe57b7ed713734.tar.bz2 |
[ConstantFold] Remove another incorrect icmp of GEP fold
This fold is not correct, because indices might evaluate to zero
even if they are not a literal zero integer. Additionally, this
fold would be wrong (in the general case) for non-i8 types as well,
due to index overflow.
Drop this fold and instead let the target-dependent constant
folder compute the actual offset and fold the comparison based
on that.
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
0 files changed, 0 insertions, 0 deletions