<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - x86_64 f128, UNREACHABLE executed at LegalizeFloatTypes.cpp:687" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24109&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=PM934QObeXxlbdJ0zFPPU2vB1UqDJaLFxJXrN_8MSvw&s=m12DKFfu64nLKgjD91xIdzN6mwZOI5RNQVIzJs2PeVk&e=">24109</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>x86_64 f128, UNREACHABLE executed at LegalizeFloatTypes.cpp:687
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>chh@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Input test program:

$ cat /tmp/debug/b.c

union IEEEl2bits {
  long double e;
  struct {
    unsigned long manl :64;
    unsigned long manh :48;
    unsigned int exp :15;
    unsigned int sign :1;
  } bits;
};
double copysign(double, double) __attribute__((__const__));
static const long double huge = 0x1p16000L;
long double Testscalbnl(long double x, int n)
{
 union IEEEl2bits u;
 int k;
 u.e = x;
 k = u.bits.exp;
 if (n > 50000)
   return copysign(huge, x);
 // implicit convert from long double to double for the call to copysign.
 u.bits.exp = k;
 return u.e;
}


Compilation command and error:

$ /disk5/chh/LLVM/llvm.0713/Release+Asserts/bin/clang -target
x86_64-linux-android -c -O  /tmp/debug/b.c

SoftenFloatOperand Op #1: 0x65e8be0: f64 = fcopysign 0x65e7950, 0x65e8390
[ORD=3] [ID=0]

Do not know how to soften this operator's operand!
UNREACHABLE executed at LegalizeFloatTypes.cpp:687!
0  clang           0x0000000002beb5b8
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 56
1  clang           0x0000000002bea6e9
2  libpthread.so.0 0x00007f41af35b340
3  libc.so.6       0x00007f41ae36fcc9 gsignal + 57
4  libc.so.6       0x00007f41ae3730d8 abort + 328
5  clang           0x0000000002bd080c
6  clang           0x00000000022f1f56
7  clang           0x000000000229e7dc
8  clang           0x000000000229ed1a llvm::SelectionDAG::LegalizeTypes() + 570
9  clang           0x000000000227041a
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 506
10 clang           0x00000000022743f6
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 1238
11 clang           0x0000000002276309
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1129
12 clang           0x0000000002083d44
13 clang           0x0000000002b680e8
llvm::FPPassManager::runOnFunction(llvm::Function&) + 632
14 clang           0x0000000002b6850b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
15 clang           0x0000000002b68814
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 740
16 clang           0x0000000000b3f524
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*)
+ 2420
17 clang           0x0000000000b2ba36
18 clang           0x0000000000d225f3 clang::ParseAST(clang::Sema&, bool, bool)
+ 483
19 clang           0x0000000000b2c70e clang::CodeGenAction::ExecuteAction() +
78
20 clang           0x000000000096ae9e clang::FrontendAction::Execute() + 302
21 clang           0x0000000000946d59
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 345
22 clang           0x000000000092e71e
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2014
23 clang           0x00000000009263a8 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 1544
24 clang           0x00000000008eb3c2 main + 4786
25 libc.so.6       0x00007f41ae35aec5 __libc_start_main + 245
26 clang           0x0000000000924f1f
Stack dump:
0.      Program arguments: /disk5/chh/LLVM/llvm.0713/Release+Asserts/bin/clang
-cc1 -triple x86_64--linux-android -emit-obj -disable-free -main-file-name b.c
-mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -target-feature +sse4.2 -target-feature +popcnt
-target-linker-version 2.24 -momit-leaf-frame-pointer -dwarf-column-info
-coverage-file /disk5/chh/Debug/fp128/b.c -resource-dir
/disk5/chh/LLVM/llvm.0713/Release+Asserts/bin/../lib/clang/3.7.0
-internal-isystem /usr/local/include -internal-isystem
/disk5/chh/LLVM/llvm.0713/Release+Asserts/bin/../lib/clang/3.7.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-fdebug-compilation-dir /disk5/chh/Debug/fp128 -ferror-limit 19
-fmessage-length 159 -mstackrealign -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o b.o -x c /tmp/debug/b.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '/tmp/debug/b.c'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@Testscalbnl'
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_git_clang.git&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=PM934QObeXxlbdJ0zFPPU2vB1UqDJaLFxJXrN_8MSvw&s=NzNgcwDGr49sSh6TZLvX6am9VT0R4m5U4n6qhd2LbUc&e=">http://llvm.org/git/clang.git</a>
9ad5a5061202c22d3e4f44fcf58711915c952af1) (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_git_llvm.git&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=PM934QObeXxlbdJ0zFPPU2vB1UqDJaLFxJXrN_8MSvw&s=_cAPpLlC0ZLLniBF-MovrbVX7cLZsha_i1zqze-_cr0&e=">http://llvm.org/git/llvm.git</a>
da9c587dad055ebaa2781b1292d3317d1bfcac9e)
Target: x86_64--linux-android
Thread model: posix</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>