[X86] Replace SSE mulh target intrinsics with generics
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Once #220293 has landed we can remove the (V)PMULHW + (V)PMULHUW x86 intrinsics and use the llvm.[su]mulh intrinsics directly:
- [ ] Move the `llvm.x86.*.pmulh.w` and `llvm.x86.*.pmulhu.w` intrinsic codegen to the *-intrinsics-upgrade.ll test files
- [ ] Handle `llvm.x86.*.pmulh.w` and `llvm.x86.*.pmulhu.w` intrinsics -> `llvm.[su]mulh` intrinsics in Autoupgrade
- [ ] Update stack folding tests to use the `llvm.[su]mulh` intrinsics directly
- [ ] clang\lib\CodeGen\TargetBuiltins\X86.cpp - emit `llvm.[su]mulh` intrinsics
- [ ] Remove `llvm.x86.*.pmulh.w` and `llvm.x86.*.pmulhu.w` intrinsic defs
Contributor guide
Research direction
First confirm that #220293 has landed, then inspect clang/lib/CodeGen/TargetBuiltins/X86.cpp and the existing *-intrinsics-upgrade.ll and stack-folding tests. Trace the Autoupgrade handling and intrinsic definitions for the listed pmulh and pmulhu operations. Done means the tests use llvm.[su]mulh, Clang emits those intrinsics, upgrade handling exists, and the old x86 intrinsic definitions are removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100