[llvm-bugs] [Bug 39812] New: [x86] Cost model for v2i32 masked load/store looks incorrect

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 27 12:16:22 PST 2018


            Bug ID: 39812
           Summary: [x86] Cost model for v2i32 masked load/store looks
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: craig.topper at gmail.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at rotateright.com

The code model for masked load/store contains this code

  if (VT.isSimple() && LT.second != VT.getSimpleVT() &&
      LT.second.getVectorNumElements() == NumElem)
    // Promotion requires expand/truncate for data and a shuffle for mask.
    Cost += getShuffleCost(TTI::SK_Select, SrcVTy, 0, nullptr) +
            getShuffleCost(TTI::SK_Select, MaskTy, 0, nullptr);

But SK_Select does not describe an expand/truncate action. This code said
SK_Alternate when it was originally written, but was renamed to SK_Select in
r334513. I'm not sure if SK_Alternate was the same as select and was
confusingly named before?

The mask legalization cost also seems weird on AVX512 targets. We don't need to
expand/truncate it there as it would be an i1 type.

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/20181127/d65b25e5/attachment.html>

More information about the llvm-bugs mailing list