mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 16:37:42 +00:00
Extension of GEP in constant folder was broken (apparently this code
has never been run!). - Sorry, don't know how to make an LLVM test case for this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65383 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
46bdfb0e6b
commit
a7b42034fc
@ -1664,7 +1664,7 @@ Constant *llvm::ConstantFoldGetElementPtr(const Constant *C,
|
||||
Offset = ConstantExpr::getSExt(Offset, Base->getType());
|
||||
else if (Base->getType()->getPrimitiveSizeInBits() <
|
||||
Offset->getType()->getPrimitiveSizeInBits())
|
||||
Base = ConstantExpr::getZExt(Base, Base->getType());
|
||||
Base = ConstantExpr::getZExt(Base, Offset->getType());
|
||||
|
||||
Base = ConstantExpr::getAdd(Base, Offset);
|
||||
return ConstantExpr::getIntToPtr(Base, CE->getType());
|
||||
|
Loading…
x
Reference in New Issue
Block a user