mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01: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. llvm-svn: 65383
This commit is contained in:
parent
dd9c79d45b
commit
d5e0934e30
@ -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…
Reference in New Issue
Block a user