[LLVMbugs] [Bug 17388] New: "Do not know how to scalarize this operator's operand!" when compiling for arm

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 27 06:41:12 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17388

            Bug ID: 17388
           Summary: "Do not know how to scalarize this operator's
                    operand!" when compiling for arm
           Product: clang
           Version: trunk
          Hardware: Other
                OS: other
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: justincohen at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

/* Filename: SkDraw.cpp
 * File simplified used multidelta, originally @
https://code.google.com/p/skia/source/browse/trunk/src/core/SkDraw.cpp
 *
 * Compiles with
 * llvm-build/Release+Asserts/bin/clang -cc1 -triple thumbv7-apple-ios6.0.0
-emit-obj  -target-abi apcs-gnu -mfloat-abi soft -target-feature
+soft-float-abi -Os -vectorize-slp -x c++ SkDraw.cpp
 *
 * Fails with:
 * ScalarizeVectorOperand Op #0: 0x1028b3c10: v1i64 = truncate 0x1028b0b10
[ORD=24] [ID=0]
 * Do not know how to scalarize this operator's operand!
 * UNREACHABLE executed at
<snip>/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:366!
 */

typedef int int32_t;
extern "C" {
  extern float ceilf(float);
  extern float floorf(float);
}

typedef float SkScalar;

struct SkIRect {
  int32_t fLeft, fTop, fRight, fBottom;
  bool isEmpty() const {
    return fLeft >= fRight || fTop >= fBottom;
  }
  void set(int32_t left, int32_t top, int32_t right, int32_t bottom) {
    fLeft = left;
    fTop = top;
    fRight = right;
    fBottom = bottom;
  }
  void inset(int32_t dx, int32_t dy) {
    fLeft += dx;
    fTop += dy;
    fRight -= dx;
    fBottom -= dy;
  }
  static bool Intersects(const SkIRect& a, const SkIRect& b) {
    return !a.isEmpty();
  }
};

struct SkRect {
  SkScalar fLeft, fTop, fRight, fBottom;
  void roundOut(SkIRect* dst) const {
    dst->set((int)floorf(fLeft), (int)floorf(fTop),
             (int)ceilf(fRight), (int)ceilf(fBottom));
  }
};

class SkPaint {
  public:     SkPaint();
  enum Style { kFill_Style };
    Style getStyle() const {
      return (Style)fStyle;
    }
  unsigned fStyle : 2;
};
class SkRasterClip;
class SkDraw {
  void drawRect(const SkRect&, const SkPaint&) const;
  const SkRasterClip* fRC;
};

class SkRasterClip {
  public:
    SkRasterClip();
  bool isEmpty() const {
    return fIsEmpty;
  }
  const SkIRect& getBounds() const;
  bool quickReject(const SkIRect& rect) const {
    return rect.isEmpty() || !SkIRect::Intersects(this->getBounds(), rect);
  }
  bool fIsEmpty;
};

void SkDraw::drawRect(const SkRect& rect, const SkPaint& paint) const {
  SkRect devRect;
  SkIRect ir;
  devRect.roundOut(&ir);
  if (paint.getStyle() != SkPaint::kFill_Style) {
    ir.inset(-1, -1);
  }
  if (fRC->quickReject(ir)) {
  }
}

-- 
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/20130927/f7939a46/attachment.html>


More information about the llvm-bugs mailing list