[ConstantFold] Don't drop zero index gep with inrange attribute
authorNikita Popov <npopov@redhat.com>
Fri, 6 Jan 2023 11:02:52 +0000 (12:02 +0100)
committerNikita Popov <npopov@redhat.com>
Fri, 6 Jan 2023 11:06:42 +0000 (12:06 +0100)
commitf09d32d121cdb77603b677c9666cfffb2186f86c
treedc5481c50ff36a2df9ddcde6bcbdc69973530570
parent48c68367d0320e0d6ec03bb9cf76a108f9202cad
[ConstantFold] Don't drop zero index gep with inrange attribute

This may cause GlobalSplit to fail if opaque pointers are used.

inrange really needs a new representation, but for now restore the
pre-opaque pointers status.
llvm/lib/IR/ConstantFold.cpp
llvm/test/Assembler/getelementptr.ll