[SVE] Fix scalable vector bug in DataLayout::getIntPtrType
authorDavid Sherwood <david.sherwood@arm.com>
Mon, 22 Jun 2020 13:09:34 +0000 (14:09 +0100)
committerDavid Sherwood <david.sherwood@arm.com>
Fri, 26 Jun 2020 06:58:45 +0000 (07:58 +0100)
commit7a834a0a4ee36726df989702c44711a0ef13ec25
tree7c52e5a5ff02bbfb93b0f428f1f82e981b003dba
parent243a5329d42c8b9ca515c4079af240b806ca0707
[SVE] Fix scalable vector bug in DataLayout::getIntPtrType

Fixed an issue in DataLayout::getIntPtrType where we were assuming
the input type was always a fixed vector type, which isn't true.

Added a test that exposed the problem to:

  Transforms/InstCombine/vector_gep1.ll

Differential Revision: https://reviews.llvm.org/D82294
llvm/lib/IR/DataLayout.cpp
llvm/test/Transforms/InstCombine/vector_gep1.ll