[llvm-bugs] [Bug 46056] New: [SCEV] Missing Or expression handling

via llvm-bugs llvm-bugs at lists.llvm.org
Sun May 24 01:43:02 PDT 2020


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: unassignedbugs at nondot.org
          Reporter: elena.demikhovsky at intel.com
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200524/9e0a919b/attachment-0001.html>


More information about the llvm-bugs mailing list