Skip to content

Lowering long vector returns fails. #27535

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 31, 2016 · 4 comments
Closed

Lowering long vector returns fails. #27535

llvmbot opened this issue Mar 31, 2016 · 4 comments
Labels
backend:Sparc bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Member

llvmbot commented Mar 31, 2016

Bugzilla Link 27161
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

To recreae: Compile the following with
llc -march=sparc .ll

define <8 x i8> @&#8203;fun8_2(<8 x i8> %a, <8 x i8> %b) {
entry:
  %and = and <8 x i8> %b, %a
  ret <8 x i8> %and
}

Expected result: Compiles well, returning some results on the stack as there are too many results (8 in the vector) to return in output registers.

Actual result: Fails. Tries to return all results in output registers and runs out of registers.

Important part of stack trace:

8  libLLVMCodeGen.so      0x00007f4ce1f5f47d llvm::CCState::AnalyzeReturn(llvm::SmallVectorImpl<llvm::ISD::OutputArg> const&, bool (*)(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)) + 683
9  libLLVMSparcCodeGen.so 0x00007f4ce40bcda4 llvm::SparcTargetLowering::LowerReturn_32(llvm::SDValue, unsigned int, bool, llvm::SmallVectorImpl<llvm::ISD::OutputArg> const&, llvm::SmallVectorImpl<llvm::SDValue> const&, llvm::SDLoc, llvm::SelectionDAG&) const + 222
@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@brad0
Copy link
Contributor

brad0 commented Nov 18, 2022

@koachan Is just me or has this been resolved with ToT?

@koachan
Copy link
Contributor

koachan commented Nov 23, 2022

This (and #48042) seems to be fixed already in latest main.

https://godbolt.org/z/b3r8TYz6z

@koachan
Copy link
Contributor

koachan commented Nov 23, 2022

@koachan Is just me or has this been resolved with ToT?

I think it's this patch? https://reviews.llvm.org/D132465
I wasn't aware that it also affects this case too back then, I'm sorry.

@brad0
Copy link
Contributor

brad0 commented Nov 24, 2022

I think it's this patch? https://reviews.llvm.org/D132465 I wasn't aware that it also affects this case too back then, I'm sorry.

Absolutely nothing to be sorry about. It's just good to try and clear out the bug reports. Take note of what issues have been resolved and what issues still affect the backend. Thank you for your effort.

@brad0 brad0 closed this as completed Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:Sparc bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

3 participants