test carryless_mul codegen#157831
Conversation
|
Is it OK to add tests that only test the next LLVM? Otherwise this can be put on ice for a couple of weeks. r? nikic |
|
Some changes occurred in src/tools/compiletest cc @jieyouxu
|
There was a problem hiding this comment.
Is it OK to add tests that only test the next LLVM? Otherwise this can be put on ice for a couple of weeks.
Yes, that's fine.
It's a bit unfortunate that this test depends on target availability. I guess making this a minicore test by directly calling the intrinsic is bad practice?
| fn carryless_mul_u64(a: u64, b: u64) -> u64 { | ||
| // CHECK-LABEL: carryless_mul_u64: | ||
| // x86_64: pclmulqdq | ||
| // aarch64: pmull v0.1q, v1.1d, v0.1d |
There was a problem hiding this comment.
The register matching here looks fragile? Like this one uses v1.1d, v0.1d, while the others are v0.1d, v1.1d. That seems like something that can easily flip.
tracking issue: #152080
Test the codegen of
carryless_mulwith LLVM 23, which has custom lowerings for x86_64, aarch64 and riscv64.You can also see that the default expansion (when there is no special intruction available) is quite large still...
carryless_mul#152132 (comment))So LLVM default over 3X the number of instructions for the 64-bit and 128-bit case.