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

Certain 48 bit operations still aren't being legalized #44

Open
fundudeone opened this issue Jan 14, 2024 · 1 comment
Open

Certain 48 bit operations still aren't being legalized #44

fundudeone opened this issue Jan 14, 2024 · 1 comment

Comments

@fundudeone
Copy link

The compiler crashes and fails to legalize 48 bit not and comparison

@runer112
Copy link

runer112 commented Nov 11, 2024

48-bit bswap fails

fatal error: error in backend: unable to legalize instruction: %5:_(s48) = G_BSWAP %0:_ (in function: i48bswap_)
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: C:\\CEdev\\bin\\ez80-clang.exe -S -mllvm -profile-guided-section-prefix=false -Os -mllvm -inline-threshold=100 -Wall -Wextra C:/CEdev/examples/standalone_examples/math_test/obj/lto.bc -o C:/CEdev/examples/standalone_examples/math_test/obj/lto.src   
1.      Code generation
2.      Running pass 'Function Pass Manager' on module 'C:/CEdev/examples/standalone_examples/math_test/obj/lto.bc'.
3.      Running pass 'Legalizer' on function '@i48bswap_'
0x7675B282 (0xE0000046 0x00000000 0x00000000 0x00000000), RaiseException() + 0x62 bytes(s)
0x0087AFA6 (0x03010100 0x00000000 0x00000020 0x00000013)
0x01000000 (0x00000000 0x00000020 0x00000013 0x0000000A)
0x03010100 (0x00000020 0x00000013 0x0000000A 0x0000000A)
ez80-clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 15.0.0 (https://github.com/CE-Programming/llvm-project 23b78267b5d376b232475d0805a937e54b61e0d0)
Target: ez80
Thread model: posix
InstalledDir: C:\CEdev\bin
ez80-clang: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.

Demonstration: https://discord.com/channels/432891584451706892/1184990251769397380/1305595352837263361

Error compiling the code: int48_t foo(int48_t x) { return __builtin_bswap64(x) >> 16; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants