File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
llvm/lib/Transforms/Scalar Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -976,10 +976,6 @@ static bool isLoadCombineCandidate(Instruction *Or) {
976
976
977
977
// / Return true if it may be profitable to convert this (X|Y) into (X+Y).
978
978
static bool ShouldConvertOrWithNoCommonBitsToAdd (Instruction *Or) {
979
- // If this `or` appears to be a part of an load widening reduction, ignore it.
980
- if (isLoadCombineCandidate (Or))
981
- return false ;
982
-
983
979
// Don't bother to convert this up unless either the LHS is an associable add
984
980
// or subtract or mul or if this is only used by one of the above.
985
981
// This is only a compile-time improvement, it is not needed for correctness!
@@ -2217,7 +2213,7 @@ void ReassociatePass::OptimizeInst(Instruction *I) {
2217
2213
// If this is a bitwise or instruction of operands
2218
2214
// with no common bits set, convert it to X+Y.
2219
2215
if (I->getOpcode () == Instruction::Or &&
2220
- ShouldConvertOrWithNoCommonBitsToAdd (I) &&
2216
+ ShouldConvertOrWithNoCommonBitsToAdd (I) && ! isLoadCombineCandidate (I) &&
2221
2217
haveNoCommonBitsSet (I->getOperand (0 ), I->getOperand (1 ),
2222
2218
I->getModule ()->getDataLayout (), /* AC=*/ nullptr , I,
2223
2219
/* DT=*/ nullptr )) {
You can’t perform that action at this time.
0 commit comments