Skip to content

[arm] Cannot select i32 = setcc 0x00000000, Constant:i64 #140445

Open
@Urgau

Description

@Urgau

I'm seeing an error when trying to use llvm.minimum.f64 and llvm.maximum.f64 on arm (32bits).

define double @call_maximum_fp128(double %x, double %y) unnamed_addr #1 {
start:
  %0 = tail call double @llvm.maximum.f64(double %x, double %y)
  ret double %0
}

declare double @llvm.maximum.f64(double, double)

attributes #1 = { inlinehint uwtable "target-cpu"="generic" "target-features"="+strict-align,+v6,+vfp2,-d32" }
LLVM ERROR: Cannot select: 0xa8483e8: i32 = setcc 0xa8480a0, Constant:i64<-9223372036854775808>, seteq:ch
  0xa8480a0: i64 = build_pair 0xa845d50, 0xa845d50:1
    0xa845d50: i32,i32 = ARMISD::VMOVRRD 0xa844fb8
      0xa844fb8: f64,ch = CopyFromReg 0xa7be670, Register:f64 %1
        0xa844f40: f64 = Register %1
    0xa845d50: i32,i32 = ARMISD::VMOVRRD 0xa844fb8
      0xa844fb8: f64,ch = CopyFromReg 0xa7be670, Register:f64 %1
        0xa844f40: f64 = Register %1
  0xa845dc8: i64 = Constant<-9223372036854775808>
In function: _ZN4core3f6421_$LT$impl$u20$f64$GT$7minimum17h4fb5294b0f68c019E
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel <source>
1.	Running pass 'Function Pass Manager' on module '<source>'.
2.	Running pass 'ARM Instruction Selection' on function '@"_ZN4core3f6421_$LT$impl$u20$f64$GT$7minimum17h4fb5294b0f68c019E"'
 #0 0x0000000003b5e828 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3b5e828)
 #1 0x0000000003b5c3e4 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #2 0x00007dd7d7a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x00007dd7d7a969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x00007dd7d7a42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x00007dd7d7a287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x0000000000786212 llvm::UniqueStringSaver::save(llvm::Twine const&) (.cold) StringSaver.cpp:0:0
 #7 0x0000000003904d28 llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3904d28)
 #8 0x000000000390b099 llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x390b099)
 #9 0x00000000013f7229 (anonymous namespace)::ARMDAGToDAGISel::Select(llvm::SDNode*) ARMISelDAGToDAG.cpp:0:0
#10 0x0000000003902214 llvm::SelectionDAGISel::DoInstructionSelection() (/opt/compiler-explorer/clang-trunk/bin/llc+0x3902214)
#11 0x0000000003910d22 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-trunk/bin/llc+0x3910d22)
#12 0x000000000391369a llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x391369a)
#13 0x0000000003915576 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3915576)
#14 0x0000000001400574 (anonymous namespace)::ARMDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) ARMISelDAGToDAG.cpp:0:0
#15 0x0000000003901d91 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3901d91)
#16 0x0000000002bc6988 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#17 0x00000000031469e2 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x31469e2)
#18 0x0000000003146c71 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3146c71)
#19 0x00000000031485d9 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x31485d9)
#20 0x00000000008c0c2f compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#21 0x000000000079b3be main (/opt/compiler-explorer/clang-trunk/bin/llc+0x79b3be)
#22 0x00007dd7d7a29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#23 0x00007dd7d7a29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#24 0x00000000008b86f5 _start (/opt/compiler-explorer/clang-trunk/bin/llc+0x8b86f5)
Program terminated with signal: SIGSEGV
Compiler returned: 139

https://llvm.godbolt.org/z/jjTh6nYd5

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions