Issue 120093
Summary Assertion `VT.isInteger() && "Cannot create FP integer constant!"' failed.
Labels new issue
Assignees
Reporter TatyanaDoubts
    To reproduce run the following test on llc:

```
; ModuleID = 'reduced.ll'
source_filename = "reduced.ll"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
target triple = "x86_64-unknown-linux-gnu"

define double @widget() gc "statepoint-example" {
bb:
  %insertelement = insertelement <2 x double> <double poison, double 0xFFFFFFFFFFFFFFFF>, double 0.000000e+00, i64 0
 %fcmp = fcmp uge <2 x double> zeroinitializer, %insertelement
 %extractelement = extractelement <2 x i1> %fcmp, i64 0
  %extractelement1 = extractelement <2 x i1> %fcmp, i64 1
  %select = select i1 %extractelement, i1 %extractelement1, i1 false
  br i1 %select, label %bb2, label %bb3

bb2:                                              ; preds = %bb
 ret double 0.000000e+00

bb3: ; preds = %bb
  unreachable
}
```
Reproducer: https://godbolt.org/z/EG69jzzfz

Stack dump:
```
0.	Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel <source>
1.	Running pass 'Function Pass Manager' on module '<source>'.
2.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@widget'
 #0 0x0000000003c7e2e8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3c7e2e8)
 #1 0x0000000003c7bcec SignalHandler(int) Signals.cpp:0:0
 #2 0x00007c08a0642520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x00007c08a06969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x00007c08a0642476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x00007c08a06287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x00007c08a062871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #7 0x00007c08a0639e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #8 0x00000000039f7f6b llvm::SelectionDAG::getConstant(llvm::ConstantInt const&, llvm::SDLoc const&, llvm::EVT, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x39f7f6b)
 #9 0x00000000039f8c00 llvm::SelectionDAG::getAllOnesConstant(llvm::SDLoc const&, llvm::EVT, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x39f8c00)
#10 0x00000000038b1b31 (anonymous namespace)::DAGCombiner::visitFREEZE(llvm::SDNode*) (.isra.0) DAGCombiner.cpp:0:0
#11 0x00000000038ca30f (anonymous namespace)::DAGCombiner::visit(llvm::SDNode*) DAGCombiner.cpp:0:0
#12 0x00000000038cca3c (anonymous namespace)::DAGCombiner::combine(llvm::SDNode*) DAGCombiner.cpp:0:0
#13 0x00000000038ce328 (anonymous namespace)::DAGCombiner::Run(llvm::CombineLevel) DAGCombiner.cpp:0:0
#14 0x00000000038d0c3b llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOptLevel) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x38d0c3b)
#15 0x0000000003a32a08 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3a32a08)
#16 0x0000000003a366f9 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3a366f9)
#17 0x0000000003a379b0 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3a379b0)
#18 0x0000000003a283af llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3a283af)
#19 0x0000000002bc1829 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#20 0x00000000031c737f llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x31c737f)
#21 0x00000000031c7731 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x31c7731)
#22 0x00000000031c7fd1 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x31c7fd1)
#23 0x000000000089a608 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#24 0x000000000078563e main (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x78563e)
#25 0x00007c08a0629d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#26 0x00007c08a0629e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#27 0x0000000000890f35 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x890f35)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to