mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 07:57:36 +08:00
Do not assert on shifts of Neon polynomial types.
Most Neon shift intrinsics do not have variants for polynomial types, but vsri_n and vsli_n do support them, and we need to properly range-check the shift immediates for them. llvm-svn: 121509
This commit is contained in:
@@ -198,11 +198,9 @@ static unsigned RFT(unsigned t, bool shift = false) {
|
||||
assert(!shift && "cannot shift float types!");
|
||||
return (2 << (int)quad) - 1;
|
||||
case 5: // poly8
|
||||
assert(!shift && "cannot shift polynomial types!");
|
||||
return (8 << (int)quad) - 1;
|
||||
return shift ? 7 : (8 << (int)quad) - 1;
|
||||
case 6: // poly16
|
||||
assert(!shift && "cannot shift polynomial types!");
|
||||
return (4 << (int)quad) - 1;
|
||||
return shift ? 15 : (4 << (int)quad) - 1;
|
||||
case 7: // float16
|
||||
assert(!shift && "cannot shift float types!");
|
||||
return (4 << (int)quad) - 1;
|
||||
|
||||
Reference in New Issue
Block a user