Skip to content

Correct some wrong uses of LLVM intrinsics#2144

Open
sayantn wants to merge 2 commits into
rust-lang:mainfrom
sayantn:llvm-intrinsics
Open

Correct some wrong uses of LLVM intrinsics#2144
sayantn wants to merge 2 commits into
rust-lang:mainfrom
sayantn:llvm-intrinsics

Conversation

@sayantn
Copy link
Copy Markdown
Contributor

@sayantn sayantn commented May 31, 2026

There were some small mistakes in the LLVM intrinsics, these were autoupgraded by LLVM so the builds passed. Also replaces all extern "C" LLVM intrinsics blocks with extern "unadjusted"

AArch64

cc @adamgemmell

  • wrong type parameter in neon.vluti4q.lane
  • missing type parameter in prefetch
  • typo in sve.{and,bic,eor,orr,orn}.z
  • extra .x in sve.fcmla.lane and sve.frecpx
  • trailing whitespace in sve.expa.x
  • one missing type parameter in sve.fmmla
  • splitting svcvt in two parts, because same size operands need a different intrinsic

x86

  • missing type parameter in prefetch

NVPTX

I don't know who to cc here, the file was last modified by @gnzlbg but he doesn't seem active here anymore

  • deprecated intrinsic llvm.nvvm.barrier0 used

WASM32

cc @alexcrichton

  • missing type parameter in llvm.wasm.memory.{grow,size}

r? @folkertdev

@folkertdev
Copy link
Copy Markdown
Contributor

Out of curiosity, how did you find these?

@sayantn
Copy link
Copy Markdown
Contributor Author

sayantn commented May 31, 2026

Out of curiosity, how did you find these?

A modified version of rust-lang/rust#157145

Comment thread crates/core_arch/src/mips/msa.rs
Copy link
Copy Markdown
Contributor

@folkertdev folkertdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me, but maybe target maintainers have thoughts?

Also I wonder if this breaks with LLVM 21 at all?

View changes since this review

Comment thread crates/core_arch/src/wasm32/memory.rs
@sayantn sayantn force-pushed the llvm-intrinsics branch from 7a2df97 to 5f21f96 Compare May 31, 2026 18:02
@sayantn sayantn requested a review from alexcrichton June 2, 2026 19:19
@alexcrichton
Copy link
Copy Markdown
Member

wasm bits lgtm, thanks!

@sayantn sayantn requested a review from adamgemmell June 2, 2026 19:25
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.

4 participants