[llvm-bugs] [Bug 45562] New: BasicTTIImpl.h has many functions that operate on Type that should operate on VectorType

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Apr 15 14:03:47 PDT 2020


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

            Bug ID: 45562
           Summary: BasicTTIImpl.h has many functions that operate on Type
                    that should operate on VectorType
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: ctetreau at quicinc.com
                CC: llvm-bugs at lists.llvm.org

Many functions in llvm\include\llvm\CodeGen\BasicTTIImpl.h take pointers to
base Type as arguments and return them as results. However, these objects are
in fact required to be or guaranteed to be VectorType, and are unconditionally
casted to/from.

The amount of casting required in this file and in classes that use it would be
greatly reduced, and the ability to reason about the code would be greatly
increased if these functions operated on VectorType or its subclasses instead.

-- 
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/20200415/68975685/attachment.html>


More information about the llvm-bugs mailing list