1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

GlobalISel: Don't compute known bits for non-integral GEP

llvm-svn: 370392
This commit is contained in:
Matt Arsenault 2019-08-29 17:55:05 +00:00
parent e9c25def31
commit f8b0293b94

View File

@ -150,8 +150,13 @@ void GISelKnownBits::computeKnownBitsImpl(Register R, KnownBits &Known,
Known.Zero = KnownZeroOut;
break;
}
// G_GEP is like G_ADD. FIXME: Is this true for all targets?
case TargetOpcode::G_GEP:
case TargetOpcode::G_GEP: {
// G_GEP is like G_ADD. FIXME: Is this true for all targets?
LLT Ty = MRI.getType(MI.getOperand(1).getReg());
if (DL.isNonIntegralAddressSpace(Ty.getAddressSpace()))
break;
LLVM_FALLTHROUGH;
}
case TargetOpcode::G_ADD: {
// Output known-0 bits are known if clear or set in both the low clear bits
// common to both LHS & RHS. For example, 8+(X<<3) is known to have the