[llvm-bugs] [Bug 46557] New: __builtin_assume: Assertion failed: (getType() == V->getType() && "All operands to PHI node must be the same type as the PHI node!"), function setIncomingValue, file llvm/include/llvm/IR/Instructions.h, line 2576.

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 2 06:50:13 PDT 2020


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

            Bug ID: 46557
           Summary: __builtin_assume: Assertion failed: (getType() ==
                    V->getType() && "All operands to PHI node must be the
                    same type as the PHI node!"), function
                    setIncomingValue, file
                    llvm/include/llvm/IR/Instructions.h, line 2576.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

As reported in https://bugs.freebsd.org/247665, clang 10.0 (and the most recent
clang 11) asserts while compiling the emulators/rpcs3 port. This happens during
parsing of an expression using __builtin_assume:

% cat System-min.cpp
// clang -cc1 -triple x86_64-- -S System-min.cpp
enum {} a;
class b {
public:
  b() { a ? void() : __builtin_assume(0); }
} c;

% clang -cc1 -triple x86_64-- -S System-min.cpp
Assertion failed: (getType() == V->getType() && "All operands to PHI node must
be the same type as the PHI node!"), function setIncomingValue, file
/home/dim/src/llvm/llvm-project/llvm/include/llvm/IR/Instructions.h, line 2576.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: clang -cc1 -triple x86_64-- -S System-min.cpp
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.      System-min.cpp:5:3: Generating code for declaration 'b::b'
4.      System-min.cpp:5:7: LLVM IR generation of compound statement ('{}')
#0 0x000000000304f378 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(clang+0x304f378)
#1 0x000000000304d0a8 llvm::sys::RunSignalHandlers() (clang+0x304d0a8)
#2 0x000000000304fadd SignalHandler(int) (clang+0x304fadd)
#3 0x0000000805750a30 handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3

-- 
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/20200702/78ccc20e/attachment.html>


More information about the llvm-bugs mailing list