Skip to content

Lowering long vector returns fails. #27535

Closed
@llvmbot

Description

@llvmbot
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions