<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Large ExtInt cannot convert to/from floating point (DAG, SINT_TO_FP)"
   href="https://bugs.llvm.org/show_bug.cgi?id=48302">48302</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Large ExtInt cannot convert to/from floating point (DAG, SINT_TO_FP)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>m.gehre@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>(see <a href="https://godbolt.org/z/hszG4W">https://godbolt.org/z/hszG4W</a>)

  int main() {
    _ExtInt(129) c = 3;
    double d = c;
    return 0;
  }
causes

Fatal error: error in backend: Unsupported library call operation!
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /opt/compiler-explorer/clang-trunk/bin/clang -g -o
./output.s -mllvm --x86-asm-syntax=intel -S
--gcc-toolchain=/opt/compiler-explorer/gcc-9.2.0 -fcolor-diagnostics
-fno-crash-diagnostics <source>
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '<source>'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@main'
 #0 0x0000555cba07efcc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2e0bfcc)
 #1 0x0000555cba07cd64 llvm::sys::RunSignalHandlers()
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2e09d64)
 #2 0x0000555cba07cff5 llvm::sys::CleanupOnSignal(unsigned long)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2e09ff5)
 #3 0x0000555cb9febac2 llvm::CrashRecoveryContext::HandleExit(int)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2d78ac2)
 #4 0x0000555cba075c1e llvm::sys::Process::Exit(int, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2e02c1e)
 #5 0x0000555cb817be0e LLVMErrorHandler(void*, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+0xf08e0e)
 #6 0x0000555cb9ff2329 llvm::report_fatal_error(llvm::Twine const&, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2d7f329)
 #7 0x0000555cb9ff2478 (/opt/compiler-explorer/clang-trunk/bin/clang+0x2d7f478)
 #8 0x0000555cbadcc0a8 llvm::TargetLowering::makeLibCall(llvm::SelectionDAG&,
llvm::RTLIB::Libcall, llvm::EVT, llvm::ArrayRef<llvm::SDValue>,
llvm::TargetLowering::MakeLibCallOptions, llvm::SDLoc const&, llvm::SDValue)
const (/opt/compiler-explorer/clang-trunk/bin/clang+0x3b590a8)
 #9 0x0000555cbae6066f
llvm::DAGTypeLegalizer::ExpandIntOp_SINT_TO_FP(llvm::SDNode*)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x3bed66f)

I wonder if this should be solved in LLVM or if clang should forbid those
conversions.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>