[llvm-bugs] [Bug 51680] [SCEV] After 14d8f1546a0, via SCEV, Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file llvm/include/llvm/Support/Casting.h, line 269.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 31 09:21:40 PDT 2021


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

listmail at philipreames.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from listmail at philipreames.com ---
Should be fixed with:

commit 9b45fd909ffa754acbb4e927bc2d55c7ab0d4e3f (HEAD -> main, origin/main)
Author: Philip Reames <listmail at philipreames.com>
Date:   Tue Aug 31 09:17:36 2021 -0700

    [AlignFromAssume] Bailout w/non-constant alignments (pr51680)

    This is a bailout for pr51680.  This pass appears to assume that the
alignment operand to an align tag on an assume bundle is constant.  This
doesn't appear to be required anywhere, and clang happily generates
non-constant alignments for cases such as this case taken from the bug report:

    // clang -cc1 -triple powerpc64-- -S -O1 opal_pci-min.c
    extern int a[];
    long *b;
    long c;
    void *d(long, int *, int, long, long, long)
__attribute__((__alloc_align__(6)));
    void e() {
      b = d(c, a, 0, 0, 5, c);
      b[0] = 0;
    }

    This was exposed by a SCEV change which allowed a non-constant alignment to
reach further into the pass' code.  We could generalize the pass, but for now,
let's fix the crash.

-- 
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/20210831/6acef770/attachment-0001.html>


More information about the llvm-bugs mailing list