[all-commits] [llvm/llvm-project] 42629d: [AArch64][CodeGen] match (or x (not y)) to generat...
Shreeyash Pandey via All-commits
all-commits at lists.llvm.org
Wed Apr 8 20:29:59 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 42629d7a174a62b98835e2e4c738ccdce027590b
https://github.com/llvm/llvm-project/commit/42629d7a174a62b98835e2e4c738ccdce027590b
Author: Shreeyash Pandey <shreeyash335 at gmail.com>
Date: 2026-04-09 (Thu, 09 Apr 2026)
Changed paths:
M llvm/lib/Target/AArch64/AArch64InstrInfo.td
M llvm/test/CodeGen/AArch64/arm64-atomic.ll
M llvm/test/CodeGen/AArch64/atomicrmw-O0.ll
M llvm/test/CodeGen/AArch64/logical-op-with-not.ll
Log Message:
-----------
[AArch64][CodeGen] match (or x (not y)) to generate mov+orn (#190769)
Fixes: https://github.com/llvm/llvm-project/issues/100045
Adds AddedComplexity to increase the priority the pattern that matches
(or x (not y)) and generates a mov+orn instead of the original mvn+orr.
The number of instructions still stay the same but mov+orn can be
considered better than mvn+orr for two reasons:
1. Symmetry: For the same input with an 'and' instead of 'or', mov+bic
is generated.
2. Optimzation through register rename: If mov is immediate (for
example, 'mov x1, #0x4'), it can be retired early by the register
renamer and never issued for execution.
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