Skip to content

loongarch: Use intrinsics::simd for vbs{l,r}l#2180

Draft
heiher wants to merge 3 commits into
rust-lang:mainfrom
heiher:vbs-l-r-l
Draft

loongarch: Use intrinsics::simd for vbs{l,r}l#2180
heiher wants to merge 3 commits into
rust-lang:mainfrom
heiher:vbs-l-r-l

Conversation

@heiher

@heiher heiher commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

heiher added 3 commits July 1, 2026 17:14
The `is::`, `cs::`, and `ls::` prefixes were originally used to clearly
distinguish helper intrinsics from different namespaces at call sites.

However, due to limitations in Rust macro expansion, `prefix::simd_xxx`
cannot always be used. Some macro expansions only accept an identifier,
causing errors such as:

```
  ($ft:literal, $name:ident, $op:path, $oty:ty, $ity:ident) => {
      let r: $ity = $op::<IMM, _>(a);
                       ^^ expected one of `.`, `;`, `?`, `else`, or an operator
```

Instead of relying on namespace prefixes, rename the LoongArch-specific
`simd_xxx` helpers to `simd_ext_xxx` and remove the `is::`, `cs::`, and
`ls::` prefixes from macro invocations. This preserves the distinction
between helper intrinsics while avoiding the macro expansion limitation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant