[llvm] r330100 - [NFC] ConstantOffsetExtractor::CanTraceInto(): add FIXME: no tests
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 15 11:59:27 PDT 2018
Author: lebedevri
Date: Sun Apr 15 11:59:27 2018
New Revision: 330100
URL: http://llvm.org/viewvc/llvm-project?rev=330100&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp?rev=330100&r1=330099&r2=330100&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp Sun Apr 15 11:59:27 2018
@@ -497,6 +497,8 @@ bool ConstantOffsetExtractor::CanTraceIn
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;
More information about the llvm-commits
mailing list