[all-commits] [llvm/llvm-project] eed35c: [AArch64] Avoid selecting XAR for reverse operatio...
Ricardo Jesus via All-commits
all-commits at lists.llvm.org
Wed Feb 11 03:19:17 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: eed35c9e7fba1d0e4b905520350f431c5178ca5d
https://github.com/llvm/llvm-project/commit/eed35c9e7fba1d0e4b905520350f431c5178ca5d
Author: Ricardo Jesus <rjj at nvidia.com>
Date: 2026-02-11 (Wed, 11 Feb 2026)
Changed paths:
M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
M llvm/test/CodeGen/AArch64/sve2-xar.ll
M llvm/test/CodeGen/AArch64/xar.ll
Log Message:
-----------
[AArch64] Avoid selecting XAR for reverse operations. (#178706)
Rotations that implement reverse operations, for example:
```c
uint64x2_t foo(uint64x2_t r) {
return (r >> 32) | (r << 32);
}
```
Are currently lowered as XAR (when available):
```gas
foo:
movi v1.2d, #0000000000000000
xar v0.2d, v0.2d, v1.2d, #32
ret
```
This is suboptimal as REV* instructions typically have higher throughput
than XAR and do not require the zero operand.
This patch combines half-rotations to Neon or SVE REVs so that they're
no longer selected as XAR.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list