-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
Cannot select llvm.canonicalize.f64 #32650
Comments
Also happens with 3.9 |
What should SSE (or x87 even, although I really don't want to deal with pseudos and unnormals....) be expected to do for float canonicalization? http://llvm.org/docs/LangRef.html#llvm-canonicalize-intrinsic As a stop gap would it make sense for a canonicalize to expand to just a copy of the original value? Is that better or worse than just crashing? |
"This function should always be implementable as multiplication by 1.0, provided that the compiler does not constant fold the operation." DAGCombiner has that fold of course, and it's not limited to pre-legalization. But any target that cares would be handling this node given that it's 2.5 years since: |
This exists to avoid the multiply by one fold. This needs to be selected to the instruction directly and can't be legalized / lowered to the equivalent multiply |
IIUC, that means every target is expected to duplicate something like this:
for each FP data type to avoid crashing? |
We still don't handle this: https://gcc.godbolt.org/z/1rd9cTzcT (and even amdgpu fails for <8 x half>) |
@arsenm This is the amdgpu canonicalize failure for v8f16 that I mentioned at EuroLLVM: https://gcc.godbolt.org/z/9jGfj7E3E |
This assert should have the same set of vector types as the binary and ternary case (although this assert is kind of pointless, the code should work for any vector type as-is). Fixes part of issue #32650.
Extended Description
Happens with x86, arm, powerpc, mips, etc backends.
The text was updated successfully, but these errors were encountered: