diff options
author | Joe Ellis <joe.ellis@arm.com> | 2020-10-26 17:40:25 +0000 |
---|---|---|
committer | Joe Ellis <joe.ellis@arm.com> | 2020-10-26 17:40:26 +0000 |
commit | 0f8350559325db35e0ee3423db5d29113e4eec12 (patch) | |
tree | 29b22f4103661a7e1776eaede816211ddbbe2d80 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 0383a1a8c230581aec4f2d9d4bfb5f5ed32d2bf5 (diff) | |
download | llvm-0f8350559325db35e0ee3423db5d29113e4eec12.zip llvm-0f8350559325db35e0ee3423db5d29113e4eec12.tar.gz llvm-0f8350559325db35e0ee3423db5d29113e4eec12.tar.bz2 |
[SVE][InstCombine] Fix TypeSize warning in canReplaceGEPIdxWithZero
The warning would fire when calling canReplaceGEPIdxWithZero on a GEP
whose source element type is a scalable vector. The size of scalable
vector types is not known, so this optimization cannot be performed.
This patch fixes the issue by:
- bailing out early in this routine if the GEP instruction's source
element type is a scalable vector.
- making use of getFixedSize -- this removes the dependency on the
deprecated interface.
Reviewed By: fpetrogalli
Differential Revision: https://reviews.llvm.org/D89968
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions