Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failed: (!isSigned && "Legalize cannot Expand SINT_TO_FP for i64 yet"), function ExpandLegalINT_TO_FP, file lib/CodeGen/Selection DAG/LegalizeDAG.cpp, line 2420. #44619

Closed
pkubaj opened this issue Mar 22, 2020 · 7 comments
Labels
bugzilla Issues migrated from bugzilla llvm:codegen regression

Comments

@pkubaj
Copy link
Contributor

pkubaj commented Mar 22, 2020

Bugzilla Link 45274
Resolution FIXED
Resolved on Apr 01, 2021 08:08
Version 10.0
OS FreeBSD
Blocks #44654
Attachments reproduction files
CC @adalava,@topperc,@tstellar

Extended Description

FreeBSD head on powerpc64 with LLVM 10 rc4.

Compiling emulators/mednafen port fails, this is a regression from 9.0.1:
Assertion failed: (!isSigned && "Legalize cannot Expand SINT_TO_FP for i64 yet"), function ExpandLegalINT_TO_FP, file /usr/src/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp, line 2420.
Stack dump:
0. Program arguments: c++ -std=gnu++11 -fsigned-char -DLOCALEDIR="/usr/local/share/locale" -DHAVE_CONFIG_H -I/usr/local/include/SDL2 -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE -I../../include -I../../include -I../../intl -I/usr/local/include -DLIBICONV_PLUG -D_THREAD_SAFE -fno-fast-math -fno-unsafe-math-optimizations -fomit-frame-pointer -fstrict-aliasing -Wall -Wshadow -Wempty-body -Wignored-qualifiers -Wvla -Wvariadic-macros -Wdisabled-optimization -Werror=write-strings -fno-pic -fno-pie -fno-PIC -fno-PIE -fwrapv -fjump-tables
-fexceptions -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -MT ers.o -MD -MP -MF .deps/ers.Tpo -c -o ers.o ers.cpp

  1.  <eof> parser at end of file
    
  2.  Code generation
    
  3.  Running pass 'Function Pass Manager' on module 'ers.cpp'.
    
  4.  Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function '@_ZN14EmuRealSyncher10AddEmuTimeElb'
    
@topperc
Copy link
Collaborator

topperc commented Mar 23, 2020

Looks to be related to the -ffp-exception-behavior=strict option

@pkubaj
Copy link
Contributor Author

pkubaj commented Apr 4, 2020

Here's a reduced test case:
double a;
long b;
void c() { b / a; }

I also reduced compilation options to:
/usr/bin/c++ -cc1 -triple powerpc64-unknown-freebsd13.0 -emit-obj -ffp-exception-behavior=strict -x c++ main-8d9e47.cpp

@adalava
Copy link
Mannequin

adalava mannequin commented May 19, 2020

It looks like bug #​45237

Also reproduced on LLVM10 and trunk@3e315697ac7. Ommiting -ffp-exception-behavior=strict workarounds it. It's not reproduced on LLVM9 however -ffp-exception-behavior=strict is not available on that version.

@adalava
Copy link
Mannequin

adalava mannequin commented May 19, 2020

Despite being a regression between 9 and 10, marking the release-10.0.1 blocker for you to decide. Thanks!

@tstellar
Copy link
Collaborator

Is there a fix for this?

@pkubaj
Copy link
Contributor Author

pkubaj commented Apr 1, 2021

Seems to work fine in LLVM 11.0.1.

@tstellar
Copy link
Collaborator

mentioned in issue #44654

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm:codegen regression
Projects
None yet
Development

No branches or pull requests

3 participants