[PATCH] D66956: GlobalISel: Don't compute known bits for non-integral GEP
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 09:30:11 PDT 2019
arsenm created this revision.
arsenm added reviewers: aditya_nandakumar, aemerson, paquette.
Herald added subscribers: Petar.Avramovic, volkan, rovka, wdng.
https://reviews.llvm.org/D66956
Files:
lib/CodeGen/GlobalISel/GISelKnownBits.cpp
Index: lib/CodeGen/GlobalISel/GISelKnownBits.cpp
===================================================================
--- lib/CodeGen/GlobalISel/GISelKnownBits.cpp
+++ lib/CodeGen/GlobalISel/GISelKnownBits.cpp
@@ -150,8 +150,13 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66956.217910.patch
Type: text/x-patch
Size: 816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190829/bac56bae/attachment.bin>
More information about the llvm-commits
mailing list