Skip to content

Assertion failure in TargetLoweringBase::isFAbsFree during SLP vectorization #35976

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

Closed
llvmbot opened this issue Mar 7, 2018 · 6 comments
Closed
Labels
bugzilla Issues migrated from bugzilla crash Prefer [crash-on-valid] or [crash-on-invalid] llvm:SLPVectorizer

Comments

@llvmbot
Copy link
Member

llvmbot commented Mar 7, 2018

Bugzilla Link 36628
Version trunk
OS Linux
Attachments Backtrace, Reduced test case
Reporter LLVM Bugzilla Contributor
CC @sunfishcode,@sbc100

Extended Description

The failing program is musl's multc3 when compiled for wasm32. I will attach a reduced test case in the next comment.

@llvmbot
Copy link
Member Author

llvmbot commented Mar 7, 2018

Sorry, I meant compiler-rt, not musl.

@sunfishcode
Copy link
Member

The testcase works for me with current trunk, processing it with opt -S -slp-vectorizer. Can you say what revision level of LLVM you see this with?

@llvmbot
Copy link
Member Author

llvmbot commented Apr 22, 2018

I'm still getting the same error on the same file with commit 9c07603 (revision 330542):

$ opt -mtriple=wasm32-unknown-unknown reduced.ll -S -slp-vectorizer
opt: llvm/include/llvm/CodeGen/TargetLowering.h:2191: virtual bool llvm::TargetLoweringBase::isFAbsFree(llvm::EVT) const: Assertion `VT.isFloatingPoint()' failed.

Are you building LLVM with the WebAssembly backend enabled?

@sunfishcode
Copy link
Member

I'm able to reproduce it now. It seems to be a bug in target-independent code, as I'm also able to reproduce it with -mtriple=x86_64-unknown-unknown rather than wasm32.

The problem is related to the f128 fabs, which legalizes to two i64s, which the generic isFAbsFree function doesn't know how to handle, because i64 isn't floating-point.

@sbc100
Copy link
Collaborator

sbc100 commented Mar 8, 2019

Did this ever get fixed?

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@Endilll Endilll added llvm:SLPVectorizer crash Prefer [crash-on-valid] or [crash-on-invalid] labels Apr 27, 2025
@alexey-bataev
Copy link
Member

Does not reproduce currently, fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla crash Prefer [crash-on-valid] or [crash-on-invalid] llvm:SLPVectorizer
Projects
None yet
Development

No branches or pull requests

5 participants