https://bugs.llvm.org/show_bug.cgi?id=46056

            Bug ID: 46056
           Summary: [SCEV] Missing Or expression handling
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedb...@nondot.org
          Reporter: elena.demikhov...@intel.com
                CC: llvm-bugs@lists.llvm.org

The SCEV builder does not handle all cases of Or expression. Diring the
"instcombine" phase an Add instruction may be replaced with Or if there is no
common bits between two addends. When we try to create a SCEV expression, the
Or is not parsed as Add and we have SCEVUnknown on Or expression.

I suppose that we need to add something like this:

ScalarEvolution.cpp
in function
const SCEV *ScalarEvolution::createSCEV(Value *V)

..
case Instruction::Or:
..
else if (llvm::haveNoCommonBitsSet(BO->RHS, BO->LHS, getDataLayout()))
        return getAddExpr(getSCEV(BO->LHS), getSCEV(BO->RHS));

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to