summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2018-04-15 18:59:27 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2018-04-15 18:59:27 +0000
commit25cbb62d18e3521b5a696fcf8c9f78c8f0cfc7da (patch)
tree361e341227974902e50f97ebad36a850daac35c6 /llvm/lib/Transforms
parentb9acf13907c877a61abc37f2a9ec621ab0dd9d5b (diff)
downloadbcm5719-llvm-25cbb62d18e3521b5a696fcf8c9f78c8f0cfc7da.tar.gz
bcm5719-llvm-25cbb62d18e3521b5a696fcf8c9f78c8f0cfc7da.zip
[NFC] ConstantOffsetExtractor::CanTraceInto(): add FIXME: no tests
As suggested in https://reviews.llvm.org/D45631#1068338, looking at haveNoCommonBitsSet() users, and *trying* to show the change effect elsewhere. llvm-svn: 330100
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp b/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
index 78af1bda7b2..ca9f82c9aa4 100644
--- a/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
+++ b/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
@@ -497,6 +497,8 @@ bool ConstantOffsetExtractor::CanTraceInto(bool SignExtended,
Value *LHS = BO->getOperand(0), *RHS = BO->getOperand(1);
// Do not trace into "or" unless it is equivalent to "add". If LHS and RHS
// don't have common bits, (LHS | RHS) is equivalent to (LHS + RHS).
+ // FIXME: this does not appear to be covered by any tests
+ // (with x86/aarch64 backends at least)
if (BO->getOpcode() == Instruction::Or &&
!haveNoCommonBitsSet(LHS, RHS, DL, nullptr, BO, DT))
return false;
OpenPOWER on IntegriCloud