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

ACLE intrinics get compile error after r203229 commit #19468

Closed
llvmbot opened this issue Mar 10, 2014 · 1 comment
Closed

ACLE intrinics get compile error after r203229 commit #19468

llvmbot opened this issue Mar 10, 2014 · 1 comment
Labels
bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 10, 2014

Bugzilla Link 19094
Resolution FIXED
Resolved on Mar 10, 2014 04:36
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @TNorthover

Extended Description

For below C code,
#include <arm_neon.h>

uint16x8_t test1(uint16x8_t a, uint16x8_t b, uint32_t c) {
return vmlaq_n_u16(a, b, vqrshrns_n_u32(c, 11));
}

Clang generates below error message:
LLVM ERROR: Cannot select: 0x33deb60: v8i16 = AArch64ISD::NEON_VDUP 0x33dd840 [ORD=4] [ID=7]
0x33dd840: i64 = TargetConstant<127> [ID=3]
In function: test1

For another case below,
#include <arm_neon.h>

uint16x8_t test2(uint16x8_t a, uint16x8_t b, uint32_t c) {
return vsubl_high_u16(a, vmlaq_n_u16(a, b, vqrshrns_n_u32(c, 11)));
}

Clang would hit an assert:
/include/llvm/CodeGen/SelectionDAGNodes.h:559: const llvm::SDValue& llvm::SDNode::getOperand(unsigned int) const: Assertion `Num < NumOperands && "Invalid child # of SDNode!"' failed.

If r203229 is reverted, all of them can pass.

@TNorthover
Copy link
Contributor

This is a pair of bugs in AArch64's LowerCONCAT_VECTORS, exposed by slightly different incoming code.

  1. The NEON_VDUP optimisation was far too aggressive, assuming (I think) that the input would always be BUILD_VECTOR. In this case it was interpreting the intrinsic ID as the number being duplicated.

  2. We were treating most unknown concats as legal (by returning Op rather than SDValue). I think only concats of pairs of vectors are actually legal.

I've committed a patch fixes it as r203450, but it looks like the code could be improved by some combining of CONCAT_VECTORS and BUILD_VECTOR handling in these weird cases (the CONCAT is essentially a BUILD, just with a pseudovector input rather than a real vector).

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

2 participants