<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/107054>107054</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Assertion `getOperand(0)->getType() == getOperand(1)->getType() && "Both operands to FCmp instruction are not of the same type!"' failed.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          yijan4845
      </td>
    </tr>
</table>

<pre>
    Compiler Explorer:

Attempting to compile below program with Clang Assertion Trunk:
```c
int main() {
        static volatile _Atomic (long double) a = 0;
        (++ a) == 1;
}
```

Clang stack dump:
```
clang: /root/llvm-project/llvm/include/llvm/IR/Instructions.h:1302: void llvm::FCmpInst::AssertOK(): Assertion `getOperand(0)->getType() == getOperand(1)->getType() && "Both operands to FCmp instruction are not of the same type!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/clang -gdwarf-4 -g -o /app/output.s -mllvm --x86-asm-syntax=intel -fno-verbose-asm -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics <source>
1.      <eof> parser at end of file
2.      <source>:1:5: LLVM IR generation of declaration 'main'
3.      <source>:1:5: Generating code for declaration 'main'
 #0 0x0000000003b10a28 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3b10a28)
 #1 0x0000000003b0e6ec llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3b0e6ec)
 #2 0x0000000003a576c8 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007c9e39642520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007c9e396969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x00007c9e39642476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x00007c9e396287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x00007c9e3962871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #8 0x00007c9e39639e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #9 0x00000000034291c0 llvm::IRBuilderBase::CreateFCmpHelper(llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::Twine const&, llvm::MDNode*, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x34291c0)
#10 0x0000000004337fcf (anonymous namespace)::ScalarExprEmitter::EmitCompare(clang::BinaryOperator const*, llvm::CmpInst::Predicate, llvm::CmpInst::Predicate, llvm::CmpInst::Predicate, bool) CGExprScalar.cpp:0:0
#11 0x000000000432ab2e clang::StmtVisitorBase<std::add_pointer, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) CGExprScalar.cpp:0:0
#12 0x000000000432f5bc clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x432f5bc)
#13 0x00000000042b803e clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, clang::CodeGen::AggValueSlot, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x42b803e)
#14 0x00000000042dd8ed clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x42dd8ed)
#15 0x0000000003e71ca5 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3e71ca5)
#16 0x0000000003e79a14 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3e79a14)
#17 0x0000000003ee1114 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3ee1114)
#18 0x0000000003ef5fef clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3ef5fef)
#19 0x0000000003f57b0a clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3f57b0a)
#20 0x0000000003f52645 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3f52645)
#21 0x0000000003f52bfb clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3f52bfb)
#22 0x0000000003f5d073 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (.part.0) CodeGenModule.cpp:0:0
#23 0x000000000445c3d6 (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) ModuleBuilder.cpp:0:0
#24 0x000000000444c938 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x444c938)
#25 0x0000000006571b54 clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6571b54)
#26 0x0000000004459f08 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4459f08)
#27 0x00000000046ebe99 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x46ebe99)
#28 0x000000000466f46e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x466f46e)
#29 0x00000000047d592e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x47d592e)
#30 0x0000000000caa1bf cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xcaa1bf)
#31 0x0000000000ca340a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#32 0x000000000449d309 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#33 0x0000000003a57b74 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3a57b74)
#34 0x000000000449d8ff clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#35 0x0000000004463895 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4463895)
#36 0x00000000044642fd clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x44642fd)
#37 0x000000000446bf45 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x446bf45)
#38 0x0000000000ca75b5 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xca75b5)
#39 0x0000000000b7b734 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xb7b734)
#40 0x00007c9e39629d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#41 0x00007c9e39629e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#42 0x0000000000ca2ebe _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xca2ebe)
clang: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Compiler returned: 134
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkWl1z4ygW_TXKC2WXhGR9POTBcZKenu3Z7kpSvY8uhK5spiVQAUqcf78FyLFQnHTc49nare3qpCJ0uZxzuMAFQZRiGw5wGSyugsX1Ben1VsjLZ_Yn4UmeLC5KUT1frkTbsQYkutl1jZAgg3gZhNdBOPxeag1tpxnfIC0QddaohEY8oU6KjSQtemJ6i1YN4Ru0VAqkZoKjB9nzHwdnaej-U_fMuEYtYTzAeYALFGRX-0YLpYlmFD2KhmjT1nqpRcsoCnDeCL5BlejLBkwtgoL4GoVBfKhs_V0F-AoR6ze-NibRwSS7ngAak3UclCb0B6r6tnsN3z1SYxfESxTgWymEDvBt0zy2s06KP4HuHwN8yzht-goOBZ_vzC-utOypkUnNt0G8jOIQG3ePglXIWsbLIF7ertrO2LonJ-3XfzjJjPlB7CANN6C_diAJrwKchwEuZkF8swH98NzBXmWnhmcZHbfEaYBTFGB8JfQWCWeuTAgYUIgdGCAiAXGhkaiR3gJSpAWkrasowDjAGaoJa6CaO-2-fblZ3t8g1Zct04igst8gCZ2Q2njfat0pwxffBvh2w_S2L-dUtAcFJ0IzpXpQAb5FhFdo0NsCoZKoLSoJ_aEloRDgFeokdFJQUAoqpEQvXbGpSZQSlBENFZI9R4pK1ukB8v3rgAjnQVh8G-KfyE3fAtdqCAnRGWTDWJEz2I8sfGs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