mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-13 08:26:02 +00:00
another fastpath
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20674 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -349,7 +349,8 @@ void GraphBuilder::visitGetElementPtrInst(User &GEP) {
|
|||||||
|
|
||||||
// If all of the indices are zero, the result points to the operand without
|
// If all of the indices are zero, the result points to the operand without
|
||||||
// applying the type.
|
// applying the type.
|
||||||
if (AllZeros) {
|
if (AllZeros || (!Value.isNull() &&
|
||||||
|
Value.getNode()->isNodeCompletelyFolded())) {
|
||||||
setDestTo(GEP, Value);
|
setDestTo(GEP, Value);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user