[llvm] r370392 - GlobalISel: Don't compute known bits for non-integral GEP
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 10:55:05 PDT 2019
Author: arsenm
Date: Thu Aug 29 10:55:05 2019
New Revision: 370392
URL: http://llvm.org/viewvc/llvm-project?rev=370392&view=rev
Log:
GlobalISel: Don't compute known bits for non-integral GEP
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/GISelKnownBits.cpp?rev=370392&r1=370391&r2=370392&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/GISelKnownBits.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/GISelKnownBits.cpp Thu Aug 29 10:55:05 2019
@@ -150,8 +150,13 @@ void GISelKnownBits::computeKnownBitsImp
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
More information about the llvm-commits
mailing list