mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-16 16:37:42 +00:00
Remove an optimization that isn't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3419 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d92ac5ae01
commit
905641bb01
@ -88,13 +88,15 @@ IsZero(Value* idx)
|
|||||||
bool
|
bool
|
||||||
DecomposePass::decomposeArrayRef(BasicBlock::iterator &BBI)
|
DecomposePass::decomposeArrayRef(BasicBlock::iterator &BBI)
|
||||||
{
|
{
|
||||||
|
// FIXME: If condition below
|
||||||
MemAccessInst &MAI = cast<MemAccessInst>(*BBI);
|
MemAccessInst &MAI = cast<MemAccessInst>(*BBI);
|
||||||
|
// FIXME: If condition below
|
||||||
|
|
||||||
// If this instr two or fewer arguments and the first argument is 0,
|
// If this instr has no indexes, then the decomposed version is identical to
|
||||||
// the decomposed version is identical to the instruction itself.
|
// the instruction itself. FIXME: this should go away once GEP is the only
|
||||||
// This is common enough that it is worth checking for explicitly...
|
// MAI
|
||||||
if (MAI.getNumIndices() == 0 ||
|
//
|
||||||
(MAI.getNumIndices() <= 2 && IsZero(*MAI.idx_begin()))) {
|
if (MAI.getNumIndices() == 0) {
|
||||||
++BBI;
|
++BBI;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user